From 013e9e3bb0495ab0b5aff011429a6ac983464d34 Mon Sep 17 00:00:00 2001 From: reed Date: Tue, 15 Sep 2015 14:46:27 -0700 Subject: move SkBitmapProvider to its own file BUG=skia: Review URL: https://codereview.chromium.org/1346713002 --- src/core/SkBitmapController.h | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) (limited to 'src/core/SkBitmapController.h') diff --git a/src/core/SkBitmapController.h b/src/core/SkBitmapController.h index e6c4443872..32e73e813d 100644 --- a/src/core/SkBitmapController.h +++ b/src/core/SkBitmapController.h @@ -11,37 +11,9 @@ #include "SkBitmap.h" #include "SkBitmapCache.h" #include "SkFilterQuality.h" -#include "SkImage.h" #include "SkMatrix.h" -class SkBitmapProvider { -public: - explicit SkBitmapProvider(const SkBitmap& bm) : fBitmap(bm) {} - explicit SkBitmapProvider(const SkImage* img) : fImage(SkSafeRef(img)) {} - SkBitmapProvider(const SkBitmapProvider& other) - : fBitmap(other.fBitmap) - , fImage(SkSafeRef(other.fImage.get())) - {} - - int width() const; - int height() const; - uint32_t getID() const; - - bool validForDrawing() const; - SkImageInfo info() const; - - SkBitmapCacheDesc makeCacheDesc(int w, int h) const; - SkBitmapCacheDesc makeCacheDesc() const; - void notifyAddedToCache() const; - - // Only call this if you're sure you need the bits, since it make be expensive - // ... cause a decode and cache, or gpu-readback - bool asBitmap(SkBitmap*) const; - -private: - SkBitmap fBitmap; - SkAutoTUnref fImage; -}; +class SkBitmapProvider; /** * Handles request to scale, filter, and lock a bitmap to be rasterized. -- cgit v1.2.3