diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-02-17 21:21:46 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-02-17 21:21:46 +0000 |
commit | dac522589e9395b4654a1a708f1bd971f37f95a5 (patch) | |
tree | 3190dc309541bf8b706bee789b0a9ffce1771728 /gm/drawbitmaprect.cpp | |
parent | 5c056399259bb7ec06ff1eb8ce904001b363276c (diff) |
replace SkBitmap::Config with SkColorType in gms
add helper installMaskPixels() to SkBitmap
BUG=skia:
R=halcanary@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/169913003
git-svn-id: http://skia.googlecode.com/svn/trunk@13482 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm/drawbitmaprect.cpp')
-rw-r--r-- | gm/drawbitmaprect.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gm/drawbitmaprect.cpp b/gm/drawbitmaprect.cpp index 31cba51e79..664958a06b 100644 --- a/gm/drawbitmaprect.cpp +++ b/gm/drawbitmaprect.cpp @@ -28,8 +28,8 @@ static SkBitmap make_chessbm(int w, int h) { return bm; } -static void makebm(SkBitmap* bm, SkBitmap::Config config, int w, int h) { - bm->allocConfigPixels(config, w, h); +static void makebm(SkBitmap* bm, int w, int h) { + bm->allocN32Pixels(w, h); bm->eraseColor(SK_ColorTRANSPARENT); SkCanvas canvas(*bm); @@ -89,9 +89,7 @@ protected: virtual void onDraw(SkCanvas* canvas) { static const int kBmpSize = 2048; if (fLargeBitmap.isNull()) { - makebm(&fLargeBitmap, - SkBitmap::kARGB_8888_Config, - kBmpSize, kBmpSize); + makebm(&fLargeBitmap, kBmpSize, kBmpSize); } SkRect dstRect = { 0, 0, SkIntToScalar(64), SkIntToScalar(64)}; static const int kMaxSrcRectSize = 1 << (SkNextLog2(kBmpSize) + 2); |