Chromium Code Reviews| 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) { |