| Index: src/core/SkBitmap.cpp
|
| diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
|
| index 05f5208a69bfd62fba985d9f2e54e59d4853bb0d..ef14227ab3d0398d6f32e8beab3e96d457d05021 100644
|
| --- a/src/core/SkBitmap.cpp
|
| +++ b/src/core/SkBitmap.cpp
|
| @@ -1056,7 +1056,8 @@ bool SkBitmap::copyTo(SkBitmap* dst, Config dstConfig, Allocator* alloc) const {
|
| if (tmpSrc.config() == dstConfig && NULL == alloc) {
|
| dst->swap(tmpSrc);
|
| if (dst->pixelRef() && this->config() == dstConfig) {
|
| - dst->pixelRef()->fGenerationID = fPixelRef->getGenerationID();
|
| + // TODO(scroggo): fix issue 1742
|
| + dst->pixelRef()->cloneGenID(*fPixelRef);
|
| }
|
| return true;
|
| }
|
| @@ -1096,8 +1097,9 @@ bool SkBitmap::copyTo(SkBitmap* dst, Config dstConfig, Allocator* alloc) const {
|
| if (tmpDst.getSize() == src->getSize()) {
|
| memcpy(tmpDst.getPixels(), src->getPixels(), src->getSafeSize());
|
| SkPixelRef* pixelRef = tmpDst.pixelRef();
|
| - if (pixelRef != NULL) {
|
| - pixelRef->fGenerationID = this->getGenerationID();
|
| + if (NULL != pixelRef && NULL != fPixelRef) {
|
| + // TODO(scroggo): fix issue 1742
|
| + pixelRef->cloneGenID(*fPixelRef);
|
| }
|
| } else {
|
| const char* srcP = reinterpret_cast<const char*>(src->getPixels());
|
| @@ -1151,7 +1153,8 @@ bool SkBitmap::deepCopyTo(SkBitmap* dst, Config dstConfig) const {
|
| if (pixelRef) {
|
| uint32_t rowBytes;
|
| if (dstConfig == fConfig) {
|
| - pixelRef->fGenerationID = fPixelRef->getGenerationID();
|
| + // TODO(scroggo): fix issue 1742
|
| + pixelRef->cloneGenID(*fPixelRef);
|
| // Use the same rowBytes as the original.
|
| rowBytes = fRowBytes;
|
| } else {
|
|
|