diff options
author | Mike Reed <reed@google.com> | 2017-07-17 17:33:53 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-07-17 23:19:09 +0000 |
commit | 26e9dddf590bff620de38de752f15534b09ff951 (patch) | |
tree | 88e3249cb2024dd641fcdeffa91affd1fd8712f1 /include/core/SkBitmap.h | |
parent | 63b6f8b93209e593f60b235577f5b3d660396d5f (diff) |
Don't store colortables in pixmaps or pixelrefs
Lots more changes coming later (need to remove colortable parameters from bitmaps and pixmaps)
Bug: skia:6828
Change-Id: Ic63e89570644839fab068141f49915b3f66d1053
Reviewed-on: https://skia-review.googlesource.com/24127
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'include/core/SkBitmap.h')
-rw-r--r-- | include/core/SkBitmap.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h index bcb77f6278..0009641c9f 100644 --- a/include/core/SkBitmap.h +++ b/include/core/SkBitmap.h @@ -249,8 +249,8 @@ public: */ bool SK_WARN_UNUSED_RESULT tryAllocPixels(const SkImageInfo& info, sk_sp<SkColorTable> ctable, uint32_t flags = 0); - void allocPixels(const SkImageInfo& info, sk_sp<SkColorTable> ctable, uint32_t flags = 0) { - if (!this->tryAllocPixels(info, std::move(ctable), flags)) { + void allocPixels(const SkImageInfo& info, sk_sp<SkColorTable>, uint32_t flags = 0) { + if (!this->tryAllocPixels(info, nullptr, flags)) { sk_throw(); } } @@ -292,8 +292,8 @@ public: } // TEMPORARY -- remove after updating Android BitmapTests.cpp:35 - void allocPixels(const SkImageInfo& info, std::nullptr_t, SkColorTable* ctable) { - this->allocPixels(info, sk_ref_sp(ctable)); + void allocPixels(const SkImageInfo& info, std::nullptr_t, SkColorTable*) { + this->allocPixels(info); } /** @@ -358,12 +358,12 @@ public: @return true if the allocation succeeds. If not the pixelref field of the bitmap will be unchanged. */ - bool SK_WARN_UNUSED_RESULT tryAllocPixels(SkColorTable* ctable = NULL) { - return this->tryAllocPixels(NULL, ctable); + bool SK_WARN_UNUSED_RESULT tryAllocPixels(SkColorTable* = NULL) { + return this->tryAllocPixels(nullptr, nullptr); } - void allocPixels(SkColorTable* ctable = NULL) { - this->allocPixels(NULL, ctable); + void allocPixels(SkColorTable* = NULL) { + this->allocPixels(nullptr, nullptr); } /** Use the specified Allocator to create the pixelref that manages the @@ -386,8 +386,8 @@ public: */ bool SK_WARN_UNUSED_RESULT tryAllocPixels(Allocator* allocator, SkColorTable* ctable); - void allocPixels(Allocator* allocator, SkColorTable* ctable) { - if (!this->tryAllocPixels(allocator, ctable)) { + void allocPixels(Allocator* allocator, SkColorTable*) { + if (!this->tryAllocPixels(allocator, nullptr)) { sk_throw(); } } @@ -432,7 +432,7 @@ public: Otherwise returns NULL. Does not affect the colortable's reference count. */ - SkColorTable* getColorTable() const; + SkColorTable* getColorTable() const { return nullptr; } /** Returns a non-zero, unique value corresponding to the pixels in our pixelref. Each time the pixels are changed (and notifyPixelsChanged |