~albaguirre/mir/backport-fixes-to-0.11

« back to all changes in this revision

Viewing changes to tests/unit-tests/graphics/android/test_hwc_fb_device.cpp

  • Committer: Tarmac
  • Author(s): Kevin DuBois
  • Date: 2015-01-29 16:35:31 UTC
  • mfrom: (2215.3.26 pull-list-from-device)
  • Revision ID: tarmac-20150129163531-oklyqevk921mxuq3
android: pull the mga::LayerList instance from the mga::HwcDevice to the mga::DisplayBuffer.

Approved by Alan Griffiths, Alexandros Frantzis, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
97
97
    std::shared_ptr<mtd::StubAndroidNativeBuffer> stub_native_buffer;
98
98
    mtd::StubSwappingGLContext stub_context;
99
99
    testing::NiceMock<mtd::MockSwappingGLContext> mock_context;
 
100
    mtd::StubRenderableListCompositor stub_compositor;
 
101
    mga::DisplayName primary{mga::DisplayName::primary};
 
102
    mga::LayerList list{std::make_shared<mga::Hwc10Adapter>(), {}};
100
103
    hwc_layer_1_t skip_layer;
101
104
};
102
105
}
126
129
    };
127
130
 
128
131
    mga::HwcFbDevice device(mock_hwc_device_wrapper, mock_fb_device);
129
 
    EXPECT_FALSE(device.post_overlays(stub_context, renderlist, stub_compositor));
 
132
    EXPECT_FALSE(device.compatible_renderlist(renderlist));
130
133
}
131
134
 
132
135
TEST_F(HwcFbDevice, hwc10_post)
169
172
    EXPECT_CALL(*mock_fb_device, post_interface(mock_fb_device.get(), &stub_native_buffer->native_handle))
170
173
        .InSequence(seq);
171
174
 
172
 
    device.post_gl(mock_context);
 
175
    device.commit(primary, list, mock_context, stub_compositor);
173
176
}