Index: src/core/SkBlitter_Sprite.cpp |
diff --git a/src/core/SkBlitter_Sprite.cpp b/src/core/SkBlitter_Sprite.cpp |
index 90e38f498ac8fba42e2e561ff30000a2c1b1b836..237f316b560ac6282b5d3088c74f3c206bde1402 100644 |
--- a/src/core/SkBlitter_Sprite.cpp |
+++ b/src/core/SkBlitter_Sprite.cpp |
@@ -5,6 +5,7 @@ |
* found in the LICENSE file. |
*/ |
+#include "SkColorSpacePriv.h" |
#include "SkOpts.h" |
#include "SkSmallAllocator.h" |
#include "SkSpriteBlitter.h" |
@@ -59,7 +60,7 @@ public: |
if (dst.colorType() != src.colorType()) { |
return false; |
} |
- if (dst.info().profileType() != src.info().profileType()) { |
+ if (SkColorSpacePriv::EQ(dst.info().colorSpace(), src.info().colorSpace())) { |
Brian Osman
2016/06/20 20:09:19
Should this be !EQ ?
reed1
2016/06/20 21:05:52
Done.
|
return false; |
} |
if (paint.getMaskFilter() || paint.getColorFilter() || paint.getImageFilter()) { |
@@ -81,8 +82,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 || nullptr == dst.info().colorSpace()) { |
Brian Osman
2016/06/20 20:09:19
What exactly was this checking for before? I don't
reed1
2016/06/20 21:05:52
Not sure :) Seems like this class wants to be SRGB
|
return false; |
} |
@@ -109,7 +109,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(SkColorSpacePriv::EQ(fDst.info().colorSpace(), fSource.info().colorSpace())); |
SkASSERT(width > 0 && height > 0); |
if (fUseMemcpy) { |
@@ -175,7 +175,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); |