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

Unified Diff: src/effects/gradients/SkLinearGradient.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/SkGradientShaderPriv.h ('k') | src/effects/gradients/SkRadialGradient.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkLinearGradient.cpp
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp
index 7b20b2deef0dc33cb7379b534ce53b92c4dd8d57..2fbe435d14322e2c7027c9711507e5249b219ff4 100644
--- a/src/effects/gradients/SkLinearGradient.cpp
+++ b/src/effects/gradients/SkLinearGradient.cpp
@@ -489,10 +489,11 @@ class GrLinearGradient : public GrGradientEffect {
public:
static GrFragmentProcessor* Create(GrContext* ctx,
+ GrShaderDataManager* shaderDataManager,
const SkLinearGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm) {
- return SkNEW_ARGS(GrLinearGradient, (ctx, shader, matrix, tm));
+ return SkNEW_ARGS(GrLinearGradient, (ctx, shaderDataManager, shader, matrix, tm));
}
virtual ~GrLinearGradient() { }
@@ -510,10 +511,11 @@ public:
private:
GrLinearGradient(GrContext* ctx,
+ GrShaderDataManager* shaderDataManager,
const SkLinearGradient& shader,
const SkMatrix& matrix,
SkShader::TileMode tm)
- : INHERITED(ctx, shader, matrix, tm) {
+ : INHERITED(ctx, shaderDataManager, shader, matrix, tm) {
this->initClassID<GrLinearGradient>();
}
GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
@@ -569,7 +571,8 @@ void GrGLLinearGradient::emitCode(GrGLFPBuilder* builder,
bool SkLinearGradient::asFragmentProcessor(GrContext* context, const SkPaint& paint,
const SkMatrix& viewm, const SkMatrix* localMatrix,
- GrColor* paintColor, GrShaderDataManager*,
+ GrColor* paintColor,
+ GrShaderDataManager* shaderDataManager,
GrFragmentProcessor** fp) const {
SkASSERT(context);
@@ -587,7 +590,7 @@ bool SkLinearGradient::asFragmentProcessor(GrContext* context, const SkPaint& pa
matrix.postConcat(fPtsToUnit);
*paintColor = SkColor2GrColorJustAlpha(paint.getColor());
- *fp = GrLinearGradient::Create(context, *this, matrix, fTileMode);
+ *fp = GrLinearGradient::Create(context, shaderDataManager, *this, matrix, fTileMode);
return true;
}
« no previous file with comments | « src/effects/gradients/SkGradientShaderPriv.h ('k') | src/effects/gradients/SkRadialGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698