aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkImageGenerator.h
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2016-12-15 14:31:45 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-12-15 20:47:26 +0000
commitd85dd53e288ed5d979e5393085ab894187383a09 (patch)
tree986444ffb26b1ea57f9638fe4dc563cf27c2a237 /include/core/SkImageGenerator.h
parent9f8bdbb269c01216aa858ac8f82d208c57ffc0a4 (diff)
Shrink the SkImageGenerator API
generateBitmap was used in one test, so it's easily converted to tryGenerateBitmap. Then, all calls to tryGenerateBitmap supplied an image info, so we don't need it to be optional. BUG=skia: Change-Id: I19e8f9da7e442a2d37af68b029b5ec85228766f7 Reviewed-on: https://skia-review.googlesource.com/6149 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'include/core/SkImageGenerator.h')
-rw-r--r--include/core/SkImageGenerator.h11
1 files changed, 1 insertions, 10 deletions
diff --git a/include/core/SkImageGenerator.h b/include/core/SkImageGenerator.h
index a88e1d466e..eace286828 100644
--- a/include/core/SkImageGenerator.h
+++ b/include/core/SkImageGenerator.h
@@ -243,14 +243,7 @@ public:
static SkImageGenerator* NewFromPicture(const SkISize&, const SkPicture*, const SkMatrix*,
const SkPaint*);
- bool tryGenerateBitmap(SkBitmap* bm, const SkImageInfo& info, SkBitmap::Allocator* allocator) {
- return this->tryGenerateBitmap(bm, &info, allocator);
- }
- void generateBitmap(SkBitmap* bm, const SkImageInfo& info) {
- if (!this->tryGenerateBitmap(bm, &info, nullptr)) {
- sk_throw();
- }
- }
+ bool tryGenerateBitmap(SkBitmap* bm, const SkImageInfo& info, SkBitmap::Allocator* allocator);
protected:
enum {
@@ -287,8 +280,6 @@ protected:
return false;
}
- bool tryGenerateBitmap(SkBitmap* bm, const SkImageInfo* optionalInfo, SkBitmap::Allocator*);
-
private:
const SkImageInfo fInfo;
const uint32_t fUniqueID;