aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBitmap.cpp
diff options
context:
space:
mode:
authorGravatar brianosman <brianosman@google.com>2016-06-16 11:10:03 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-06-16 11:10:04 -0700
commit6a61a875467646f8dbc37cfecf49e12d1f475170 (patch)
treedb9b06850ce0d7f35fb9d21b14a0b1c431edb349 /src/core/SkBitmap.cpp
parentdea0340cadb759932e53416a657f5ea75fee8b5f (diff)
Lots of progress on switching to SkColorSpace rather than SkColorProfileType
Fixed a bunch of code in Ganesh, as well as usage of SkColorProfileType in most of our tools (DM, SampleApp, Viewer, nanobench, skiaserve, HelloWorld). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2069173002 Review-Url: https://codereview.chromium.org/2069173002
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());