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

Unified Diff: src/gpu/GrContext.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
Index: src/gpu/GrContext.cpp
===================================================================
--- src/gpu/GrContext.cpp (revision 12054)
+++ src/gpu/GrContext.cpp (working copy)
@@ -645,10 +645,12 @@
void GrContext::clear(const SkIRect* rect,
const GrColor color,
+ bool canIgnoreRect,
GrRenderTarget* target) {
AutoRestoreEffects are;
AutoCheckFlush acf(this);
- this->prepareToDraw(NULL, BUFFERED_DRAW, &are, &acf)->clear(rect, color, target);
+ this->prepareToDraw(NULL, BUFFERED_DRAW, &are, &acf)->clear(rect, color,
+ canIgnoreRect, target);
}
void GrContext::drawPaint(const GrPaint& origPaint) {
@@ -833,7 +835,7 @@
// Will it blend?
GrColor clearColor;
if (paint.isOpaqueAndConstantColor(&clearColor)) {
- target->clear(NULL, clearColor);
+ target->clear(NULL, clearColor, true);
return;
}
}
« no previous file with comments | « src/gpu/GrClipMaskManager.cpp ('k') | src/gpu/GrDrawTarget.h » ('j') | src/gpu/GrDrawTarget.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698