Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Unified Diff: src/core/SkBitmap.cpp

Issue 2072813002: Revert of Lots of progress switching to SkColorSpace rather than SkColorProfileType (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samplecode/SampleApp.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmap.cpp
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index 8cb8e4d6fc9f530c290c8fc86477572a6406e592..10a7e3299c1b834a474294d072822e4f4d72b2bc 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -742,7 +742,7 @@
if (fPixelRef->getTexture() != nullptr) {
// Do a deep copy
- SkPixelRef* pixelRef = fPixelRef->deepCopy(this->colorType(), this->colorSpace(), &subset);
+ SkPixelRef* pixelRef = fPixelRef->deepCopy(this->colorType(), this->profileType(), &subset);
if (pixelRef != nullptr) {
SkBitmap dst;
dst.setInfo(this->info().makeWH(subset.width(), subset.height()));
@@ -911,7 +911,7 @@
bool SkBitmap::deepCopyTo(SkBitmap* dst) const {
const SkColorType dstCT = this->colorType();
- SkColorSpace* dstCS = this->colorSpace();
+ const SkColorProfileType dstPT = this->profileType();
if (!this->canCopyTo(dstCT)) {
return false;
@@ -920,10 +920,10 @@
// 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, dstCS, nullptr);
+ SkPixelRef* pixelRef = fPixelRef->deepCopy(dstCT, dstPT, nullptr);
if (pixelRef) {
uint32_t rowBytes;
- if (this->colorType() == dstCT && this->colorSpace() == dstCS) {
+ if (this->colorType() == dstCT && this->profileType() == dstPT) {
// Since there is no subset to pass to deepCopy, and deepCopy
// succeeded, the new pixel ref must be identical.
SkASSERT(fPixelRef->info() == pixelRef->info());
« no previous file with comments | « samplecode/SampleApp.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698