diff options
author | rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-23 18:14:13 +0000 |
---|---|---|
committer | rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-23 18:14:13 +0000 |
commit | d6176b0dcacb124539e0cfd051e6d93a9782f020 (patch) | |
tree | 9e6f4b465e54c9b26e1ba70cd8890b55abb08464 /gm/tablecolorfilter.cpp | |
parent | fbfcd5602128ec010c82cb733c9cdc0a3254f9f3 (diff) |
Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)
This CL is part II of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6474054
git-svn-id: http://skia.googlecode.com/svn/trunk@5263 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm/tablecolorfilter.cpp')
-rw-r--r-- | gm/tablecolorfilter.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gm/tablecolorfilter.cpp b/gm/tablecolorfilter.cpp index 6e2b943ce7..c8806f904d 100644 --- a/gm/tablecolorfilter.cpp +++ b/gm/tablecolorfilter.cpp @@ -16,7 +16,7 @@ static void make_bm0(SkBitmap* bm) { bm->setConfig(SkBitmap::kARGB_8888_Config, W, H); bm->allocPixels(); bm->eraseColor(0); - + SkCanvas canvas(*bm); SkPaint paint; SkPoint pts[] = { {0, 0}, {SkIntToScalar(W), SkIntToScalar(H)} }; @@ -35,7 +35,7 @@ static void make_bm1(SkBitmap* bm) { bm->setConfig(SkBitmap::kARGB_8888_Config, W, H); bm->allocPixels(); bm->eraseColor(0); - + SkCanvas canvas(*bm); SkPaint paint; SkScalar cx = SkIntToScalar(W)/2; @@ -92,27 +92,27 @@ static SkColorFilter* make_cf3() { class TableColorFilterGM : public skiagm::GM { public: TableColorFilterGM() {} - + protected: virtual SkString onShortName() { return SkString("tablecolorfilter"); } - + virtual SkISize onISize() { return SkISize::Make(700, 300); } - + virtual void onDraw(SkCanvas* canvas) { canvas->drawColor(0xFFDDDDDD); canvas->translate(20, 20); - + SkScalar x = 0, y = 0; - + static void (*gMakers[])(SkBitmap*) = { make_bm0, make_bm1 }; for (size_t maker = 0; maker < SK_ARRAY_COUNT(gMakers); ++maker) { SkBitmap bm; gMakers[maker](&bm); - + SkPaint paint; x = 0; canvas->drawBitmap(bm, x, y, &paint); @@ -124,11 +124,11 @@ protected: canvas->drawBitmap(bm, x, y, &paint); paint.setColorFilter(make_cf3())->unref(); x += bm.width() * 9 / 8; canvas->drawBitmap(bm, x, y, &paint); - + y += bm.height() * 9 / 8; } } - + private: typedef GM INHERITED; }; |