~robertcarr/mir/send-clients-input

« back to all changes in this revision

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

  • Committer: Alan Griffiths
  • Date: 2012-09-25 09:01:03 UTC
  • mfrom: (134.9.91 android-client-buffer)
  • Revision ID: alan@octopull.co.uk-20120925090103-sgzbgx01lzfpaua1
client: android client buffer

This reconciles lp:~kdub/mir/android-client-buffer/ with the changes that have happened on trunk today.

a few points moved PixelFormat into geometry from compositor, and use mir/geometry on the client side as well. The concepts of dimensions and pixelformats are useful on the client and server side. (caused a bit of code churn)

this mp does not connect MirMemoryRegion into mir::client::MemoryRegion. (future mp)

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
        mock_alloc_device = std::make_shared<mga::MockAllocAdaptor>(mock_buffer_handle);
41
41
 
42
42
        /* set up common defaults */
43
 
        pf = mc::PixelFormat::rgba_8888;
 
43
        pf = geom::PixelFormat::rgba_8888;
44
44
        size = geom::Size{geom::Width{300}, geom::Height{200}};
45
45
 
46
46
        EXPECT_CALL(*mock_alloc_device, alloc_buffer( _, _, _))
49
49
 
50
50
    std::shared_ptr<mga::MockAllocAdaptor> mock_alloc_device;
51
51
    std::shared_ptr<mga::MockBufferHandle> mock_buffer_handle;
52
 
    mc::PixelFormat pf;
 
52
    geom::PixelFormat pf;
53
53
    geom::Size size;
54
54
};
55
55
 
102
102
{
103
103
    using namespace testing;
104
104
 
105
 
    mc::PixelFormat pf2 = mc::PixelFormat::rgba_5658;
 
105
    geom::PixelFormat pf2 = geom::PixelFormat::rgb_888;
106
106
 
107
107
    EXPECT_CALL(*mock_buffer_handle, format())
108
108
    .Times(Exactly(1))