Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Side by Side Diff: gm/xfermodeimagefilter.cpp

Issue 873333004: s/sk_tools::DrawCheckerboard/sk_tool_utils::draw_checkerboard/ (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gm/tileimagefilter.cpp ('k') | gyp/SampleApp.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "gm.h" 8 #include "gm.h"
9 #include "Checkerboard.h" 9 #include "sk_tool_utils.h"
10 #include "SkArithmeticMode.h" 10 #include "SkArithmeticMode.h"
11 #include "SkOffsetImageFilter.h" 11 #include "SkOffsetImageFilter.h"
12 #include "SkXfermodeImageFilter.h" 12 #include "SkXfermodeImageFilter.h"
13 #include "SkBitmapSource.h" 13 #include "SkBitmapSource.h"
14 14
15 #define WIDTH 600 15 #define WIDTH 600
16 #define HEIGHT 600 16 #define HEIGHT 600
17 #define MARGIN 12 17 #define MARGIN 12
18 18
19 namespace skiagm { 19 namespace skiagm {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 canvas->clipRect(rect); 63 canvas->clipRect(rect);
64 canvas->drawPaint(paint); 64 canvas->drawPaint(paint);
65 canvas->restore(); 65 canvas->restore();
66 } 66 }
67 67
68 void onOnceBeforeDraw() SK_OVERRIDE { 68 void onOnceBeforeDraw() SK_OVERRIDE {
69 make_bitmap(); 69 make_bitmap();
70 70
71 fCheckerboard.allocN32Pixels(80, 80); 71 fCheckerboard.allocN32Pixels(80, 80);
72 SkCanvas checkerboardCanvas(fCheckerboard); 72 SkCanvas checkerboardCanvas(fCheckerboard);
73 sk_tools::DrawCheckerboard(&checkerboardCanvas, 0xFFA0A0A0, 0xFF404040, 8); 73 sk_tool_utils::draw_checkerboard(&checkerboardCanvas, 0xFFA0A0A0, 0xFF40 4040, 8);
74 } 74 }
75 75
76 void onDraw(SkCanvas* canvas) SK_OVERRIDE { 76 void onDraw(SkCanvas* canvas) SK_OVERRIDE {
77 canvas->clear(0x00000000); 77 canvas->clear(0x00000000);
78 SkPaint paint; 78 SkPaint paint;
79 79
80 const struct { 80 const struct {
81 SkXfermode::Mode fMode; 81 SkXfermode::Mode fMode;
82 const char* fLabel; 82 const char* fLabel;
83 } gModes[] = { 83 } gModes[] = {
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 private: 201 private:
202 SkBitmap fBitmap, fCheckerboard; 202 SkBitmap fBitmap, fCheckerboard;
203 typedef GM INHERITED; 203 typedef GM INHERITED;
204 }; 204 };
205 205
206 ////////////////////////////////////////////////////////////////////////////// 206 //////////////////////////////////////////////////////////////////////////////
207 207
208 DEF_GM( return new XfermodeImageFilterGM; ); 208 DEF_GM( return new XfermodeImageFilterGM; );
209 209
210 } 210 }
OLDNEW
« no previous file with comments | « gm/tileimagefilter.cpp ('k') | gyp/SampleApp.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698