From 5b81535014f545f6498f5c8721723b81576989b1 Mon Sep 17 00:00:00 2001 From: "reed@android.com" Date: Thu, 11 Mar 2010 22:20:43 +0000 Subject: [PATCH] only report hasspan16 if we're opaque, otherwise we get a different blend via 565 than the 8888 case git-svn-id: http://skia.googlecode.com/svn/trunk@527 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/core/SkShader.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/SkShader.cpp b/src/core/SkShader.cpp index f33036debc..34dc32e0ec 100644 --- a/src/core/SkShader.cpp +++ b/src/core/SkShader.cpp @@ -263,11 +263,11 @@ bool SkColorShader::setContext(const SkBitmap& device, const SkPaint& paint, fPMColor = SkPackARGB32(a, r, g, b); fFlags = kConstInY32_Flag; - if (paint.isDither() == false) { - fFlags |= kHasSpan16_Flag; - } - if (SkGetPackedA32(fPMColor) == 255) { + if (255 == a) { fFlags |= kOpaqueAlpha_Flag; + if (paint.isDither() == false) { + fFlags |= kHasSpan16_Flag; + } } return true; -- 2.34.1