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

Unified Diff: src/gpu/gl/GrGpuGL.cpp

Issue 53823003: Add can-ignore-rect hint to clear call (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: cleaned up Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« src/gpu/GrDrawTarget.h ('K') | « src/gpu/gl/GrGpuGL.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGpuGL.cpp
===================================================================
--- src/gpu/gl/GrGpuGL.cpp (revision 12054)
+++ src/gpu/gl/GrGpuGL.cpp (working copy)
@@ -1255,12 +1255,16 @@
}
}
-void GrGpuGL::onClear(const SkIRect* rect, GrColor color) {
+void GrGpuGL::onClear(const SkIRect* rect, GrColor color, bool canIgnoreRect) {
const GrDrawState& drawState = this->getDrawState();
const GrRenderTarget* rt = drawState.getRenderTarget();
// parent class should never let us get here with no RT
SkASSERT(NULL != rt);
+ if (canIgnoreRect && this->glCaps().fullClearIsFree()) {
+ rect = NULL;
+ }
+
SkIRect clippedRect;
if (NULL != rect) {
// flushScissor expects rect to be clipped to the target.
« src/gpu/GrDrawTarget.h ('K') | « src/gpu/gl/GrGpuGL.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698