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

Unified Diff: src/gpu/GrAARectRenderer.cpp

Issue 858343002: Rename GrOptDrawState to GrPipeline and GrDrawState to GrPipelineBuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more nits Created 5 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
« no previous file with comments | « src/gpu/GrAARectRenderer.h ('k') | src/gpu/GrBitmapTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAARectRenderer.cpp
diff --git a/src/gpu/GrAARectRenderer.cpp b/src/gpu/GrAARectRenderer.cpp
index 444bb519ac35f08ae1052489318eba77680aad63..0ffdd4d9f92d5f8694ab3dcbd52c734d164a9b1d 100644
--- a/src/gpu/GrAARectRenderer.cpp
+++ b/src/gpu/GrAARectRenderer.cpp
@@ -25,13 +25,13 @@ enum CoverageAttribType {
};
}
-static const GrGeometryProcessor* create_rect_gp(const GrDrawState& drawState,
+static const GrGeometryProcessor* create_rect_gp(const GrPipelineBuilder& pipelineBuilder,
GrColor color,
CoverageAttribType* type,
const SkMatrix& localMatrix) {
uint32_t flags = GrDefaultGeoProcFactory::kColor_GPType;
const GrGeometryProcessor* gp;
- if (drawState.canTweakAlphaForCoverage()) {
+ if (pipelineBuilder.canTweakAlphaForCoverage()) {
gp = GrDefaultGeoProcFactory::Create(flags, color, SkMatrix::I(), localMatrix);
SkASSERT(gp->getVertexStride() == sizeof(GrDefaultGeoProcFactory::PositionColorAttr));
*type = kUseColor_CoverageAttribType;
@@ -179,12 +179,12 @@ GrIndexBuffer* GrAARectRenderer::aaStrokeRectIndexBuffer(bool miterStroke) {
}
void GrAARectRenderer::geometryFillAARect(GrDrawTarget* target,
- GrDrawState* drawState,
+ GrPipelineBuilder* pipelineBuilder,
GrColor color,
const SkMatrix& viewMatrix,
const SkRect& rect,
const SkRect& devRect) {
- GrDrawState::AutoRestoreEffects are(drawState);
+ GrPipelineBuilder::AutoRestoreEffects are(pipelineBuilder);
SkMatrix localMatrix;
if (!viewMatrix.invert(&localMatrix)) {
@@ -193,7 +193,7 @@ void GrAARectRenderer::geometryFillAARect(GrDrawTarget* target,
}
CoverageAttribType type;
- SkAutoTUnref<const GrGeometryProcessor> gp(create_rect_gp(*drawState, color, &type,
+ SkAutoTUnref<const GrGeometryProcessor> gp(create_rect_gp(*pipelineBuilder, color, &type,
localMatrix));
size_t vertexStride = gp->getVertexStride();
@@ -306,7 +306,7 @@ void GrAARectRenderer::geometryFillAARect(GrDrawTarget* target,
}
target->setIndexSourceToBuffer(indexBuffer);
- target->drawIndexedInstances(drawState,
+ target->drawIndexedInstances(pipelineBuilder,
gp,
kTriangles_GrPrimitiveType,
1,
@@ -316,7 +316,7 @@ void GrAARectRenderer::geometryFillAARect(GrDrawTarget* target,
}
void GrAARectRenderer::strokeAARect(GrDrawTarget* target,
- GrDrawState* drawState,
+ GrPipelineBuilder* pipelineBuilder,
GrColor color,
const SkMatrix& viewMatrix,
const SkRect& rect,
@@ -364,7 +364,7 @@ void GrAARectRenderer::strokeAARect(GrDrawTarget* target,
}
if (spare <= 0 && miterStroke) {
- this->fillAARect(target, drawState, color, viewMatrix, devOutside,
+ this->fillAARect(target, pipelineBuilder, color, viewMatrix, devOutside,
devOutside);
return;
}
@@ -382,19 +382,19 @@ void GrAARectRenderer::strokeAARect(GrDrawTarget* target,
devOutsideAssist.outset(0, ry);
}
- this->geometryStrokeAARect(target, drawState, color, viewMatrix, devOutside, devOutsideAssist,
+ this->geometryStrokeAARect(target, pipelineBuilder, color, viewMatrix, devOutside, devOutsideAssist,
devInside, miterStroke);
}
void GrAARectRenderer::geometryStrokeAARect(GrDrawTarget* target,
- GrDrawState* drawState,
+ GrPipelineBuilder* pipelineBuilder,
GrColor color,
const SkMatrix& viewMatrix,
const SkRect& devOutside,
const SkRect& devOutsideAssist,
const SkRect& devInside,
bool miterStroke) {
- GrDrawState::AutoRestoreEffects are(drawState);
+ GrPipelineBuilder::AutoRestoreEffects are(pipelineBuilder);
SkMatrix localMatrix;
if (!viewMatrix.invert(&localMatrix)) {
@@ -403,7 +403,7 @@ void GrAARectRenderer::geometryStrokeAARect(GrDrawTarget* target,
}
CoverageAttribType type;
- SkAutoTUnref<const GrGeometryProcessor> gp(create_rect_gp(*drawState, color, &type,
+ SkAutoTUnref<const GrGeometryProcessor> gp(create_rect_gp(*pipelineBuilder, color, &type,
localMatrix));
int innerVertexNum = 4;
@@ -517,7 +517,7 @@ void GrAARectRenderer::geometryStrokeAARect(GrDrawTarget* target,
}
target->setIndexSourceToBuffer(indexBuffer);
- target->drawIndexedInstances(drawState,
+ target->drawIndexedInstances(pipelineBuilder,
gp,
kTriangles_GrPrimitiveType,
1,
@@ -527,7 +527,7 @@ void GrAARectRenderer::geometryStrokeAARect(GrDrawTarget* target,
}
void GrAARectRenderer::fillAANestedRects(GrDrawTarget* target,
- GrDrawState* drawState,
+ GrPipelineBuilder* pipelineBuilder,
GrColor color,
const SkMatrix& viewMatrix,
const SkRect rects[2]) {
@@ -540,11 +540,11 @@ void GrAARectRenderer::fillAANestedRects(GrDrawTarget* target,
viewMatrix.mapPoints((SkPoint*)&devInside, (const SkPoint*)&rects[1], 2);
if (devInside.isEmpty()) {
- this->fillAARect(target, drawState, color, viewMatrix, devOutside,
+ this->fillAARect(target, pipelineBuilder, color, viewMatrix, devOutside,
devOutside);
return;
}
- this->geometryStrokeAARect(target, drawState, color, viewMatrix, devOutside, devOutsideAssist,
- devInside, true);
+ this->geometryStrokeAARect(target, pipelineBuilder, color, viewMatrix, devOutside,
+ devOutsideAssist, devInside, true);
}
« no previous file with comments | « src/gpu/GrAARectRenderer.h ('k') | src/gpu/GrBitmapTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698