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

Side by Side Diff: ui/ozone/platform/dri/test/mock_dri_wrapper.cc

Issue 407603002: [Ozone-DRI] Migrate cursor to using ScanoutBuffer (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/ozone/platform/dri/test/mock_dri_wrapper.h" 5 #include "ui/ozone/platform/dri/test/mock_dri_wrapper.h"
6 6
7 #include <xf86drm.h> 7 #include <xf86drm.h>
8 #include <xf86drmMode.h> 8 #include <xf86drmMode.h>
9 9
10 #include "third_party/skia/include/core/SkCanvas.h" 10 #include "third_party/skia/include/core/SkCanvas.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 } 103 }
104 104
105 ScopedDrmPropertyBlobPtr MockDriWrapper::GetPropertyBlob( 105 ScopedDrmPropertyBlobPtr MockDriWrapper::GetPropertyBlob(
106 drmModeConnector* connector, 106 drmModeConnector* connector,
107 const char* name) { 107 const char* name) {
108 return ScopedDrmPropertyBlobPtr(DrmAllocator<drmModePropertyBlobRes>()); 108 return ScopedDrmPropertyBlobPtr(DrmAllocator<drmModePropertyBlobRes>());
109 } 109 }
110 110
111 bool MockDriWrapper::SetCursor(uint32_t crtc_id, 111 bool MockDriWrapper::SetCursor(uint32_t crtc_id,
112 uint32_t handle, 112 uint32_t handle,
113 uint32_t width, 113 const gfx::Size& size) {
114 uint32_t height) {
115 return true; 114 return true;
116 } 115 }
117 116
118 bool MockDriWrapper::MoveCursor(uint32_t crtc_id, int x, int y) { 117 bool MockDriWrapper::MoveCursor(uint32_t crtc_id, const gfx::Point& point) {
119 return true; 118 return true;
120 } 119 }
121 120
122 void MockDriWrapper::HandleEvent(drmEventContext& event) { 121 void MockDriWrapper::HandleEvent(drmEventContext& event) {
123 } 122 }
124 123
125 bool MockDriWrapper::CreateDumbBuffer(const SkImageInfo& info, 124 bool MockDriWrapper::CreateDumbBuffer(const SkImageInfo& info,
126 uint32_t* handle, 125 uint32_t* handle,
127 uint32_t* stride, 126 uint32_t* stride,
128 void** pixels) { 127 void** pixels) {
(...skipping 11 matching lines...) Expand all
140 } 139 }
141 140
142 void MockDriWrapper::DestroyDumbBuffer(const SkImageInfo& info, 141 void MockDriWrapper::DestroyDumbBuffer(const SkImageInfo& info,
143 uint32_t handle, 142 uint32_t handle,
144 uint32_t stride, 143 uint32_t stride,
145 void* pixels) { 144 void* pixels) {
146 delete[] static_cast<char*>(pixels); 145 delete[] static_cast<char*>(pixels);
147 } 146 }
148 147
149 } // namespace ui 148 } // namespace ui
OLDNEW
« ui/ozone/platform/dri/dri_surface_factory.cc ('K') | « ui/ozone/platform/dri/test/mock_dri_wrapper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698