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

Unified Diff: src/gpu/GrCommandBuilder.cpp

Issue 1275543005: Move some work from backend onClear to base class clear (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Move up to DrawTarget 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 side-by-side diff with in-line comments
Download patch
Index: src/gpu/GrCommandBuilder.cpp
diff --git a/src/gpu/GrCommandBuilder.cpp b/src/gpu/GrCommandBuilder.cpp
index 28c0cf2bdb5f58f466ea932732322c4ba7175f15..13191ad0279e08ec3ef0221179e4e1df7e2130a6 100644
--- a/src/gpu/GrCommandBuilder.cpp
+++ b/src/gpu/GrCommandBuilder.cpp
@@ -20,26 +20,14 @@ GrCommandBuilder* GrCommandBuilder::Create(GrGpu* gpu, bool reorder) {
GrTargetCommands::Cmd* GrCommandBuilder::recordClear(const SkIRect* rect,
GrColor color,
- bool canIgnoreRect,
GrRenderTarget* renderTarget) {
SkASSERT(renderTarget);
-
- SkIRect r;
- if (NULL == rect) {
- // We could do something smart and remove previous draws and clears to
- // the current render target. If we get that smart we have to make sure
- // those draws aren't read before this clear (render-to-texture).
- r.setLTRB(0, 0, renderTarget->width(), renderTarget->height());
- rect = &r;
- }
-
- SkASSERT(canIgnoreRect || (rect->fLeft <= rect->fRight && rect->fTop <= rect->fBottom));
+ SkASSERT(rect->fLeft <= rect->fRight && rect->fTop <= rect->fBottom);
Clear* clr = GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), Clear, (renderTarget));
GrColorIsPMAssert(color);
clr->fColor = color;
clr->fRect = *rect;
- clr->fCanIgnoreRect = canIgnoreRect;
return clr;
}
« no previous file with comments | « src/gpu/GrCommandBuilder.h ('k') | src/gpu/GrDrawTarget.h » ('j') | src/gpu/GrGpu.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698