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

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 2136643002: Revert of Add choke point for modifying non-AA rect draws (e.g., applying clipping) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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/GrDrawContext.cpp ('k') | src/gpu/batches/GrDefaultPathRenderer.cpp » ('j') | 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 bffe2f9740958fa0ad94f0774edd6bd45818a4aa..8beaade32c16b2d8ceb7f163963c2f38dea7b96f 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -469,13 +469,15 @@
drawContext->discard();
}
+ // TODO: flip this into real draw!
+ GrPipelineBuilder pipelineBuilder;
+ pipelineBuilder.setXPFactory(GrPorterDuffXPFactory::Make(SkXfermode::kSrc_Mode));
+
SkRect scalarRect = SkRect::Make(*rect);
-
- GrPaint paint;
- paint.setColor4f(GrColor4f::FromGrColor(color));
- paint.setXPFactory(GrPorterDuffXPFactory::Make(SkXfermode::kSrc_Mode));
-
- drawContext->drawRect(GrNoClip(), paint, SkMatrix::I(), scalarRect);
+ SkAutoTUnref<GrDrawBatch> batch(
+ GrRectBatchFactory::CreateNonAAFill(color, SkMatrix::I(), scalarRect,
+ nullptr, nullptr));
+ this->drawBatch(pipelineBuilder, drawContext, GrNoClip(), batch);
} else {
GrBatch* batch = new GrClearBatch(*rect, color, drawContext->accessRenderTarget());
this->recordBatch(batch, batch->bounds());
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/batches/GrDefaultPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698