aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/lazy
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-29 17:10:54 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-29 17:10:54 +0000
commit672e7cf9c41b60ef298fe40c8fc0bbba9c2b5828 (patch)
tree790270f3879b4004696e03eb09b8a33968a03151 /src/lazy
parent37c772ae2d96dad9b6e430e9bb6450193a545021 (diff)
fix bug in legacy code for SK_SUPPORT_LEGACY_IMAGEGENERATORAPI
git-svn-id: http://skia.googlecode.com/svn/trunk@14967 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/lazy')
-rw-r--r--src/lazy/SkDiscardablePixelRef.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lazy/SkDiscardablePixelRef.cpp b/src/lazy/SkDiscardablePixelRef.cpp
index b0bbd27e3a..53e9d1ab62 100644
--- a/src/lazy/SkDiscardablePixelRef.cpp
+++ b/src/lazy/SkDiscardablePixelRef.cpp
@@ -64,7 +64,11 @@ bool SkDiscardablePixelRef::onNewLockPixels(LockRec* rec) {
SkPMColor colors[256];
int colorCount = 0;
+#ifdef SK_SUPPORT_LEGACY_IMAGEGENERATORAPI
+ if (!fGenerator->getPixels(info, pixels, fRowBytes)) {
+#else
if (!fGenerator->getPixels(info, pixels, fRowBytes, colors, &colorCount)) {
+#endif
fDiscardableMemory->unlock();
SkDELETE(fDiscardableMemory);
fDiscardableMemory = NULL;