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

Unified Diff: src/effects/gradients/SkSweepGradient.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/SkRadialGradient.cpp ('k') | src/effects/gradients/SkTwoPointConicalGradient.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkSweepGradient.cpp
diff --git a/src/effects/gradients/SkSweepGradient.cpp b/src/effects/gradients/SkSweepGradient.cpp
index 24853ff76fc040db1a558f6ac48751acddc36564..4bf80984fd4f282dd3e096173a84c12e951f1726 100644
--- a/src/effects/gradients/SkSweepGradient.cpp
+++ b/src/effects/gradients/SkSweepGradient.cpp
@@ -211,9 +211,9 @@ private:
class GrSweepGradient : public GrGradientEffect {
public:
- static GrFragmentProcessor* Create(GrContext* ctx, const SkSweepGradient& shader,
- const SkMatrix& m) {
- return SkNEW_ARGS(GrSweepGradient, (ctx, shader, m));
+ static GrFragmentProcessor* Create(GrContext* ctx, GrShaderDataManager* shaderDataManager,
+ const SkSweepGradient& shader, const SkMatrix& m) {
+ return SkNEW_ARGS(GrSweepGradient, (ctx, shaderDataManager, shader, m));
}
virtual ~GrSweepGradient() { }
@@ -230,9 +230,10 @@ public:
private:
GrSweepGradient(GrContext* ctx,
+ GrShaderDataManager* shaderDataManager,
const SkSweepGradient& shader,
const SkMatrix& matrix)
- : INHERITED(ctx, shader, matrix, SkShader::kClamp_TileMode) {
+ : INHERITED(ctx, shaderDataManager, shader, matrix, SkShader::kClamp_TileMode) {
this->initClassID<GrSweepGradient>();
}
GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
@@ -298,7 +299,7 @@ void GrGLSweepGradient::emitCode(GrGLFPBuilder* builder,
bool SkSweepGradient::asFragmentProcessor(GrContext* context, const SkPaint& paint,
const SkMatrix& viewM,
const SkMatrix* localMatrix, GrColor* paintColor,
- GrShaderDataManager*,
+ GrShaderDataManager* shaderDataManager,
GrFragmentProcessor** effect) const {
SkMatrix matrix;
@@ -314,7 +315,7 @@ bool SkSweepGradient::asFragmentProcessor(GrContext* context, const SkPaint& pai
}
matrix.postConcat(fPtsToUnit);
- *effect = GrSweepGradient::Create(context, *this, matrix);
+ *effect = GrSweepGradient::Create(context, shaderDataManager, *this, matrix);
*paintColor = SkColor2GrColorJustAlpha(paint.getColor());
return true;
« no previous file with comments | « src/effects/gradients/SkRadialGradient.cpp ('k') | src/effects/gradients/SkTwoPointConicalGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698