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

Unified Diff: src/core/SkBitmapProcShader.cpp

Issue 1915263002: Add guards for edge cases. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use proper call for trunc. Created 4 years, 8 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 | « no previous file | src/core/SkLinearBitmapPipeline.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapProcShader.cpp
diff --git a/src/core/SkBitmapProcShader.cpp b/src/core/SkBitmapProcShader.cpp
index 3727bbca864993bb537b5f607119cb945f66c059..d230d147cbf00994a43f75c9bdedc9300f6a08b6 100644
--- a/src/core/SkBitmapProcShader.cpp
+++ b/src/core/SkBitmapProcShader.cpp
@@ -225,6 +225,7 @@ private:
static bool choose_linear_pipeline(const SkShader::ContextRec& rec, const SkImageInfo& srcInfo) {
// These src attributes are not supported in the new 4f context (yet)
//
+ if (srcInfo.profileType() != kSRGB_SkColorProfileType) { return false; }
if (srcInfo.colorType() != kRGBA_8888_SkColorType
&& srcInfo.colorType() != kBGRA_8888_SkColorType
&& srcInfo.colorType() != kIndex_8_SkColorType
« no previous file with comments | « no previous file | src/core/SkLinearBitmapPipeline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698