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

Side by Side Diff: src/gpu/GrTest.cpp

Issue 1262473004: Make GrGpu read/write pixels take GrSurface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments Created 5 years, 4 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
« no previous file with comments | « src/gpu/GrGpu.cpp ('k') | src/gpu/gl/GrGLGpu.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrTest.h" 9 #include "GrTest.h"
10 10
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 197
198 GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) override { ret urn NULL; } 198 GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) override { ret urn NULL; }
199 199
200 void onClear(GrRenderTarget*, const SkIRect* rect, GrColor color, 200 void onClear(GrRenderTarget*, const SkIRect* rect, GrColor color,
201 bool canIgnoreRect) override {} 201 bool canIgnoreRect) override {}
202 202
203 void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideCli p) override {} 203 void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideCli p) override {}
204 204
205 void onDraw(const DrawArgs&, const GrNonInstancedVertices&) override {} 205 void onDraw(const DrawArgs&, const GrNonInstancedVertices&) override {}
206 206
207 bool onReadPixels(GrRenderTarget* target, 207 bool onReadPixels(GrSurface* surface,
208 int left, int top, int width, int height, 208 int left, int top, int width, int height,
209 GrPixelConfig, 209 GrPixelConfig,
210 void* buffer, 210 void* buffer,
211 size_t rowBytes) override { 211 size_t rowBytes) override {
212 return false; 212 return false;
213 } 213 }
214 214
215 bool onWriteTexturePixels(GrTexture* texture, 215 bool onWritePixels(GrSurface* surface,
216 int left, int top, int width, int height, 216 int left, int top, int width, int height,
217 GrPixelConfig config, const void* buffer, 217 GrPixelConfig config, const void* buffer,
218 size_t rowBytes) override { 218 size_t rowBytes) override {
219 return false; 219 return false;
220 } 220 }
221 221
222 void onResolveRenderTarget(GrRenderTarget* target) override { return; } 222 void onResolveRenderTarget(GrRenderTarget* target) override { return; }
223 223
224 bool createStencilAttachmentForRenderTarget(GrRenderTarget*, int width, int height) override { 224 bool createStencilAttachmentForRenderTarget(GrRenderTarget*, int width, int height) override {
225 return false; 225 return false;
226 } 226 }
227 227
228 bool attachStencilAttachmentToRenderTarget(GrStencilAttachment*, GrRenderTar get*) override { 228 bool attachStencilAttachmentToRenderTarget(GrStencilAttachment*, GrRenderTar get*) override {
(...skipping 29 matching lines...) Expand all
258 SkASSERT(NULL == fGpu); 258 SkASSERT(NULL == fGpu);
259 fGpu = SkNEW_ARGS(MockGpu, (this, options)); 259 fGpu = SkNEW_ARGS(MockGpu, (this, options));
260 SkASSERT(fGpu); 260 SkASSERT(fGpu);
261 this->initCommon(); 261 this->initCommon();
262 262
263 // We delete these because we want to test the cache starting with zero reso urces. Also, none of 263 // We delete these because we want to test the cache starting with zero reso urces. Also, none of
264 // these objects are required for any of tests that use this context. TODO: make stop allocating 264 // these objects are required for any of tests that use this context. TODO: make stop allocating
265 // resources in the buffer pools. 265 // resources in the buffer pools.
266 fDrawingMgr.abandon(); 266 fDrawingMgr.abandon();
267 } 267 }
OLDNEW
« no previous file with comments | « src/gpu/GrGpu.cpp ('k') | src/gpu/gl/GrGLGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698