aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/shaders
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-03-19 10:57:42 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-19 15:36:26 +0000
commit96b6d537c2466ec760af816cde1fd665d2011fab (patch)
tree504476d9c0e27a915563a56a841e0432668daafb /src/shaders
parentf7466bd84acd28594b3f4df47d91211d9508a16e (diff)
Fix GrTextureStripAtlasManager cleanup order bug
Bug: 820703 Change-Id: I6f1a895ceb213d38361bc03a472cf2a48e4720a5 Reviewed-on: https://skia-review.googlesource.com/115001 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/shaders')
-rw-r--r--src/shaders/gradients/SkGradientShader.cpp2
-rw-r--r--src/shaders/gradients/SkGradientShaderPriv.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/shaders/gradients/SkGradientShader.cpp b/src/shaders/gradients/SkGradientShader.cpp
index a6fb4e94bd..114b7c58a1 100644
--- a/src/shaders/gradients/SkGradientShader.cpp
+++ b/src/shaders/gradients/SkGradientShader.cpp
@@ -1298,7 +1298,7 @@ GrGradientEffect::GrGradientEffect(ClassID classID, const CreateArgs& args, bool
desc.fHeight = 32;
desc.fRowHeight = bitmap.height(); // always 1 here
desc.fConfig = SkImageInfo2GrPixelConfig(bitmap.info(), *args.fContext->caps());
- fAtlas = atlasManager->getAtlas(desc);
+ fAtlas = atlasManager->refAtlas(desc);
SkASSERT(fAtlas);
// We always filter the gradient table. Each table is one row of a texture, always
diff --git a/src/shaders/gradients/SkGradientShaderPriv.h b/src/shaders/gradients/SkGradientShaderPriv.h
index c015a73bf7..7fef12758a 100644
--- a/src/shaders/gradients/SkGradientShaderPriv.h
+++ b/src/shaders/gradients/SkGradientShaderPriv.h
@@ -334,7 +334,7 @@ private:
GrCoordTransform fCoordTransform;
TextureSampler fTextureSampler;
SkScalar fYCoord;
- GrTextureStripAtlas* fAtlas;
+ sk_sp<GrTextureStripAtlas> fAtlas;
int fRow;
bool fIsOpaque;