~raof/mir/blowup-eventhub

« back to all changes in this revision

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

  • Committer: Tarmac
  • Author(s): Kevin DuBois
  • Date: 2014-01-29 00:49:23 UTC
  • mfrom: (1329.1.42 renderable)
  • Revision ID: tarmac-20140129004923-a52iu4phmbzmv9ot
android: split out HWC layers into their own file and add a mga::CompositionLayer type that depends on the interface mg::Renderable.

Approved by Andreas Pokorny, Alan Griffiths, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include "src/platform/graphics/android/android_format_conversion-inl.h"
23
23
#include "mir_test_doubles/mock_display_device.h"
24
24
#include "mir_test_doubles/mock_display_report.h"
 
25
#include "mir_test_doubles/stub_renderable.h"
25
26
#include "mir_test_doubles/mock_egl.h"
26
27
#include "mir/graphics/android/mir_native_window.h"
27
28
#include "mir_test_doubles/stub_driver_interpreter.h"
83
84
    EXPECT_CALL(*mock_display_device, post(Ref(*stub_buffer)))
84
85
        .Times(1);
85
86
 
86
 
    std::list<mg::Renderable> renderlist;
 
87
    std::list<std::shared_ptr<mg::Renderable>> renderlist{};
87
88
    mga::DisplayBuffer db(mock_fb_bundle, mock_display_device, native_window, *gl_context);
88
89
    db.post_update();
89
90
}
105
106
    EXPECT_CALL(*mock_display_device, post(Ref(*stub_buffer)))
106
107
        .Times(1);
107
108
 
108
 
    std::list<mg::Renderable> renderlist{};
 
109
    std::list<std::shared_ptr<mg::Renderable>> renderlist{};
109
110
    auto render_fn = [] (mg::Renderable const&) {};
110
111
    db.render_and_post_update(renderlist, render_fn);
111
112
}
119
120
        MOCK_METHOD0(called, void());
120
121
    };
121
122
 
122
 
    std::list<mg::Renderable> renderlist{mg::Renderable{}, mg::Renderable{}};
 
123
    std::list<std::shared_ptr<mg::Renderable>> renderlist{
 
124
        std::make_shared<mtd::StubRenderable>(),
 
125
        std::make_shared<mtd::StubRenderable>()};
 
126
 
123
127
    MockRenderOperator mock_call_counter;
124
128
 
125
129
    InSequence seq;