aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBlitMask_D32.cpp
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-12 15:38:00 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-12 15:38:00 +0000
commitf31fa24914c683abcc2c860093b142725c43fbe6 (patch)
tree1a50aa9fc85a19fff6f0ed83f2ebfcb7706cb2e4 /src/core/SkBlitMask_D32.cpp
parent205ce48c38c55ec7527d26042b5cea689369be8b (diff)
Make gMask_00FF00FF a constant
This is to optimize SkAlphaMulQ() in PIC mode. With the visibility=default symbol the constant is not known at compile time (and is not a constant), but instead is fetched through a double indirection through GOT. The function is quite hot on one of the chromium benchmarks: rasterize_and_record_micro.key_silk_cases. This change replaces the symbol with a compile-time constant. As a bonus the variable is not exported from the dynamic library, i. e. a cleaner library interface. See specific performance improvements on Android here: http://goo.gl/iMuTDt R=skyostil@chromium.org, tomhudson@chromium.org, mtklein@google.com, reed@google.com, tomhudson@google.com Author: pasko@chromium.org Review URL: https://codereview.chromium.org/270473003 git-svn-id: http://skia.googlecode.com/svn/trunk@14696 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkBlitMask_D32.cpp')
-rw-r--r--src/core/SkBlitMask_D32.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/core/SkBlitMask_D32.cpp b/src/core/SkBlitMask_D32.cpp
index 1f16d775b5..008386caa5 100644
--- a/src/core/SkBlitMask_D32.cpp
+++ b/src/core/SkBlitMask_D32.cpp
@@ -353,9 +353,6 @@ static void A8_RowProc_Blend(SkPMColor* SK_RESTRICT dst,
static void A8_RowProc_Opaque(SkPMColor* SK_RESTRICT dst,
const uint8_t* SK_RESTRICT mask,
const SkPMColor* SK_RESTRICT src, int count) {
-#if 0 // suppress warning
- const uint32_t rbmask = gMask_00FF00FF;
-#endif
for (int i = 0; i < count; ++i) {
int m = mask[i];
if (m) {