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

Side by Side Diff: src/gpu/GrGpu.h

Issue 680413005: Don't allow renderTarget==NULL to GrContext::clear() and friends. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comment Created 6 years, 1 month 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/GrDrawTarget.h ('k') | src/gpu/GrGpu.cpp » ('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 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrGpu_DEFINED 8 #ifndef GrGpu_DEFINED
9 #define GrGpu_DEFINED 9 #define GrGpu_DEFINED
10 10
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 * @param buffer memory to read pixels from 259 * @param buffer memory to read pixels from
260 * @param rowBytes number of bytes between consecutive rows. Zero 260 * @param rowBytes number of bytes between consecutive rows. Zero
261 * means rows are tightly packed. 261 * means rows are tightly packed.
262 */ 262 */
263 bool writeTexturePixels(GrTexture* texture, 263 bool writeTexturePixels(GrTexture* texture,
264 int left, int top, int width, int height, 264 int left, int top, int width, int height,
265 GrPixelConfig config, const void* buffer, 265 GrPixelConfig config, const void* buffer,
266 size_t rowBytes); 266 size_t rowBytes);
267 267
268 // GrDrawTarget overrides 268 // GrDrawTarget overrides
269 virtual void clear(const SkIRect* rect, 269 virtual void clear(const SkIRect* rect, GrColor color, bool canIgnoreRect,
270 GrColor color, 270 GrRenderTarget* renderTarget) SK_OVERRIDE;
271 bool canIgnoreRect,
272 GrRenderTarget* renderTarget = NULL) SK_OVERRIDE;
273 271
274 virtual void clearStencilClip(const SkIRect& rect, 272 virtual void clearStencilClip(const SkIRect& rect,
275 bool insideClip, 273 bool insideClip,
276 GrRenderTarget* renderTarget = NULL) SK_OVERRI DE; 274 GrRenderTarget* renderTarget = NULL) SK_OVERRI DE;
277 275
278 // After the client interacts directly with the 3D context state the GrGpu 276 // After the client interacts directly with the 3D context state the GrGpu
279 // must resync its internal state and assumptions about 3D context state. 277 // must resync its internal state and assumptions about 3D context state.
280 // Each time this occurs the GrGpu bumps a timestamp. 278 // Each time this occurs the GrGpu bumps a timestamp.
281 // state of the 3D context 279 // state of the 3D context
282 // At 10 resets / frame and 60fps a 64bit timestamp will overflow in about 280 // At 10 resets / frame and 60fps a 64bit timestamp will overflow in about
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 // counts number of uses of vertex/index pool in the geometry stack 486 // counts number of uses of vertex/index pool in the geometry stack
489 int fVertexP oolUseCnt; 487 int fVertexP oolUseCnt;
490 int fIndexPo olUseCnt; 488 int fIndexPo olUseCnt;
491 // these are mutable so they can be created on-demand 489 // these are mutable so they can be created on-demand
492 mutable GrIndexBuffer* fQuadInd exBuffer; 490 mutable GrIndexBuffer* fQuadInd exBuffer;
493 491
494 typedef GrClipTarget INHERITED; 492 typedef GrClipTarget INHERITED;
495 }; 493 };
496 494
497 #endif 495 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698