From 96b6d537c2466ec760af816cde1fd665d2011fab Mon Sep 17 00:00:00 2001 From: Robert Phillips Date: Mon, 19 Mar 2018 10:57:42 -0400 Subject: Fix GrTextureStripAtlasManager cleanup order bug Bug: 820703 Change-Id: I6f1a895ceb213d38361bc03a472cf2a48e4720a5 Reviewed-on: https://skia-review.googlesource.com/115001 Reviewed-by: Greg Daniel Commit-Queue: Robert Phillips --- src/shaders/gradients/SkGradientShader.cpp | 2 +- src/shaders/gradients/SkGradientShaderPriv.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/shaders') 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 fAtlas; int fRow; bool fIsOpaque; -- cgit v1.2.3