~vanvugt/mir/render-focus

« back to all changes in this revision

Viewing changes to tests/integration-tests/graphics/android/test_display_integration.cpp

  • Committer: Tarmac
  • Author(s): Alexandros Frantzis
  • Date: 2014-03-31 13:20:44 UTC
  • mfrom: (1513.1.1 android-gl-config)
  • Revision ID: tarmac-20140331132044-oxpv8kzzbn20f8i3
android: Respect GLConfig preferences.

Approved by Alan Griffiths, Kevin DuBois, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include "src/platform/graphics/android/resource_factory.h"
23
23
#include "src/platform/graphics/android/android_graphic_buffer_allocator.h"
24
24
#include "src/platform/graphics/android/output_builder.h"
 
25
#include "src/server/report/null_report_factory.h"
25
26
 
26
27
#include "examples/graphics.h"
27
 
#include "mir_test_doubles/mock_display_report.h"
 
28
#include "mir_test_doubles/stub_gl_config.h"
28
29
 
29
30
#include <gtest/gtest.h>
30
31
#include <stdexcept>
70
71
 
71
72
TEST_F(AndroidDisplay, display_can_post)
72
73
{
73
 
    auto mock_display_report = std::make_shared<testing::NiceMock<mtd::MockDisplayReport>>();
 
74
    auto null_display_report = mir::report::null_display_report();
 
75
    auto stub_gl_config = std::make_shared<mtd::StubGLConfig>();
74
76
    auto buffer_initializer = std::make_shared<mg::NullBufferInitializer>();
75
77
    auto fb_allocator = std::make_shared<mga::AndroidGraphicBufferAllocator>(buffer_initializer);
76
78
    auto display_buffer_factory = std::make_shared<mga::OutputBuilder>(
77
 
        fb_allocator, display_resource_factory, mock_display_report);
78
 
 
79
 
    mga::AndroidDisplay display(display_buffer_factory, mock_display_report);
 
79
        fb_allocator, display_resource_factory, null_display_report);
 
80
 
 
81
    mga::AndroidDisplay display{display_buffer_factory, stub_gl_config, null_display_report};
 
82
 
80
83
    display.for_each_display_buffer([this](mg::DisplayBuffer& buffer)
81
84
    {
82
85
        buffer.make_current();