diff options
author | Florin Malita <fmalita@chromium.org> | 2016-11-10 11:10:30 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-11-10 17:05:07 +0000 |
commit | e13a69baac9dc326510009fa7c0c5966aee9240c (patch) | |
tree | 2d50c5666d94ae35870a294e08238cce8e33d56f /src/core/SkBitmapProvider.h | |
parent | 152ad7e7fb518058ef1185249aab50dff09d6f5c (diff) |
Simplify SkBitmapProvider
We're no longer using SkBitmap sources for SkBitmapProvider, so we can
restrict it to SkImage only.
At this point we could also remove it, but I think it'll come in handy
when we add shader subset support.
BUG=skia:5806
R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4655
Change-Id: I298da253cc8f7c1205b543521e62060a202a9f78
Reviewed-on: https://skia-review.googlesource.com/4655
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'src/core/SkBitmapProvider.h')
-rw-r--r-- | src/core/SkBitmapProvider.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/core/SkBitmapProvider.h b/src/core/SkBitmapProvider.h index 2080104b87..2e878b18ab 100644 --- a/src/core/SkBitmapProvider.h +++ b/src/core/SkBitmapProvider.h @@ -8,24 +8,20 @@ #ifndef SkBitmapProvider_DEFINED #define SkBitmapProvider_DEFINED -#include "SkBitmap.h" #include "SkImage.h" #include "SkBitmapCache.h" class SkBitmapProvider { public: - explicit SkBitmapProvider(const SkBitmap& bm) : fBitmap(bm) {} - explicit SkBitmapProvider(const SkImage* img) : fImage(img) {} + explicit SkBitmapProvider(const SkImage* img) : fImage(img) { SkASSERT(img); } SkBitmapProvider(const SkBitmapProvider& other) - : fBitmap(other.fBitmap) - , fImage(other.fImage) + : fImage(other.fImage) {} int width() const; int height() const; uint32_t getID() const; - bool validForDrawing() const; SkImageInfo info() const; bool isVolatile() const; @@ -42,7 +38,6 @@ private: void* operator new(size_t) = delete; void* operator new(size_t, void*) = delete; - SkBitmap fBitmap; // SkBitmapProvider is always short-lived/stack allocated, and the source image is guaranteed // to outlive its scope => we can store a raw ptr to avoid ref churn. const SkImage* fImage; |