aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBitmapController.h
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-09-15 14:46:27 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-09-15 14:46:27 -0700
commit013e9e3bb0495ab0b5aff011429a6ac983464d34 (patch)
treee017fb97e23904294b840075bc10a57ec1ff2213 /src/core/SkBitmapController.h
parent0d705a487318d41c95be9849e355f7383e67dc96 (diff)
move SkBitmapProvider to its own file
Diffstat (limited to 'src/core/SkBitmapController.h')
-rw-r--r--src/core/SkBitmapController.h30
1 files changed, 1 insertions, 29 deletions
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<const SkImage> fImage;
-};
+class SkBitmapProvider;
/**
* Handles request to scale, filter, and lock a bitmap to be rasterized.