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

Unified Diff: src/core/SkBlitter_Sprite.cpp

Issue 2086583002: update callers to not use SkColorProfileType (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rm flag instead of commenting it out 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 | « src/core/SkBlitter_PM4f.cpp ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBlitter_Sprite.cpp
diff --git a/src/core/SkBlitter_Sprite.cpp b/src/core/SkBlitter_Sprite.cpp
index 90e38f498ac8fba42e2e561ff30000a2c1b1b836..950f18791fe6be4b47ef80469df4e296c69382d9 100644
--- a/src/core/SkBlitter_Sprite.cpp
+++ b/src/core/SkBlitter_Sprite.cpp
@@ -59,7 +59,7 @@ public:
if (dst.colorType() != src.colorType()) {
return false;
}
- if (dst.info().profileType() != src.info().profileType()) {
+ if (dst.info().gammaCloseToSRGB() != src.info().gammaCloseToSRGB()) {
return false;
}
if (paint.getMaskFilter() || paint.getColorFilter() || paint.getImageFilter()) {
@@ -81,8 +81,7 @@ public:
// At this point memcpy can't be used. The following check for using SrcOver.
- if (dst.colorType() != kN32_SkColorType
- || dst.info().profileType() != kSRGB_SkColorProfileType) {
+ if (dst.colorType() != kN32_SkColorType || !dst.info().gammaCloseToSRGB()) {
return false;
}
@@ -109,7 +108,7 @@ public:
void blitRect(int x, int y, int width, int height) override {
SkASSERT(fDst.colorType() == fSource.colorType());
- SkASSERT(fDst.info().profileType() == fSource.info().profileType());
+ SkASSERT(fDst.info().gammaCloseToSRGB() == fSource.info().gammaCloseToSRGB());
SkASSERT(width > 0 && height > 0);
if (fUseMemcpy) {
@@ -175,7 +174,7 @@ SkBlitter* SkBlitter::ChooseSprite(const SkPixmap& dst, const SkPaint& paint,
blitter = SkSpriteBlitter::ChooseD16(source, paint, allocator);
break;
case kN32_SkColorType:
- if (dst.info().isSRGB()) {
+ if (dst.info().gammaCloseToSRGB()) {
blitter = SkSpriteBlitter::ChooseS32(source, paint, allocator);
} else {
blitter = SkSpriteBlitter::ChooseL32(source, paint, allocator);
« no previous file with comments | « src/core/SkBlitter_PM4f.cpp ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698