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

Side by Side Diff: gm/gm.h

Issue 281383013: skiagm::make_isize -> SkISize::Make (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 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/getpostextpath.cpp ('k') | gm/gradientDirtyLaundry.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 17
18 #if SK_SUPPORT_GPU 18 #if SK_SUPPORT_GPU
19 #include "GrContext.h" 19 #include "GrContext.h"
20 #endif 20 #endif
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 namespace skiagm { 26 namespace skiagm {
27 27
28 static inline SkISize make_isize(int w, int h) {
29 SkISize sz;
30 sz.set(w, h);
31 return sz;
32 }
33
34 class GM { 28 class GM {
35 public: 29 public:
36 GM(); 30 GM();
37 virtual ~GM(); 31 virtual ~GM();
38 32
39 enum Flags { 33 enum Flags {
40 kSkipPDF_Flag = 1 << 0, 34 kSkipPDF_Flag = 1 << 0,
41 kSkipPicture_Flag = 1 << 1, 35 kSkipPicture_Flag = 1 << 1,
42 kSkipPipe_Flag = 1 << 2, 36 kSkipPipe_Flag = 1 << 2,
43 kSkipPipeCrossProcess_Flag = 1 << 3, 37 kSkipPipeCrossProcess_Flag = 1 << 3,
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 SkColor fBGColor; 125 SkColor fBGColor;
132 bool fCanvasIsDeferred; // work-around problem in srcmode.cpp 126 bool fCanvasIsDeferred; // work-around problem in srcmode.cpp
133 bool fHaveCalledOnceBeforeDraw; 127 bool fHaveCalledOnceBeforeDraw;
134 SkMatrix fStarterMatrix; 128 SkMatrix fStarterMatrix;
135 }; 129 };
136 130
137 typedef SkTRegistry<GM*(*)(void*)> GMRegistry; 131 typedef SkTRegistry<GM*(*)(void*)> GMRegistry;
138 } 132 }
139 133
140 #endif 134 #endif
OLDNEW
« no previous file with comments | « gm/getpostextpath.cpp ('k') | gm/gradientDirtyLaundry.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698