aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBitmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/SkBitmap.cpp')
-rw-r--r--src/core/SkBitmap.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index 10a7e3299c..8cb8e4d6fc 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());