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

Unified Diff: src/gpu/GrDrawContext.cpp

Issue 2230513004: Re-adding analytical GeoProc for rectangles (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 4 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/GrDrawContext.cpp
diff --git a/src/gpu/GrDrawContext.cpp b/src/gpu/GrDrawContext.cpp
index 344ae1c2ab0ad81d9a877963ffff16ef8c1e82f2..a47d715a4588bd630960b7455b4ab40bd6797abd 100644
--- a/src/gpu/GrDrawContext.cpp
+++ b/src/gpu/GrDrawContext.cpp
@@ -14,6 +14,7 @@
#include "GrOvalRenderer.h"
#include "GrPathRenderer.h"
#include "GrPipelineBuilder.h"
+#include "GrRectRenderer.h"
#include "GrRenderTarget.h"
#include "GrRenderTargetPriv.h"
#include "GrResourceProvider.h"
@@ -390,8 +391,15 @@ bool GrDrawContext::drawFilledRect(const GrClip& clip,
SkRect devBoundRect;
viewMatrix.mapRect(&devBoundRect, croppedRect);
- batch.reset(GrRectBatchFactory::CreateAAFill(paint.getColor(), viewMatrix,
- croppedRect, devBoundRect));
+ if (!paint.usesDistanceVectorField()) {
+ batch.reset(GrRectBatchFactory::CreateAAFill(paint.getColor(), viewMatrix,
+ croppedRect, devBoundRect));
+ } else {
+ batch.reset(GrRectRenderer::CreateAnalyticRectBatch(paint.getColor(), viewMatrix,
egdaniel 2016/08/12 17:37:06 Why not put the decision on which batch to draw in
dvonbeck 2016/08/12 18:29:48 Done.
+ rect, croppedRect,
+ devBoundRect));
+ }
+
if (batch) {
GrPipelineBuilder pipelineBuilder(paint, useHWAA);
if (ss) {
« no previous file with comments | « src/gpu/GrBatchTest.cpp ('k') | src/gpu/GrRectRenderer.h » ('j') | src/gpu/GrRectRenderer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698