~alan-griffiths/mir/fix-1654023

« back to all changes in this revision

Viewing changes to tests/unit-tests/graphics/offscreen/test_offscreen_display.cpp

  • Committer: Daniel van Vugt
  • Date: 2015-04-28 07:54:10 UTC
  • mfrom: (2517 development-branch)
  • mto: This revision was merged to the branch mainline in revision 2673.
  • Revision ID: daniel.van.vugt@canonical.com-20150428075410-rwskshfuar7voesp
Merge latest trunk and fix conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
        mr::null_display_report()};
69
69
 
70
70
    int count = 0;
71
 
    display.for_each_display_buffer(
72
 
        [&](mg::DisplayBuffer& db)
73
 
        {
 
71
    display.for_each_display_sync_group([&](mg::DisplaySyncGroup& group) {
 
72
        group.for_each_display_buffer([&](mg::DisplayBuffer& db) {
74
73
            ++count;
75
74
            EXPECT_EQ(mir_orientation_normal, db.orientation());
76
75
        });
 
76
    });
77
77
 
78
78
    EXPECT_TRUE(count);
79
79
}
107
107
    Mock::VerifyAndClearExpectations(&mock_gl);
108
108
 
109
109
    /* Binds the GL framebuffer objects */
110
 
    display.for_each_display_buffer(
111
 
        [this](mg::DisplayBuffer& db)
112
 
        {
 
110
    display.for_each_display_sync_group([&](mg::DisplaySyncGroup& group) {
 
111
        group.for_each_display_buffer([&](mg::DisplayBuffer& db) {
113
112
            EXPECT_CALL(mock_egl, eglMakeCurrent(_,_,_,Ne(EGL_NO_CONTEXT)));
114
113
            EXPECT_CALL(mock_gl, glBindFramebuffer(_,Ne(0)));
115
114
 
118
117
            Mock::VerifyAndClearExpectations(&mock_egl);
119
118
            Mock::VerifyAndClearExpectations(&mock_gl);
120
119
        });
 
120
    });
121
121
 
122
122
    /* Contexts are released at teardown */
123
 
    display.for_each_display_buffer(
124
 
        [this](mg::DisplayBuffer&)
125
 
        {
 
123
    display.for_each_display_sync_group([&](mg::DisplaySyncGroup& group) {
 
124
        group.for_each_display_buffer([&](mg::DisplayBuffer&) {
126
125
            EXPECT_CALL(mock_egl, eglMakeCurrent(_,_,_,EGL_NO_CONTEXT));
127
126
        });
 
127
    });
128
128
}
129
129
 
130
130
TEST_F(OffscreenDisplayTest, restores_previous_state_on_fbo_setup_failure)