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

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

Issue 1215643006: more threading of GrShaderDataManager (Closed) Base URL: https://skia.googlesource.com/skia.git@GrShaderDataManager3
Patch Set: tweaks Created 5 years, 5 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/effects/GrCustomXfermode.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 357e39c3adc6fee44097071b5dcae4eb6cd23311..07722e972477a9093809a73a97ea80f1a361f6f6 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp
+++ b/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp
@@ -59,10 +59,11 @@ class Edge2PtConicalEffect : public GrGradientEffect {
public:
static GrFragmentProcessor* Create(GrContext* ctx,
+ GrShaderDataManager* shaderDataManager,
const SkTwoPointConicalGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm) {
- return SkNEW_ARGS(Edge2PtConicalEffect, (ctx, shader, matrix, tm));
+ return SkNEW_ARGS(Edge2PtConicalEffect, (ctx, shaderDataManager, shader, matrix, tm));
}
virtual ~Edge2PtConicalEffect() {}
@@ -90,10 +91,11 @@ private:
}
Edge2PtConicalEffect(GrContext* ctx,
+ GrShaderDataManager* shaderDataManager,
const SkTwoPointConicalGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm)
- : INHERITED(ctx, shader, matrix, tm),
+ : INHERITED(ctx, shaderDataManager, shader, matrix, tm),
fCenterX1(shader.getCenterX1()),
fRadius0(shader.getStartRadius()),
fDiffRadius(shader.getDiffRadius()){
@@ -381,11 +383,13 @@ class FocalOutside2PtConicalEffect : public GrGradientEffect {
public:
static GrFragmentProcessor* Create(GrContext* ctx,
+ GrShaderDataManager* shaderDataManager,
const SkTwoPointConicalGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm,
SkScalar focalX) {
- return SkNEW_ARGS(FocalOutside2PtConicalEffect, (ctx, shader, matrix, tm, focalX));
+ return SkNEW_ARGS(FocalOutside2PtConicalEffect, (ctx, shaderDataManager, shader, matrix, tm,
+ focalX));
}
virtual ~FocalOutside2PtConicalEffect() { }
@@ -410,11 +414,14 @@ private:
}
FocalOutside2PtConicalEffect(GrContext* ctx,
+ GrShaderDataManager* shaderDataManager,
const SkTwoPointConicalGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm,
SkScalar focalX)
- : INHERITED(ctx, shader, matrix, tm), fFocalX(focalX), fIsFlipped(shader.isFlippedGrad()) {
+ : INHERITED(ctx, shaderDataManager, shader, matrix, tm)
+ , fFocalX(focalX)
+ , fIsFlipped(shader.isFlippedGrad()) {
this->initClassID<FocalOutside2PtConicalEffect>();
}
@@ -604,11 +611,13 @@ class FocalInside2PtConicalEffect : public GrGradientEffect {
public:
static GrFragmentProcessor* Create(GrContext* ctx,
+ GrShaderDataManager* shaderDataManager,
const SkTwoPointConicalGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm,
SkScalar focalX) {
- return SkNEW_ARGS(FocalInside2PtConicalEffect, (ctx, shader, matrix, tm, focalX));
+ return SkNEW_ARGS(FocalInside2PtConicalEffect, (ctx, shaderDataManager, shader, matrix, tm,
+ focalX));
}
virtual ~FocalInside2PtConicalEffect() {}
@@ -633,11 +642,12 @@ private:
}
FocalInside2PtConicalEffect(GrContext* ctx,
+ GrShaderDataManager* shaderDataManager,
const SkTwoPointConicalGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm,
SkScalar focalX)
- : INHERITED(ctx, shader, matrix, tm), fFocalX(focalX) {
+ : INHERITED(ctx, shaderDataManager, shader, matrix, tm), fFocalX(focalX) {
this->initClassID<FocalInside2PtConicalEffect>();
}
@@ -852,11 +862,13 @@ class CircleInside2PtConicalEffect : public GrGradientEffect {
public:
static GrFragmentProcessor* Create(GrContext* ctx,
+ GrShaderDataManager* shaderDataManager,
const SkTwoPointConicalGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm,
const CircleConicalInfo& info) {
- return SkNEW_ARGS(CircleInside2PtConicalEffect, (ctx, shader, matrix, tm, info));
+ return SkNEW_ARGS(CircleInside2PtConicalEffect, (ctx, shaderDataManager, shader, matrix, tm,
+ info));
}
virtual ~CircleInside2PtConicalEffect() {}
@@ -885,11 +897,12 @@ private:
}
CircleInside2PtConicalEffect(GrContext* ctx,
+ GrShaderDataManager* shaderDataManager,
const SkTwoPointConicalGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm,
const CircleConicalInfo& info)
- : INHERITED(ctx, shader, matrix, tm), fInfo(info) {
+ : INHERITED(ctx, shaderDataManager, shader, matrix, tm), fInfo(info) {
this->initClassID<CircleInside2PtConicalEffect>();
}
@@ -1077,11 +1090,13 @@ class CircleOutside2PtConicalEffect : public GrGradientEffect {
public:
static GrFragmentProcessor* Create(GrContext* ctx,
+ GrShaderDataManager* shaderDataManager,
const SkTwoPointConicalGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm,
const CircleConicalInfo& info) {
- return SkNEW_ARGS(CircleOutside2PtConicalEffect, (ctx, shader, matrix, tm, info));
+ return SkNEW_ARGS(CircleOutside2PtConicalEffect, (ctx, shaderDataManager, shader, matrix,
+ tm, info));
}
virtual ~CircleOutside2PtConicalEffect() {}
@@ -1113,11 +1128,12 @@ private:
}
CircleOutside2PtConicalEffect(GrContext* ctx,
+ GrShaderDataManager* shaderDataManager,
const SkTwoPointConicalGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm,
const CircleConicalInfo& info)
- : INHERITED(ctx, shader, matrix, tm), fInfo(info) {
+ : INHERITED(ctx, shaderDataManager, shader, matrix, tm), fInfo(info) {
this->initClassID<CircleOutside2PtConicalEffect>();
if (shader.getStartRadius() != shader.getEndRadius()) {
fTLimit = shader.getStartRadius() / (shader.getStartRadius() - shader.getEndRadius());
@@ -1341,6 +1357,7 @@ void GLCircleOutside2PtConicalEffect::GenKey(const GrProcessor& processor,
//////////////////////////////////////////////////////////////////////////////
GrFragmentProcessor* Gr2PtConicalGradientEffect::Create(GrContext* ctx,
+ GrShaderDataManager* shaderDataManager,
const SkTwoPointConicalGradient& shader,
SkShader::TileMode tm,
const SkMatrix* localMatrix) {
@@ -1360,12 +1377,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, shaderDataManager, shader, matrix, tm,
+ focalX);
} else if(type == kEdge_ConicalType) {
set_matrix_edge_conical(shader, &matrix);
- return Edge2PtConicalEffect::Create(ctx, shader, matrix, tm);
+ return Edge2PtConicalEffect::Create(ctx, shaderDataManager, shader, matrix, tm);
} else {
- return FocalOutside2PtConicalEffect::Create(ctx, shader, matrix, tm, focalX);
+ return FocalOutside2PtConicalEffect::Create(ctx, shaderDataManager, shader, matrix, tm,
+ focalX);
}
}
@@ -1373,12 +1392,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, shaderDataManager, shader, matrix, tm,
+ info);
} else if (type == kEdge_ConicalType) {
set_matrix_edge_conical(shader, &matrix);
- return Edge2PtConicalEffect::Create(ctx, shader, matrix, tm);
+ return Edge2PtConicalEffect::Create(ctx, shaderDataManager, shader, matrix, tm);
} else {
- return CircleOutside2PtConicalEffect::Create(ctx, shader, matrix, tm, info);
+ return CircleOutside2PtConicalEffect::Create(ctx, shaderDataManager, shader, matrix, tm,
+ info);
}
}
« no previous file with comments | « src/effects/gradients/SkTwoPointConicalGradient_gpu.h ('k') | src/gpu/effects/GrCustomXfermode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698