Index: ui/ozone/platform/dri/test/mock_dri_wrapper.h |
diff --git a/ui/ozone/platform/dri/test/mock_dri_wrapper.h b/ui/ozone/platform/dri/test/mock_dri_wrapper.h |
index d8a0e3f2475dd36282e1504787620fefc272d6bd..4dd3d4788bf19ca72fa479922d4a762dca78c56d 100644 |
--- a/ui/ozone/platform/dri/test/mock_dri_wrapper.h |
+++ b/ui/ozone/platform/dri/test/mock_dri_wrapper.h |
@@ -20,7 +20,10 @@ class CrtcController; |
class MockDriWrapper : public ui::DriWrapper { |
public: |
MockDriWrapper(int fd); |
- MockDriWrapper(int fd, std::vector<uint32_t> crtcs, size_t planes_per_crtc); |
+ MockDriWrapper(int fd, |
+ bool software_mode, |
+ std::vector<uint32_t> crtcs, |
+ size_t planes_per_crtc); |
~MockDriWrapper() override; |
int get_get_crtc_call_count() const { return get_crtc_call_count_; } |
@@ -34,7 +37,6 @@ class MockDriWrapper : public ui::DriWrapper { |
} |
int get_page_flip_call_count() const { return page_flip_call_count_; } |
int get_overlay_flip_call_count() const { return overlay_flip_call_count_; } |
- int get_handle_events_count() const { return handle_events_count_; } |
void fail_init() { fd_ = -1; } |
void set_set_crtc_expectation(bool state) { set_crtc_expectation_ = state; } |
void set_page_flip_expectation(bool state) { page_flip_expectation_ = state; } |
@@ -51,10 +53,7 @@ class MockDriWrapper : public ui::DriWrapper { |
return buffers_; |
} |
- // Overwrite the list of controllers used when serving the PageFlip requests. |
- void set_controllers(const std::queue<CrtcController*>& controllers) { |
- controllers_ = controllers; |
- } |
+ void RunCallbacks(); |
// DriWrapper: |
ScopedDrmCrtcPtr GetCrtc(uint32_t crtc_id) override; |
@@ -74,7 +73,9 @@ class MockDriWrapper : public ui::DriWrapper { |
uint32_t* framebuffer) override; |
bool RemoveFramebuffer(uint32_t framebuffer) override; |
ScopedDrmFramebufferPtr GetFramebuffer(uint32_t framebuffer) override; |
- bool PageFlip(uint32_t crtc_id, uint32_t framebuffer, void* data) override; |
+ bool PageFlip(uint32_t crtc_id, |
+ uint32_t framebuffer, |
+ const PageFlipCallback& callback) override; |
bool PageFlipOverlay(uint32_t crtc_id, |
uint32_t framebuffer, |
const gfx::Rect& location, |
@@ -92,7 +93,6 @@ class MockDriWrapper : public ui::DriWrapper { |
uint32_t handle, |
const gfx::Size& size) override; |
bool MoveCursor(uint32_t crtc_id, const gfx::Point& point) override; |
- void HandleEvent(drmEventContext& event) override; |
bool CreateDumbBuffer(const SkImageInfo& info, |
uint32_t* handle, |
uint32_t* stride, |
@@ -110,7 +110,6 @@ class MockDriWrapper : public ui::DriWrapper { |
int remove_framebuffer_call_count_; |
int page_flip_call_count_; |
int overlay_flip_call_count_; |
- int handle_events_count_; |
bool set_crtc_expectation_; |
bool add_framebuffer_expectation_; |
@@ -121,7 +120,7 @@ class MockDriWrapper : public ui::DriWrapper { |
std::vector<skia::RefPtr<SkSurface> > buffers_; |
- std::queue<CrtcController*> controllers_; |
+ std::queue<PageFlipCallback> callbacks_; |
DISALLOW_COPY_AND_ASSIGN(MockDriWrapper); |
}; |