aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/xfermodes.cpp
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-12-20 14:35:32 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-12-20 14:35:32 +0000
commit263cb3a79c42ba5ecb7b3ef0752083cacbbffb4e (patch)
tree25eff12364166c3db5b10ca5d3d9e6ee0b3b4ee5 /gm/xfermodes.cpp
parent7412282c84f1ee37c02dbd2c0262962ea9de5b4a (diff)
can't pass const to setPixels :(
git-svn-id: http://skia.googlecode.com/svn/trunk@2900 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm/xfermodes.cpp')
-rw-r--r--gm/xfermodes.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/gm/xfermodes.cpp b/gm/xfermodes.cpp
index 5150727c9d..42b8a6a8ab 100644
--- a/gm/xfermodes.cpp
+++ b/gm/xfermodes.cpp
@@ -38,8 +38,6 @@ static void make_bitmaps(int w, int h, SkBitmap* src, SkBitmap* dst) {
c.drawRect(r, p);
}
-static const uint16_t gBG[] = { 0xFFFF, 0xCCCF, 0xCCCF, 0xFFFF };
-
class XfermodesGM : public GM {
SkBitmap fBG;
SkBitmap fSrcB, fDstB;
@@ -57,11 +55,11 @@ class XfermodesGM : public GM {
void init() {
if (!fOnce) {
- // Do all this work in a temporary so we get a deep copy,
- // especially of gBG.
+ // Do all this work in a temporary so we get a deep copy
+ uint16_t localData[] = { 0xFFFF, 0xCCCF, 0xCCCF, 0xFFFF };
SkBitmap scratchBitmap;
scratchBitmap.setConfig(SkBitmap::kARGB_4444_Config, 2, 2, 4);
- scratchBitmap.setPixels(gBG);
+ scratchBitmap.setPixels(localData);
scratchBitmap.setIsOpaque(true);
scratchBitmap.copyTo(&fBG, SkBitmap::kARGB_4444_Config);