Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Unified Diff: ui/ozone/platform/dri/test/mock_dri_wrapper.h

Issue 402773002: [Ozone-DRI] Removing MockDriSurface implementation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 e06e14b182095d1d5618e1e81a6727812c1db9c0..eb3cbdc3b762a52e406bdbbdf3b4a5d6f2c68bc6 100644
--- a/ui/ozone/platform/dri/test/mock_dri_wrapper.h
+++ b/ui/ozone/platform/dri/test/mock_dri_wrapper.h
@@ -5,6 +5,10 @@
#ifndef UI_OZONE_PLATFORM_DRI_TEST_MOCK_DRI_WRAPPER_H_
#define UI_OZONE_PLATFORM_DRI_TEST_MOCK_DRI_WRAPPER_H_
+#include <vector>
+
+#include "skia/ext/refptr.h"
+#include "third_party/skia/include/core/SkSurface.h"
#include "ui/ozone/platform/dri/dri_wrapper.h"
namespace ui {
@@ -31,6 +35,13 @@ class MockDriWrapper : public ui::DriWrapper {
void set_add_framebuffer_expectation(bool state) {
add_framebuffer_expectation_ = state;
}
+ void set_create_dumb_buffer_expectation(bool state) {
+ create_dumb_buffer_expectation_ = state;
+ }
+
+ const std::vector<skia::RefPtr<SkSurface> > buffers() const {
+ return buffers_;
+ }
// DriWrapper:
virtual ScopedDrmCrtcPtr GetCrtc(uint32_t crtc_id) OVERRIDE;
@@ -68,6 +79,14 @@ class MockDriWrapper : public ui::DriWrapper {
uint32_t height) OVERRIDE;
virtual bool MoveCursor(uint32_t crtc_id, int x, int y) OVERRIDE;
virtual void HandleEvent(drmEventContext& event) OVERRIDE;
+ virtual bool CreateDumbBuffer(const SkImageInfo& info,
+ uint32_t* handle,
+ uint32_t* stride,
+ void** pixels) OVERRIDE;
+ virtual void DestroyDumbBuffer(const SkImageInfo& info,
+ uint32_t handle,
+ uint32_t stride,
+ void* pixels) OVERRIDE;
private:
int get_crtc_call_count_;
@@ -80,6 +99,9 @@ class MockDriWrapper : public ui::DriWrapper {
bool set_crtc_expectation_;
bool add_framebuffer_expectation_;
bool page_flip_expectation_;
+ bool create_dumb_buffer_expectation_;
+
+ std::vector<skia::RefPtr<SkSurface> > buffers_;
DISALLOW_COPY_AND_ASSIGN(MockDriWrapper);
};

Powered by Google App Engine
This is Rietveld 408576698