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

Side by Side Diff: gm/gm.h

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT Created 5 years, 3 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/giantbitmap.cpp ('k') | gm/gradients_no_texture.cpp » ('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 2011 Google Inc. 2 * Copyright 2011 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 #ifndef skiagm_DEFINED 8 #ifndef skiagm_DEFINED
9 #define skiagm_DEFINED 9 #define skiagm_DEFINED
10 10
11 #include "SkBitmap.h" 11 #include "SkBitmap.h"
12 #include "SkCanvas.h" 12 #include "SkCanvas.h"
13 #include "SkPaint.h" 13 #include "SkPaint.h"
14 #include "SkSize.h" 14 #include "SkSize.h"
15 #include "SkString.h" 15 #include "SkString.h"
16 #include "SkTRegistry.h" 16 #include "SkTRegistry.h"
17 #include "sk_tool_utils.h" 17 #include "sk_tool_utils.h"
18 18
19 class SkAnimTimer; 19 class SkAnimTimer;
20 struct GrContextOptions; 20 struct GrContextOptions;
21 21
22 #define DEF_GM(code) \ 22 #define DEF_GM(code) \
23 static skiagm::GM* SK_MACRO_APPEND_LINE(F_)(void*) { code; } \ 23 static skiagm::GM* SK_MACRO_APPEND_LINE(F_)(void*) { code; } \
24 static skiagm::GMRegistry SK_MACRO_APPEND_LINE(R_)(SK_MACRO_APPEND_LINE(F_ )); 24 static skiagm::GMRegistry SK_MACRO_APPEND_LINE(R_)(SK_MACRO_APPEND_LINE(F_ ));
25 25
26 // See colorwheel.cpp for example usage. 26 // See colorwheel.cpp for example usage.
27 #define DEF_SIMPLE_GM(NAME, CANVAS, W, H) \ 27 #define DEF_SIMPLE_GM(NAME, CANVAS, W, H) \
28 static void SK_MACRO_CONCAT(NAME, _GM)(SkCanvas* CANVAS); \ 28 static void SK_MACRO_CONCAT(NAME, _GM)(SkCanvas * CANVAS); \
29 DEF_GM( return SkNEW_ARGS(skiagm::SimpleGM, \ 29 DEF_GM(return new skiagm::SimpleGM(SkString(#NAME), SK_MACRO_CONCAT(NAME, _G M), \
30 (SkString(#NAME), \ 30 SkISize::Make(W, H));) \
31 SK_MACRO_CONCAT(NAME, _GM), \ 31 void SK_MACRO_CONCAT(NAME, _GM)(SkCanvas * CANVAS)
32 SkISize::Make(W, H))); ) \
33 void SK_MACRO_CONCAT(NAME, _GM)(SkCanvas* CANVAS)
34 32
35 namespace skiagm { 33 namespace skiagm {
36 34
37 class GM { 35 class GM {
38 public: 36 public:
39 GM(); 37 GM();
40 virtual ~GM(); 38 virtual ~GM();
41 39
42 enum Mode { 40 enum Mode {
43 kGM_Mode, 41 kGM_Mode,
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 SkISize onISize() override; 127 SkISize onISize() override;
130 SkString onShortName() override; 128 SkString onShortName() override;
131 private: 129 private:
132 SkString fName; 130 SkString fName;
133 void (*fDrawProc)(SkCanvas*); 131 void (*fDrawProc)(SkCanvas*);
134 SkISize fSize; 132 SkISize fSize;
135 }; 133 };
136 } 134 }
137 135
138 #endif 136 #endif
OLDNEW
« no previous file with comments | « gm/giantbitmap.cpp ('k') | gm/gradients_no_texture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698