Revert[4] "clean up (partially) colortable api""""

Fixes:
- create temp api for android to pass nullptr
- don't release and access sk_sp<SkData> at the same time in parameters

This reverts commit b14131c1851eea6acbd34cc42a8f860daed36b21.

Bug: skia:
Change-Id: Ic0e4f62520ba9f35455499ed30d306ad19d998a8
Reviewed-on: https://skia-review.googlesource.com/11129
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
diff --git a/src/effects/gradients/SkGradientShaderPriv.h b/src/effects/gradients/SkGradientShaderPriv.h
index f64b439..ec75bdc 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 @@
 
         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 @@
         // 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.