aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2015-07-13 14:14:36 -0700
committerChris Craik <ccraik@google.com>2015-07-14 09:52:27 -0700
commit48c55fe972572c0331ecf6b3d9e8f1a49108bd7e (patch)
treef7363b946e5e45c7738b850abb4192ea5ad5f33d
parent6ffafee26a8b5fe61fba0f1ff07d7e96679d5d84 (diff)
downloadandroid_external_skia-48c55fe972572c0331ecf6b3d9e8f1a49108bd7e.tar.gz
android_external_skia-48c55fe972572c0331ecf6b3d9e8f1a49108bd7e.tar.bz2
android_external_skia-48c55fe972572c0331ecf6b3d9e8f1a49108bd7e.zip
Disable SkColorShader optimization for Android Framework
bug:22390304 Change-Id: Ibf8cefc82948043d8241b27b2e2dabf4dc6829d5
-rw-r--r--src/core/SkBitmapProcShader.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/SkBitmapProcShader.cpp b/src/core/SkBitmapProcShader.cpp
index c1a03fecaf..9d181196e3 100644
--- a/src/core/SkBitmapProcShader.cpp
+++ b/src/core/SkBitmapProcShader.cpp
@@ -272,6 +272,12 @@ void SkBitmapProcShader::BitmapProcShaderContext::shadeSpan16(int x, int y, uint
// returns true and set color if the bitmap can be drawn as a single color
// (for efficiency)
static bool canUseColorShader(const SkBitmap& bm, SkColor* color) {
+#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
+ // Android expects SkShaders constructed from a Bitmap to always be queryable with
+ // SkShader::asABitmap()
+ return false;
+#endif
+
if (1 != bm.width() || 1 != bm.height()) {
return false;
}