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

Unified Diff: gm/beziereffects.cpp

Issue 582963002: Solo gp (Closed) Base URL: https://skia.googlesource.com/skia.git@no_peb
Patch Set: rebase Created 6 years, 3 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 | « no previous file | gm/convexpolyeffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/beziereffects.cpp
diff --git a/gm/beziereffects.cpp b/gm/beziereffects.cpp
index 924f2a5c40350841671e81bcf19cd3705f9c7a83..ec7e83e763bd0d4cda3ad6b781e7fc880ba62500 100644
--- a/gm/beziereffects.cpp
+++ b/gm/beziereffects.cpp
@@ -26,7 +26,7 @@
namespace {
extern const GrVertexAttrib kAttribs[] = {
{kVec2f_GrVertexAttribType, 0, kPosition_GrVertexAttribBinding},
- {kVec4f_GrVertexAttribType, sizeof(SkPoint), kEffect_GrVertexAttribBinding}
+ {kVec4f_GrVertexAttribType, sizeof(SkPoint), kGeometryProcessor_GrVertexAttribBinding}
};
}
@@ -92,17 +92,17 @@ protected:
{rand.nextRangeF(0.f, w), rand.nextRangeF(0.f, h)},
{rand.nextRangeF(0.f, w), rand.nextRangeF(0.f, h)}
};
- for(int edgeType = 0; edgeType < kGrEffectEdgeTypeCnt; ++edgeType) {
- SkAutoTUnref<GrEffect> effect;
+ for(int edgeType = 0; edgeType < kGrProcessorEdgeTypeCnt; ++edgeType) {
+ SkAutoTUnref<GrGeometryProcessor> gp;
{ // scope to contain GrTestTarget
GrTestTarget tt;
context->getTestTarget(&tt);
if (NULL == tt.target()) {
continue;
}
- GrEffectEdgeType et = (GrEffectEdgeType)edgeType;
- effect.reset(GrCubicEffect::Create(et, *tt.target()->caps()));
- if (!effect) {
+ GrPrimitiveEdgeType et = (GrPrimitiveEdgeType)edgeType;
+ gp.reset(GrCubicEffect::Create(et, *tt.target()->caps()));
+ if (!gp) {
continue;
}
}
@@ -170,7 +170,7 @@ protected:
GrDrawState* drawState = tt.target()->drawState();
drawState->setVertexAttribs<kAttribs>(2, sizeof(Vertex));
- drawState->setGeometryProcessor(effect);
+ drawState->setGeometryProcessor(gp);
drawState->setRenderTarget(rt);
drawState->setColor(0xff000000);
@@ -250,17 +250,17 @@ protected:
{rand.nextRangeF(0.f, w), rand.nextRangeF(0.f, h)}
};
SkScalar weight = rand.nextRangeF(0.f, 2.f);
- for(int edgeType = 0; edgeType < kGrEffectEdgeTypeCnt; ++edgeType) {
- SkAutoTUnref<GrEffect> effect;
+ for(int edgeType = 0; edgeType < kGrProcessorEdgeTypeCnt; ++edgeType) {
+ SkAutoTUnref<GrGeometryProcessor> gp;
{ // scope to contain GrTestTarget
GrTestTarget tt;
context->getTestTarget(&tt);
if (NULL == tt.target()) {
continue;
}
- GrEffectEdgeType et = (GrEffectEdgeType)edgeType;
- effect.reset(GrConicEffect::Create(et, *tt.target()->caps()));
- if (!effect) {
+ GrPrimitiveEdgeType et = (GrPrimitiveEdgeType)edgeType;
+ gp.reset(GrConicEffect::Create(et, *tt.target()->caps()));
+ if (!gp) {
continue;
}
}
@@ -325,7 +325,7 @@ protected:
GrDrawState* drawState = tt.target()->drawState();
drawState->setVertexAttribs<kAttribs>(2, sizeof(Vertex));
- drawState->setGeometryProcessor(effect);
+ drawState->setGeometryProcessor(gp);
drawState->setRenderTarget(rt);
drawState->setColor(0xff000000);
@@ -439,17 +439,17 @@ protected:
{rand.nextRangeF(0.f, w), rand.nextRangeF(0.f, h)},
{rand.nextRangeF(0.f, w), rand.nextRangeF(0.f, h)}
};
- for(int edgeType = 0; edgeType < kGrEffectEdgeTypeCnt; ++edgeType) {
- SkAutoTUnref<GrEffect> effect;
+ for(int edgeType = 0; edgeType < kGrProcessorEdgeTypeCnt; ++edgeType) {
+ SkAutoTUnref<GrGeometryProcessor> gp;
{ // scope to contain GrTestTarget
GrTestTarget tt;
context->getTestTarget(&tt);
if (NULL == tt.target()) {
continue;
}
- GrEffectEdgeType et = (GrEffectEdgeType)edgeType;
- effect.reset(GrQuadEffect::Create(et, *tt.target()->caps()));
- if (!effect) {
+ GrPrimitiveEdgeType et = (GrPrimitiveEdgeType)edgeType;
+ gp.reset(GrQuadEffect::Create(et, *tt.target()->caps()));
+ if (!gp) {
continue;
}
}
@@ -509,7 +509,7 @@ protected:
GrDrawState* drawState = tt.target()->drawState();
drawState->setVertexAttribs<kAttribs>(2, sizeof(Vertex));
- drawState->setGeometryProcessor(effect);
+ drawState->setGeometryProcessor(gp);
drawState->setRenderTarget(rt);
drawState->setColor(0xff000000);
« no previous file with comments | « no previous file | gm/convexpolyeffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698