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

Unified Diff: gm/convexpolyeffect.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 | « gm/beziereffects.cpp ('k') | gm/rrects.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/convexpolyeffect.cpp
diff --git a/gm/convexpolyeffect.cpp b/gm/convexpolyeffect.cpp
index 4f84c615d45a0df166d39dad4d97269c6ce4bcd3..e567208c1e9e7e674ba24e3d4fa9f8ae6b7331f9 100644
--- a/gm/convexpolyeffect.cpp
+++ b/gm/convexpolyeffect.cpp
@@ -24,7 +24,7 @@
namespace skiagm {
/**
- * This GM directly exercises a GrEffect that draws convex polygons.
+ * This GM directly exercises a GrProcessor that draws convex polygons.
*/
class ConvexPolyEffect : public GM {
public:
@@ -113,7 +113,7 @@ protected:
const SkPath* path = iter.get();
SkScalar x = 0;
- for (int et = 0; et < kGrEffectEdgeTypeCnt; ++et) {
+ for (int et = 0; et < kGrProcessorEdgeTypeCnt; ++et) {
GrTestTarget tt;
context->getTestTarget(&tt);
if (NULL == tt.target()) {
@@ -127,12 +127,12 @@ protected:
m.setTranslate(x, y);
path->transform(m, &p);
- GrEffectEdgeType edgeType = (GrEffectEdgeType) et;
- SkAutoTUnref<GrEffect> effect(GrConvexPolyEffect::Create(edgeType, p));
- if (!effect) {
+ GrPrimitiveEdgeType edgeType = (GrPrimitiveEdgeType) et;
+ SkAutoTUnref<GrFragmentProcessor> fp(GrConvexPolyEffect::Create(edgeType, p));
+ if (!fp) {
continue;
}
- drawState->addCoverageEffect(effect);
+ drawState->addCoverageProcessor(fp);
drawState->setIdentityViewMatrix();
drawState->setRenderTarget(rt);
drawState->setColor(0xff000000);
@@ -170,7 +170,7 @@ protected:
SkScalar x = 0;
- for (int et = 0; et < kGrEffectEdgeTypeCnt; ++et) {
+ for (int et = 0; et < kGrProcessorEdgeTypeCnt; ++et) {
GrTestTarget tt;
context->getTestTarget(&tt);
if (NULL == tt.target()) {
@@ -179,14 +179,14 @@ protected:
}
SkRect rect = *iter.get();
rect.offset(x, y);
- GrEffectEdgeType edgeType = (GrEffectEdgeType) et;
- SkAutoTUnref<GrEffect> effect(GrConvexPolyEffect::Create(edgeType, rect));
- if (!effect) {
+ GrPrimitiveEdgeType edgeType = (GrPrimitiveEdgeType) et;
+ SkAutoTUnref<GrFragmentProcessor> fp(GrConvexPolyEffect::Create(edgeType, rect));
+ if (!fp) {
continue;
}
GrDrawState* drawState = tt.target()->drawState();
- drawState->addCoverageEffect(effect);
+ drawState->addCoverageProcessor(fp);
drawState->setIdentityViewMatrix();
drawState->setRenderTarget(rt);
drawState->setColor(0xff000000);
« no previous file with comments | « gm/beziereffects.cpp ('k') | gm/rrects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698