aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/core/SkBitmap.h9
-rw-r--r--include/core/SkPixelRef.h14
-rw-r--r--include/gpu/SkGr.h3
3 files changed, 9 insertions, 17 deletions
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h
index 64ce60a0e2..53547f9123 100644
--- a/include/core/SkBitmap.h
+++ b/include/core/SkBitmap.h
@@ -23,7 +23,10 @@ class SkPixelRef;
class SkPixelRefFactory;
class SkRegion;
class SkString;
+
+#ifdef SK_SUPPORT_LEGACY_BITMAP_GETTEXTURE
class GrTexture;
+#endif
/** \class SkBitmap
@@ -469,9 +472,9 @@ public:
(this->colorType() != kIndex_8_SkColorType || fColorTable);
}
- /** Returns the pixelRef's texture, or NULL
- */
- GrTexture* getTexture() const;
+#ifdef SK_SUPPORT_LEGACY_BITMAP_GETTEXTURE
+ GrTexture* getTexture() const { return nullptr; }
+#endif
/** Return the bitmap's colortable, if it uses one (i.e. colorType is
Index_8) and the pixels are locked.
diff --git a/include/core/SkPixelRef.h b/include/core/SkPixelRef.h
index da85863bdb..9aa1b71144 100644
--- a/include/core/SkPixelRef.h
+++ b/include/core/SkPixelRef.h
@@ -238,20 +238,6 @@ public:
/** Populates dst with the pixels of this pixelRef, converting them to colorType. */
bool readPixels(SkBitmap* dst, SkColorType colorType, const SkIRect* subset = NULL);
- /**
- * Makes a deep copy of this PixelRef, respecting the requested config.
- * @param colorType Desired colortype.
- * @param profileType Desired colorprofiletype.
- * @param subset Subset of this PixelRef to copy. Must be fully contained within the bounds of
- * of this PixelRef.
- * @return A new SkPixelRef, or NULL if either there is an error (e.g. the destination could
- * not be created with the given config), or this PixelRef does not support deep
- * copies.
- */
- virtual SkPixelRef* deepCopy(SkColorType, SkColorSpace*, const SkIRect* /*subset*/) {
- return NULL;
- }
-
// Register a listener that may be called the next time our generation ID changes.
//
// We'll only call the listener if we're confident that we are the only SkPixelRef with this
diff --git a/include/gpu/SkGr.h b/include/gpu/SkGr.h
index 541881ddaf..70db775bfd 100644
--- a/include/gpu/SkGr.h
+++ b/include/gpu/SkGr.h
@@ -71,6 +71,9 @@ static inline GrColor SkPMColorToGrColor(SkPMColor c) {
GrTexture* GrRefCachedBitmapTexture(GrContext*, const SkBitmap&, const GrTextureParams&,
SkSourceGammaTreatment);
+sk_sp<GrTexture> GrMakeCachedBitmapTexture(GrContext*, const SkBitmap&, const GrTextureParams&,
+ SkSourceGammaTreatment);
+
// TODO: Move SkImageInfo2GrPixelConfig to SkGrPriv.h (requires cleanup to SkWindow its subclasses).
GrPixelConfig SkImageInfo2GrPixelConfig(SkColorType, SkAlphaType, const SkColorSpace*,
const GrCaps&);