aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/gradients/SkGradientShaderPriv.h
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-03-31 09:20:50 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-31 15:39:31 +0000
commit2e491a6a113c5e16a3b7bede5fa6f588deeb928d (patch)
treee8540e14d4ca1dd12ca3b2df5d9ef0b6f48b3a7f /src/effects/gradients/SkGradientShaderPriv.h
parentf3333c89bf05fc602d9bf8e1e24547668c660383 (diff)
clean up (partially) colortable api
Needs this to land: https://codereview.chromium.org/2789853002/ Bug: skia: Change-Id: I38d916a546b7fa64d000d973e695ddda24a589e7 Reviewed-on: https://skia-review.googlesource.com/10600 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
Diffstat (limited to 'src/effects/gradients/SkGradientShaderPriv.h')
-rw-r--r--src/effects/gradients/SkGradientShaderPriv.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/effects/gradients/SkGradientShaderPriv.h b/src/effects/gradients/SkGradientShaderPriv.h
index f64b4396c2..ec75bdc05a 100644
--- a/src/effects/gradients/SkGradientShaderPriv.h
+++ b/src/effects/gradients/SkGradientShaderPriv.h
@@ -16,7 +16,6 @@
#include "SkClampRange.h"
#include "SkColorPriv.h"
#include "SkColorSpace.h"
-#include "SkMallocPixelRef.h"
#include "SkOnce.h"
#include "SkReadBuffer.h"
#include "SkShader.h"
@@ -129,7 +128,7 @@ public:
const SkPMColor* getCache32();
- SkMallocPixelRef* getCache32PixelRef() const { return fCache32PixelRef; }
+ SkPixelRef* getCache32PixelRef() const { return fCache32PixelRef.get(); }
unsigned getAlpha() const { return fCacheAlpha; }
bool getDither() const { return fCacheDither; }
@@ -138,7 +137,7 @@ public:
// Working pointer. If it's nullptr, we need to recompute the cache values.
SkPMColor* fCache32;
- SkMallocPixelRef* fCache32PixelRef;
+ sk_sp<SkPixelRef> fCache32PixelRef;
const unsigned fCacheAlpha; // The alpha value we used when we computed the cache.
// Larger than 8bits so we can store uninitialized
// value.