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

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: Pass references and rebase 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
« no previous file with comments | « src/gpu/GrCommandBuilder.h ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrCommandBuilder.cpp
diff --git a/src/gpu/GrCommandBuilder.cpp b/src/gpu/GrCommandBuilder.cpp
index 28c0cf2bdb5f58f466ea932732322c4ba7175f15..d93a1fab54a9cedbfdeff062da95ba8584a14745 100644
--- a/src/gpu/GrCommandBuilder.cpp
+++ b/src/gpu/GrCommandBuilder.cpp
@@ -18,28 +18,16 @@ GrCommandBuilder* GrCommandBuilder::Create(GrGpu* gpu, bool reorder) {
}
}
-GrTargetCommands::Cmd* GrCommandBuilder::recordClear(const SkIRect* rect,
+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;
+ clr->fRect = rect;
return clr;
}
« no previous file with comments | « src/gpu/GrCommandBuilder.h ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698