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

Unified Diff: src/gpu/GrDrawTarget.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.h
diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h
index 4545f74d256c6c7849d8e2f636295030c12ef508..955581b68368f7f3cddd766994a077b924e12d55 100644
--- a/src/gpu/GrDrawTarget.h
+++ b/src/gpu/GrDrawTarget.h
@@ -410,21 +410,17 @@ public:
const SkRect* devBounds = NULL);
/**
- * Clear the current render target if one isn't passed in. Ignores the
- * clip and all other draw state (blend mode, stages, etc). Clears the
- * whole thing if rect is NULL, otherwise just the rect. If canIgnoreRect
- * is set then the entire render target can be optionally cleared.
+ * Clear the passed in render target. Ignores the draw state and clip. Clears the whole thing if
+ * rect is NULL, otherwise just the rect. If canIgnoreRect is set then the entire render target
+ * can be optionally cleared.
*/
- virtual void clear(const SkIRect* rect,
- GrColor color,
- bool canIgnoreRect,
- GrRenderTarget* renderTarget = NULL) = 0;
+ virtual void clear(const SkIRect* rect, GrColor color, bool canIgnoreRect,
+ GrRenderTarget* renderTarget) = 0;
/**
- * Discards the contents render target. NULL indicates that the current render target should
- * be discarded.
+ * Discards the contents render target.
**/
- virtual void discard(GrRenderTarget* = NULL) = 0;
+ virtual void discard(GrRenderTarget*) = 0;
/**
* Called at start and end of gpu trace marking
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698