Mir
mock_client_buffer.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2016 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 or 3 as
6  * published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Kevin DuBois <kevin.dubois@canonical.com>
17  */
18 
19 #ifndef MIR_TEST_DOUBLES_MOCK_CLIENT_BUFFER_H_
20 #define MIR_TEST_DOUBLES_MOCK_CLIENT_BUFFER_H_
21 
22 #include "mir/client/client_buffer.h"
23 
24 #include <gtest/gtest.h>
25 #include <gmock/gmock.h>
26 
27 namespace mir
28 {
29 namespace test
30 {
31 namespace doubles
32 {
33 struct MockClientBuffer : client::ClientBuffer
34 {
35  MOCK_METHOD0(secure_for_cpu_write, std::shared_ptr<client::MemoryRegion>());
39 
40  MOCK_CONST_METHOD0(age, uint32_t());
41  MOCK_METHOD0(mark_as_submitted, void());
42  MOCK_METHOD0(increment_age, void());
43  MOCK_METHOD1(update_from, void(MirBufferPackage const&));
44  MOCK_METHOD1(fill_update_msg, void(MirBufferPackage&));
45  MOCK_CONST_METHOD0(native_buffer_handle, std::shared_ptr<graphics::NativeBuffer>());
46  MOCK_CONST_METHOD0(as_mir_native_buffer, MirNativeBuffer*());
48  MOCK_METHOD3(egl_image_creation_parameters, void(EGLenum*, EGLClientBuffer*, EGLint**));
49  int age_{0};
50 };
51 }
52 }
53 }
54 
55 #endif // MIR_TEST_DOUBLES_MOCK_CLIENT_BUFFER_FACTORY_H_
Definition: size.h:30
AutoUnblockThread is a helper thread class that can gracefully shutdown at destruction time...
Definition: sw_splash.h:26
MirPixelFormat pixel_format
Definition: client_types.h:180
Definition: mir_native_buffer.h:31
MOCK_METHOD1(update_from, void(MirBufferPackage const &))
MOCK_METHOD3(egl_image_creation_parameters, void(EGLenum *, EGLClientBuffer *, EGLint **))
int age_
Definition: mock_client_buffer.h:49
MirPixelFormat
32-bit pixel formats (8888): The order of components in the enum matches the order of the components ...
Definition: common.h:241
MOCK_CONST_METHOD0(size, geometry::Size())
Definition: dimensions.h:36
MOCK_METHOD0(secure_for_cpu_write, std::shared_ptr< client::MemoryRegion >())
Definition: mock_client_buffer.h:33

Copyright © 2012-2017 Canonical Ltd.
Generated on Wed Oct 11 15:14:10 UTC 2017