diff options
author | 2014-04-28 14:44:54 +0000 | |
---|---|---|
committer | 2014-04-28 14:44:54 +0000 | |
commit | c76a4b2a81b5c502ded23dee1e0c5d762028d5cf (patch) | |
tree | 21dd269997915875e307d03f5f6bde98b20e1c9d /src/images/SkImageDecoder_libwebp.cpp | |
parent | cced37d2c3e49231e6a155721e0dd59e58e67bab (diff) |
Revert of Fast path for blurred round rects -- blur a small 9patch rect on the CPU (https://codereview.chromium.org/248613004/)
Reason for revert:
Looks like this causes unit tests to fail with a zero constructor like this one: http://108.170.220.120:10117/builders/Test-Win7-ShuttleA-HD2000-x86-Release/builds/2326/steps/RunTests/logs/stdio
Original issue's description:
> Fast path for blurred round rects -- blur a small 9patch rect on the CPU
> And nonlinearly stretch the resulting texture across proxy geometry.
>
> BUG=
>
> Committed: http://code.google.com/p/skia/source/detail?r=14392
R=bsalomon@google.com, reed@google.com, humper@google.com
TBR=bsalomon@google.com, humper@google.com, reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/258893010
git-svn-id: http://skia.googlecode.com/svn/trunk@14400 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/images/SkImageDecoder_libwebp.cpp')
-rw-r--r-- | src/images/SkImageDecoder_libwebp.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/images/SkImageDecoder_libwebp.cpp b/src/images/SkImageDecoder_libwebp.cpp index 02990258eb..4e23e50f57 100644 --- a/src/images/SkImageDecoder_libwebp.cpp +++ b/src/images/SkImageDecoder_libwebp.cpp @@ -559,6 +559,15 @@ static void Index8_To_RGB(const uint8_t* in, uint8_t* rgb, int width, } } +static void Alpha8_To_RGB(const uint8_t* in, uint8_t* rgb, int width, + const SkPMColor* SK_RESTRICT ctable) { + const uint8_t* SK_RESTRICT src = (const uint8_t*)in; + for (int i = 0; i < width; ++i) { + rgb[0] = rgb[1] = rgb[2] = *src++; + rgb += 3; + } +} + static ScanlineImporter ChooseImporter(const SkBitmap::Config& config, bool hasAlpha, int* bpp) { @@ -585,6 +594,9 @@ static ScanlineImporter ChooseImporter(const SkBitmap::Config& config, case SkBitmap::kIndex8_Config: *bpp = 3; return Index8_To_RGB; + case SkBitmap::kA8_Config: + *bpp = 3; + return Alpha8_To_RGB; default: return NULL; } |