~kgunn72/mir/dont-crash-when-shooting-invalid-surface

« back to all changes in this revision

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

  • Committer: Tarmac
  • Author(s): Alan Griffiths, Alexandros Frantzis, Daniel van Vugt, Kevin DuBois, Christopher James Halse Rogers, chris.gagnon, Mathieu Trudel-Lapierre, Robert Carr, Automatic PS uploader, Kevin Gunn, Daniel d'Andrada, Christopher James Halse Rogers, Michael Terry, Brandon Schaefer, Timo Jyrinki, Mir Team, Andreas Pokorny
  • Date: 2013-12-20 11:11:22 UTC
  • mfrom: (1169.1.1 version-0.1.3)
  • Revision ID: tarmac-20131220111122-h503fd1fnq7pn9za
Latest upstream release: Mir 0.1.3 (r1298).

Approved by Alan Griffiths, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 * Authored by: Kevin DuBois <kevin.dubois@canonical.com>
17
17
 */
18
18
 
19
 
#include "src/server/graphics/android/display_buffer.h"
20
 
#include "src/server/graphics/android/android_display.h"
21
 
#include "src/server/graphics/android/gl_context.h"
22
 
#include "src/server/graphics/android/android_format_conversion-inl.h"
 
19
#include "src/platform/graphics/android/display_buffer.h"
 
20
#include "src/platform/graphics/android/android_display.h"
 
21
#include "src/platform/graphics/android/gl_context.h"
 
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
25
#include "mir_test_doubles/mock_egl.h"
49
49
        dummy_display = mock_egl.fake_egl_display;
50
50
        dummy_config = mock_egl.fake_configs[0];
51
51
        dummy_context = mock_egl.fake_egl_context;
52
 
        mtd::MockDisplayReport report;
 
52
        testing::NiceMock<mtd::MockDisplayReport> report;
53
53
        gl_context = std::make_shared<mga::GLContext>(mga::to_mir_format(mock_egl.fake_visual_id),report);
54
54
        mock_fb_bundle = std::make_shared<mtd::MockFBBundle>();
55
55
    }
96
96
    EXPECT_CALL(*mock_fb_bundle, fb_size())
97
97
        .Times(AnyNumber())
98
98
        .WillRepeatedly(Return(fake_display_size));
99
 
 
 
99
 
100
100
    mga::DisplayBuffer db(mock_fb_bundle, mock_display_device, native_window, *gl_context);
101
 
    
 
101
 
102
102
    auto view_area = db.view_area();
103
103
 
104
104
    geom::Point origin_pt{geom::X{0}, geom::Y{0}};