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

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 1579223003: Remove remaining users of draw*Rect calls (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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/GrClipMaskManager.cpp ('K') | « src/gpu/GrDrawTarget.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.cpp
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index 0389d92f482cb52f2abfabecc7443a62fd3667c4..e2e188eb12cf131d0781ddbc019b7f9d1372a784 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -350,25 +350,6 @@ void GrDrawTarget::drawPathBatch(const GrPipelineBuilder& pipelineBuilder,
this->recordBatch(batch);
}
-void GrDrawTarget::drawNonAARect(const GrPipelineBuilder& pipelineBuilder,
- GrColor color,
- const SkMatrix& viewMatrix,
- const SkRect& rect) {
- SkAutoTUnref<GrDrawBatch> batch(GrRectBatchFactory::CreateNonAAFill(color, viewMatrix, rect,
- nullptr, nullptr));
- this->drawBatch(pipelineBuilder, batch);
-}
-
-void GrDrawTarget::drawAARect(const GrPipelineBuilder& pipelineBuilder,
- GrColor color,
- const SkMatrix& viewMatrix,
- const SkRect& rect,
- const SkRect& devRect) {
- SkAutoTUnref<GrDrawBatch> batch(GrRectBatchFactory::CreateAAFill(color, viewMatrix, rect,
- devRect));
- this->drawBatch(pipelineBuilder, batch);
-}
-
void GrDrawTarget::clear(const SkIRect* rect,
GrColor color,
bool canIgnoreRect,
@@ -400,7 +381,11 @@ void GrDrawTarget::clear(const SkIRect* rect,
GrPorterDuffXPFactory::Create(SkXfermode::kSrc_Mode))->unref();
pipelineBuilder.setRenderTarget(renderTarget);
- this->drawNonAARect(pipelineBuilder, color, SkMatrix::I(), *rect);
+ SkRect scalarRect = SkRect::Make(*rect);
+ SkAutoTUnref<GrDrawBatch> batch(
+ GrRectBatchFactory::CreateNonAAFill(color, SkMatrix::I(), scalarRect,
+ nullptr, nullptr));
+ this->drawBatch(pipelineBuilder, batch);
} else {
GrBatch* batch = new GrClearBatch(*rect, color, renderTarget);
this->recordBatch(batch);
« src/gpu/GrClipMaskManager.cpp ('K') | « src/gpu/GrDrawTarget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698