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

Unified Diff: src/gpu/GrOvalRenderer.cpp

Issue 1726223008: Hide GrPipelineBuilder from GrOvalRenderer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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/GrOvalRenderer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrOvalRenderer.cpp
diff --git a/src/gpu/GrOvalRenderer.cpp b/src/gpu/GrOvalRenderer.cpp
index 1c41f27b079752136ad108e6ec5f13410f8f7a65..1fb214a260ed432a0e1824e2e576f79b6e5fb310 100644
--- a/src/gpu/GrOvalRenderer.cpp
+++ b/src/gpu/GrOvalRenderer.cpp
@@ -11,7 +11,6 @@
#include "GrBatchTest.h"
#include "GrGeometryProcessor.h"
#include "GrInvariantOutput.h"
-#include "GrPipelineBuilder.h"
#include "GrProcessor.h"
#include "GrResourceProvider.h"
#include "SkRRect.h"
@@ -580,18 +579,11 @@ const GrGeometryProcessor* DIEllipseEdgeEffect::TestCreate(GrProcessorTestData*
///////////////////////////////////////////////////////////////////////////////
-GrDrawBatch* GrOvalRenderer::CreateOvalBatch(const GrPipelineBuilder& pipelineBuilder,
- GrColor color,
+GrDrawBatch* GrOvalRenderer::CreateOvalBatch(GrColor color,
const SkMatrix& viewMatrix,
- bool useAA,
const SkRect& oval,
const SkStrokeRec& stroke,
GrShaderCaps* shaderCaps) {
- bool useCoverageAA = useAA && !pipelineBuilder.getRenderTarget()->isUnifiedMultisampled();
- if (!useCoverageAA) {
- return nullptr;
- }
-
// we can draw circles
if (SkScalarNearlyEqual(oval.width(), oval.height()) && circle_stays_circle(viewMatrix)) {
return CreateCircleBatch(color, viewMatrix, oval, stroke);
@@ -1890,23 +1882,13 @@ static GrDrawBatch* create_rrect_batch(GrColor color,
}
}
-GrDrawBatch* GrOvalRenderer::CreateRRectBatch(const GrPipelineBuilder& pipelineBuilder,
- GrColor color,
+GrDrawBatch* GrOvalRenderer::CreateRRectBatch(GrColor color,
const SkMatrix& viewMatrix,
- bool useAA,
const SkRRect& rrect,
const SkStrokeRec& stroke,
GrShaderCaps* shaderCaps) {
- bool useCoverageAA = useAA && !pipelineBuilder.getRenderTarget()->isUnifiedMultisampled();
-
- // only anti-aliased rrects for now
- if (!useCoverageAA) {
- return nullptr;
- }
-
if (rrect.isOval()) {
- return CreateOvalBatch(pipelineBuilder, color, viewMatrix, useAA,
- rrect.getBounds(), stroke, shaderCaps);
+ return CreateOvalBatch(color, viewMatrix, rrect.getBounds(), stroke, shaderCaps);
}
if (!viewMatrix.rectStaysRect() || !rrect.isSimple()) {
« no previous file with comments | « src/gpu/GrOvalRenderer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698