diff options
author | 2014-05-28 16:16:08 +0000 | |
---|---|---|
committer | 2014-05-28 16:16:08 +0000 | |
commit | 924205aaf2e0c3c65dda13e0eaccde3e7b2a5c40 (patch) | |
tree | cd704d07bcb1cf1118ea4ebc2fd762e6606d0dff /src/lazy/SkDiscardablePixelRef.cpp | |
parent | b263985850a7a74ccd5fda2abb057b04f7254e41 (diff) |
Revert of add colortable support to imagegenerator (https://codereview.chromium.org/304443003/)
Reason for revert:
failing tests
Original issue's description:
> add colortable support to imagegenerator
>
> BUG=skia:
>
> Committed: http://code.google.com/p/skia/source/detail?r=14916
R=halcanary@google.com, scroggo@google.com
TBR=halcanary@google.com, scroggo@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Author: reed@google.com
Review URL: https://codereview.chromium.org/300873007
git-svn-id: http://skia.googlecode.com/svn/trunk@14917 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/lazy/SkDiscardablePixelRef.cpp')
-rw-r--r-- | src/lazy/SkDiscardablePixelRef.cpp | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/src/lazy/SkDiscardablePixelRef.cpp b/src/lazy/SkDiscardablePixelRef.cpp index b0bbd27e3a..ccf812ce6f 100644 --- a/src/lazy/SkDiscardablePixelRef.cpp +++ b/src/lazy/SkDiscardablePixelRef.cpp @@ -60,30 +60,15 @@ bool SkDiscardablePixelRef::onNewLockPixels(LockRec* rec) { } void* pixels = fDiscardableMemory->data(); - const SkImageInfo& info = this->info(); - SkPMColor colors[256]; - int colorCount = 0; - - if (!fGenerator->getPixels(info, pixels, fRowBytes, colors, &colorCount)) { + if (!fGenerator->getPixels(this->info(), pixels, fRowBytes)) { fDiscardableMemory->unlock(); SkDELETE(fDiscardableMemory); fDiscardableMemory = NULL; return false; } - // Note: our ctable is not purgable, as it is not stored in the discardablememory block. - // This is because SkColorTable is refcntable, and therefore our caller could hold onto it - // beyond the scope of a lock/unlock. If we change the API/lifecycle for SkColorTable, we - // could move it into the block, but then again perhaps it is small enough that this doesn't - // really matter. - if (colorCount > 0) { - fCTable.reset(SkNEW_ARGS(SkColorTable, (colors, colorCount))); - } else { - fCTable.reset(NULL); - } - rec->fPixels = pixels; - rec->fColorTable = fCTable.get(); + rec->fColorTable = NULL; rec->fRowBytes = fRowBytes; return true; } |