| Index: src/core/SkBitmap.cpp
|
| diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
|
| index 10a7e3299c1b834a474294d072822e4f4d72b2bc..8cb8e4d6fc9f530c290c8fc86477572a6406e592 100644
|
| --- a/src/core/SkBitmap.cpp
|
| +++ b/src/core/SkBitmap.cpp
|
| @@ -742,7 +742,7 @@ bool SkBitmap::extractSubset(SkBitmap* result, const SkIRect& subset) const {
|
|
|
| if (fPixelRef->getTexture() != nullptr) {
|
| // Do a deep copy
|
| - SkPixelRef* pixelRef = fPixelRef->deepCopy(this->colorType(), this->profileType(), &subset);
|
| + SkPixelRef* pixelRef = fPixelRef->deepCopy(this->colorType(), this->colorSpace(), &subset);
|
| if (pixelRef != nullptr) {
|
| SkBitmap dst;
|
| dst.setInfo(this->info().makeWH(subset.width(), subset.height()));
|
| @@ -911,7 +911,7 @@ bool SkBitmap::copyTo(SkBitmap* dst, SkColorType dstColorType, Allocator* alloc)
|
|
|
| bool SkBitmap::deepCopyTo(SkBitmap* dst) const {
|
| const SkColorType dstCT = this->colorType();
|
| - const SkColorProfileType dstPT = this->profileType();
|
| + SkColorSpace* dstCS = this->colorSpace();
|
|
|
| if (!this->canCopyTo(dstCT)) {
|
| return false;
|
| @@ -920,10 +920,10 @@ bool SkBitmap::deepCopyTo(SkBitmap* dst) const {
|
| // If we have a PixelRef, and it supports deep copy, use it.
|
| // Currently supported only by texture-backed bitmaps.
|
| if (fPixelRef) {
|
| - SkPixelRef* pixelRef = fPixelRef->deepCopy(dstCT, dstPT, nullptr);
|
| + SkPixelRef* pixelRef = fPixelRef->deepCopy(dstCT, dstCS, nullptr);
|
| if (pixelRef) {
|
| uint32_t rowBytes;
|
| - if (this->colorType() == dstCT && this->profileType() == dstPT) {
|
| + if (this->colorType() == dstCT && this->colorSpace() == dstCS) {
|
| // Since there is no subset to pass to deepCopy, and deepCopy
|
| // succeeded, the new pixel ref must be identical.
|
| SkASSERT(fPixelRef->info() == pixelRef->info());
|
|
|