~kdub/mir/mali-client-render-support

« back to all changes in this revision

Viewing changes to tests/integration-tests/test_drm_auth_magic.cpp

  • Committer: Kevin DuBois
  • Date: 2013-11-05 21:44:14 UTC
  • mfrom: (1062.1.137 dev)
  • Revision ID: kevin.dubois@canonical.com-20131105214414-d32r52joqrs8tsmo
merge dev branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#include "mir/graphics/drm_authenticator.h"
21
21
#include "mir/graphics/platform_ipc_package.h"
22
22
#include "mir/graphics/buffer_basic.h"
23
 
#include "mir/graphics/graphic_buffer_allocator.h"
24
23
 
25
24
#include <boost/exception/errinfo_errno.hpp>
26
25
#include <boost/throw_exception.hpp>
27
26
 
28
 
#include "mir_test_doubles/stub_buffer.h"
 
27
#include "mir_test_doubles/stub_buffer_allocator.h"
29
28
#include "mir_test_doubles/null_platform.h"
30
29
#include "mir_test_framework/display_server_test_fixture.h"
31
30
 
45
44
 
46
45
char const* const mir_test_socket = mtf::test_socket_file().c_str();
47
46
 
48
 
class StubGraphicBufferAllocator : public mg::GraphicBufferAllocator
49
 
{
50
 
 public:
51
 
    std::shared_ptr<mg::Buffer> alloc_buffer(mg::BufferProperties const&)
52
 
    {
53
 
        return std::shared_ptr<mg::Buffer>(new mtd::StubBuffer());
54
 
    }
55
 
 
56
 
    std::vector<geom::PixelFormat> supported_pixel_formats()
57
 
    {
58
 
        return std::vector<geom::PixelFormat>();
59
 
    }
60
 
};
61
 
 
62
47
class MockAuthenticatingPlatform : public mtd::NullPlatform, public mg::DRMAuthenticator
63
48
{
64
49
public:
65
50
    std::shared_ptr<mg::GraphicBufferAllocator> create_buffer_allocator(
66
51
        std::shared_ptr<mg::BufferInitializer> const& /*buffer_initializer*/) override
67
52
    {
68
 
        return std::make_shared<StubGraphicBufferAllocator>();
 
53
        return std::make_shared<mtd::StubBufferAllocator>();
69
54
    }
70
55
 
71
56
    MOCK_METHOD1(drm_auth_magic, void(unsigned int));