19 #ifndef MIR_TEST_DOUBLES_MOCK_FB_HAL_DEVICE_H_
20 #define MIR_TEST_DOUBLES_MOCK_FB_HAL_DEVICE_H_
22 #include <hardware/hwcomposer.h>
23 #include <hardware/gralloc.h>
24 #include <hardware/fb.h>
25 #include <gmock/gmock.h>
38 int const pf,
int const numfbs)
39 : framebuffer_device_t({
53 nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
67 static int hook_post(
struct framebuffer_device_t* mock_fb, buffer_handle_t handle)
70 return mocker->post_interface(mock_fb, handle);
76 return mocker->setSwapInterval_interface(mock_fb, interval);
82 return mocker->enableScreen_interface(mock_fb, enable);
86 MOCK_METHOD2(enableScreen_interface,
int(
struct framebuffer_device_t*,
int));
87 MOCK_METHOD2(post_interface,
int(
struct framebuffer_device_t*, buffer_handle_t));
88 MOCK_METHOD2(setSwapInterval_interface,
int(
struct framebuffer_device_t*,
int));
setSwapInterval
Definition: mock_fb_hal_device.h:58
MOCK_METHOD2(enableScreen_interface, int(struct framebuffer_device_t *, int))
static int hook_enableScreen(struct framebuffer_device_t *mock_fb, int enable)
Definition: mock_fb_hal_device.h:79
unsigned int width
Definition: black_arrow.c:4
MockFBHalDevice()
Definition: mock_fb_hal_device.h:62
static int hook_post(struct framebuffer_device_t *mock_fb, buffer_handle_t handle)
Definition: mock_fb_hal_device.h:67
Definition: mock_fb_hal_device.h:34
unsigned int height
Definition: black_arrow.c:5
MockFBHalDevice(unsigned int const width, unsigned int const height, int const pf, int const numfbs)
Definition: mock_fb_hal_device.h:37
enableScreen
Definition: mock_fb_hal_device.h:59
static int hook_setSwapInterval(struct framebuffer_device_t *mock_fb, int interval)
Definition: mock_fb_hal_device.h:73