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

Unified Diff: src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp

Issue 1225923010: Refugee from Dead Machine 4: MDB Monster Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Last update from dead machine Created 4 years, 8 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/effects/gradients/SkTwoPointConicalGradient_gpu.h ('k') | src/gpu/GrAtlas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp
diff --git a/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp b/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp
index dec3e96bdb704d21cd89e930ff68078153a48397..a820a23a20a16019fed5f48cdd3aaf8a7ea6d9fc 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp
+++ b/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp
@@ -63,8 +63,8 @@ public:
static GrFragmentProcessor* Create(GrContext* ctx,
const SkTwoPointConicalGradient& shader,
const SkMatrix& matrix,
- SkShader::TileMode tm) {
- return new Edge2PtConicalEffect(ctx, shader, matrix, tm);
+ SkShader::TileMode tm, GrRenderTarget* dst) {
+ return new Edge2PtConicalEffect(ctx, shader, matrix, tm, dst);
}
virtual ~Edge2PtConicalEffect() {}
@@ -94,8 +94,8 @@ private:
Edge2PtConicalEffect(GrContext* ctx,
const SkTwoPointConicalGradient& shader,
const SkMatrix& matrix,
- SkShader::TileMode tm)
- : INHERITED(ctx, shader, matrix, tm),
+ SkShader::TileMode tm, GrRenderTarget* dst)
+ : INHERITED(ctx, shader, matrix, tm, dst),
fCenterX1(shader.getCenterX1()),
fRadius0(shader.getStartRadius()),
fDiffRadius(shader.getDiffRadius()){
@@ -210,7 +210,7 @@ const GrFragmentProcessor* Edge2PtConicalEffect::TestCreate(GrProcessorTestData*
colors, stops, colorCount,
tm));
const GrFragmentProcessor* fp = shader->asFragmentProcessor(d->fContext,
- GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality);
+ GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality, NULL);
GrAlwaysAssert(fp);
return fp;
}
@@ -371,8 +371,8 @@ public:
const SkTwoPointConicalGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm,
- SkScalar focalX) {
- return new FocalOutside2PtConicalEffect(ctx, shader, matrix, tm, focalX);
+ SkScalar focalX, GrRenderTarget* dst) {
+ return new FocalOutside2PtConicalEffect(ctx, shader, matrix, tm, focalX, dst);
}
virtual ~FocalOutside2PtConicalEffect() { }
@@ -400,8 +400,8 @@ private:
const SkTwoPointConicalGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm,
- SkScalar focalX)
- : INHERITED(ctx, shader, matrix, tm)
+ SkScalar focalX, GrRenderTarget* dst)
+ : INHERITED(ctx, shader, matrix, tm, dst)
, fFocalX(focalX)
, fIsFlipped(shader.isFlippedGrad()) {
this->initClassID<FocalOutside2PtConicalEffect>();
@@ -484,7 +484,7 @@ const GrFragmentProcessor* FocalOutside2PtConicalEffect::TestCreate(GrProcessorT
colors, stops, colorCount,
tm));
const GrFragmentProcessor* fp = shader->asFragmentProcessor(d->fContext,
- GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality);
+ GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality, NULL);
GrAlwaysAssert(fp);
return fp;
}
@@ -580,8 +580,8 @@ public:
const SkTwoPointConicalGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm,
- SkScalar focalX) {
- return new FocalInside2PtConicalEffect(ctx, shader, matrix, tm, focalX);
+ SkScalar focalX, GrRenderTarget* dst) {
+ return new FocalInside2PtConicalEffect(ctx, shader, matrix, tm, focalX, dst);
}
virtual ~FocalInside2PtConicalEffect() {}
@@ -609,8 +609,8 @@ private:
const SkTwoPointConicalGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm,
- SkScalar focalX)
- : INHERITED(ctx, shader, matrix, tm), fFocalX(focalX) {
+ SkScalar focalX, GrRenderTarget* dst)
+ : INHERITED(ctx, shader, matrix, tm, dst), fFocalX(focalX) {
this->initClassID<FocalInside2PtConicalEffect>();
}
@@ -690,7 +690,7 @@ const GrFragmentProcessor* FocalInside2PtConicalEffect::TestCreate(GrProcessorTe
colors, stops, colorCount,
tm));
const GrFragmentProcessor* fp = shader->asFragmentProcessor(d->fContext,
- GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality);
+ GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality, NULL);
GrAlwaysAssert(fp);
return fp;
}
@@ -813,8 +813,8 @@ public:
const SkTwoPointConicalGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm,
- const CircleConicalInfo& info) {
- return new CircleInside2PtConicalEffect(ctx, shader, matrix, tm, info);
+ const CircleConicalInfo& info, GrRenderTarget* dst) {
+ return new CircleInside2PtConicalEffect(ctx, shader, matrix, tm, info, dst);
}
virtual ~CircleInside2PtConicalEffect() {}
@@ -846,8 +846,8 @@ private:
const SkTwoPointConicalGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm,
- const CircleConicalInfo& info)
- : INHERITED(ctx, shader, matrix, tm), fInfo(info) {
+ const CircleConicalInfo& info, GrRenderTarget* dst)
+ : INHERITED(ctx, shader, matrix, tm, dst), fInfo(info) {
this->initClassID<CircleInside2PtConicalEffect>();
}
@@ -931,7 +931,7 @@ const GrFragmentProcessor* CircleInside2PtConicalEffect::TestCreate(GrProcessorT
colors, stops, colorCount,
tm));
const GrFragmentProcessor* fp = shader->asFragmentProcessor(d->fContext,
- GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality);
+ GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality, NULL);
GrAlwaysAssert(fp);
return fp;
}
@@ -1023,8 +1023,8 @@ public:
const SkTwoPointConicalGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm,
- const CircleConicalInfo& info) {
- return new CircleOutside2PtConicalEffect(ctx, shader, matrix, tm, info);
+ const CircleConicalInfo& info, GrRenderTarget* dst) {
+ return new CircleOutside2PtConicalEffect(ctx, shader, matrix, tm, info, dst);
}
virtual ~CircleOutside2PtConicalEffect() {}
@@ -1059,8 +1059,8 @@ private:
const SkTwoPointConicalGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm,
- const CircleConicalInfo& info)
- : INHERITED(ctx, shader, matrix, tm), fInfo(info) {
+ const CircleConicalInfo& info, GrRenderTarget* dst)
+ : INHERITED(ctx, shader, matrix, tm, dst), fInfo(info) {
this->initClassID<CircleOutside2PtConicalEffect>();
if (shader.getStartRadius() != shader.getEndRadius()) {
fTLimit = shader.getStartRadius() / (shader.getStartRadius() - shader.getEndRadius());
@@ -1157,7 +1157,7 @@ const GrFragmentProcessor* CircleOutside2PtConicalEffect::TestCreate(GrProcessor
colors, stops, colorCount,
tm));
const GrFragmentProcessor* fp = shader->asFragmentProcessor(
- d->fContext,GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality);
+ d->fContext,GrTest::TestMatrix(d->fRandom), NULL, kNone_SkFilterQuality, NULL);
GrAlwaysAssert(fp);
return fp;
}
@@ -1271,7 +1271,7 @@ void GLCircleOutside2PtConicalEffect::GenKey(const GrProcessor& processor,
GrFragmentProcessor* Gr2PtConicalGradientEffect::Create(GrContext* ctx,
const SkTwoPointConicalGradient& shader,
SkShader::TileMode tm,
- const SkMatrix* localMatrix) {
+ const SkMatrix* localMatrix, GrRenderTarget* dst) {
SkMatrix matrix;
if (!shader.getLocalMatrix().invert(&matrix)) {
return nullptr;
@@ -1288,12 +1288,14 @@ GrFragmentProcessor* Gr2PtConicalGradientEffect::Create(GrContext* ctx,
SkScalar focalX;
ConicalType type = set_matrix_focal_conical(shader, &matrix, &focalX);
if (type == kInside_ConicalType) {
- return FocalInside2PtConicalEffect::Create(ctx, shader, matrix, tm, focalX);
+ return FocalInside2PtConicalEffect::Create(ctx, shader, matrix, tm,
+ focalX, dst);
} else if(type == kEdge_ConicalType) {
set_matrix_edge_conical(shader, &matrix);
- return Edge2PtConicalEffect::Create(ctx, shader, matrix, tm);
+ return Edge2PtConicalEffect::Create(ctx, shader, matrix, tm, dst);
} else {
- return FocalOutside2PtConicalEffect::Create(ctx, shader, matrix, tm, focalX);
+ return FocalOutside2PtConicalEffect::Create(ctx, shader, matrix, tm,
+ focalX, dst);
}
}
@@ -1301,12 +1303,14 @@ GrFragmentProcessor* Gr2PtConicalGradientEffect::Create(GrContext* ctx,
ConicalType type = set_matrix_circle_conical(shader, &matrix, &info);
if (type == kInside_ConicalType) {
- return CircleInside2PtConicalEffect::Create(ctx, shader, matrix, tm, info);
+ return CircleInside2PtConicalEffect::Create(ctx, shader, matrix, tm,
+ info, dst);
} else if (type == kEdge_ConicalType) {
set_matrix_edge_conical(shader, &matrix);
- return Edge2PtConicalEffect::Create(ctx, shader, matrix, tm);
+ return Edge2PtConicalEffect::Create(ctx, shader, matrix, tm, dst);
} else {
- return CircleOutside2PtConicalEffect::Create(ctx, shader, matrix, tm, info);
+ return CircleOutside2PtConicalEffect::Create(ctx, shader, matrix, tm,
+ info, dst);
}
}
« no previous file with comments | « src/effects/gradients/SkTwoPointConicalGradient_gpu.h ('k') | src/gpu/GrAtlas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698