aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkBitmap.h
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-29 15:57:20 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-29 15:57:20 +0000
commit00f8d6c75d22ce8f95f932c5b101354b196fa0df (patch)
tree7ff413f0df54836620b2ba58c524d62ce7d033ff /include/core/SkBitmap.h
parent2246e325b8710389d8f718843356e410f683dd25 (diff)
Revert "Revert of add colortable support to imagegenerator (https://codereview.chromium.org/304443003/)"
Fix is to add colortable param to installPixels() This reverts commit 924205aaf2e0c3c65dda13e0eaccde3e7b2a5c40. BUG=skia: R=scroggo@google.com, reed@chromium.org Author: reed@google.com Review URL: https://codereview.chromium.org/300263005 git-svn-id: http://skia.googlecode.com/svn/trunk@14958 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkBitmap.h')
-rw-r--r--include/core/SkBitmap.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h
index ef59e31f52..b487285d93 100644
--- a/include/core/SkBitmap.h
+++ b/include/core/SkBitmap.h
@@ -313,13 +313,20 @@ public:
/**
* Install a pixelref that wraps the specified pixels and rowBytes, and
* optional ReleaseProc and context. When the pixels are no longer
- * referenced, if ReleaseProc is not null, it will be called with the
+ * referenced, if releaseProc is not null, it will be called with the
* pixels and context as parameters.
* On failure, the bitmap will be set to empty and return false.
*/
- bool installPixels(const SkImageInfo&, void* pixels, size_t rowBytes,
- void (*ReleaseProc)(void* addr, void* context),
- void* context);
+ bool installPixels(const SkImageInfo&, void* pixels, size_t rowBytes, SkColorTable*,
+ void (*releaseProc)(void* addr, void* context), void* context);
+
+#ifdef SK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS
+ bool installPixels(const SkImageInfo& info, void* pixels, size_t rowBytes,
+ void (*releaseProc)(void* addr, void* context),
+ void* context) {
+ return this->installPixels(info, pixels, rowBytes, NULL, releaseProc, context);
+ }
+#endif
/**
* Call installPixels with no ReleaseProc specified. This means that the
@@ -327,7 +334,7 @@ public:
* of the created bitmap (and its pixelRef).
*/
bool installPixels(const SkImageInfo& info, void* pixels, size_t rowBytes) {
- return this->installPixels(info, pixels, rowBytes, NULL, NULL);
+ return this->installPixels(info, pixels, rowBytes, NULL, NULL, NULL);
}
/**