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

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

Issue 1270583003: Move some parts of onReadPixels up to GrGpu readPixels. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nit 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
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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(GrSurface* surface, 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,
212 size_t tightRowBytes) override {
212 return false; 213 return false;
213 } 214 }
214 215
215 bool onWritePixels(GrSurface* surface, 216 bool onWritePixels(GrSurface* surface,
216 int left, int top, int width, int height, 217 int left, int top, int width, int height,
217 GrPixelConfig config, const void* buffer, 218 GrPixelConfig config, const void* buffer,
218 size_t rowBytes) override { 219 size_t rowBytes) override {
219 return false; 220 return false;
220 } 221 }
221 222
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 SkASSERT(NULL == fGpu); 259 SkASSERT(NULL == fGpu);
259 fGpu = SkNEW_ARGS(MockGpu, (this, options)); 260 fGpu = SkNEW_ARGS(MockGpu, (this, options));
260 SkASSERT(fGpu); 261 SkASSERT(fGpu);
261 this->initCommon(); 262 this->initCommon();
262 263
263 // We delete these because we want to test the cache starting with zero reso urces. Also, none of 264 // 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 265 // these objects are required for any of tests that use this context. TODO: make stop allocating
265 // resources in the buffer pools. 266 // resources in the buffer pools.
266 fDrawingMgr.abandon(); 267 fDrawingMgr.abandon();
267 } 268 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698