can't pass const to setPixels :(

git-svn-id: http://skia.googlecode.com/svn/trunk@2900 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2011-12-20 14:35:32 +00:00
parent 7412282c84
commit 263cb3a79c

View File

@ -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);