diff options
author | reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2009-11-10 15:54:55 +0000 |
---|---|---|
committer | reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2009-11-10 15:54:55 +0000 |
commit | c6ddc110c0f4bd16b5ce61cad6c6ac4213c026a0 (patch) | |
tree | 74d510d64fab7650bc3f03f95b95fe09a57d0f53 /src/images | |
parent | d03337c736d32bd814eae8a62b1284ea0009b816 (diff) |
use imageref_globalpool in samplepicture, to test flattening bitmaps
git-svn-id: http://skia.googlecode.com/svn/trunk@422 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/images')
-rw-r--r-- | src/images/SkImageRef.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/images/SkImageRef.cpp b/src/images/SkImageRef.cpp index 7ef5f40418..60e01c672b 100644 --- a/src/images/SkImageRef.cpp +++ b/src/images/SkImageRef.cpp @@ -6,6 +6,8 @@ #include "SkTemplates.h" #include "SkThread.h" +//#define DUMP_IMAGEREF_LIFECYCLE + // can't be static, as SkImageRef_Pool needs to see it SkMutex gImageRefMutex; @@ -160,6 +162,8 @@ SkImageRef::SkImageRef(SkFlattenableReadBuffer& buffer) : INHERITED(buffer, &gImageRefMutex), fErrorInDecoding(false) { fConfig = (SkBitmap::Config)buffer.readU8(); fSampleSize = buffer.readU8(); + fDoDither = buffer.readBool(); + size_t length = buffer.readU32(); fStream = SkNEW_ARGS(SkMemoryStream, (length)); buffer.read((void*)fStream->getMemoryBase(), length); @@ -173,6 +177,7 @@ void SkImageRef::flatten(SkFlattenableWriteBuffer& buffer) const { buffer.write8(fConfig); buffer.write8(fSampleSize); + buffer.writeBool(fDoDither); size_t length = fStream->getLength(); buffer.write32(length); fStream->rewind(); |