OLD | NEW |
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 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 fCanvasIsDeferred = isDeferred; | 87 fCanvasIsDeferred = isDeferred; |
88 } | 88 } |
89 | 89 |
90 const SkMatrix& getStarterMatrix() { return fStarterMatrix; } | 90 const SkMatrix& getStarterMatrix() { return fStarterMatrix; } |
91 void setStarterMatrix(const SkMatrix& matrix) { | 91 void setStarterMatrix(const SkMatrix& matrix) { |
92 fStarterMatrix = matrix; | 92 fStarterMatrix = matrix; |
93 } | 93 } |
94 | 94 |
95 protected: | 95 protected: |
96 /** draws a standard message that the GM is only intended to be used wit
h the GPU.*/ | 96 /** draws a standard message that the GM is only intended to be used wit
h the GPU.*/ |
97 void drawGpuOnlyMessage(SkCanvas* | 97 void drawGpuOnlyMessage(SkCanvas*); |
98 ); | |
99 virtual void onOnceBeforeDraw() {} | 98 virtual void onOnceBeforeDraw() {} |
100 virtual void onDraw(SkCanvas*) = 0; | 99 virtual void onDraw(SkCanvas*) = 0; |
101 virtual void onDrawBackground(SkCanvas*); | 100 virtual void onDrawBackground(SkCanvas*); |
102 virtual SkISize onISize() = 0; | 101 virtual SkISize onISize() = 0; |
103 virtual SkString onShortName() = 0; | 102 virtual SkString onShortName() = 0; |
104 | 103 |
105 virtual SkMatrix onGetInitialTransform() const { return SkMatrix::I(); } | 104 virtual SkMatrix onGetInitialTransform() const { return SkMatrix::I(); } |
106 | 105 |
107 private: | 106 private: |
108 Mode fMode; | 107 Mode fMode; |
(...skipping 17 matching lines...) Expand all Loading... |
126 SkISize onISize() SK_OVERRIDE; | 125 SkISize onISize() SK_OVERRIDE; |
127 SkString onShortName() SK_OVERRIDE; | 126 SkString onShortName() SK_OVERRIDE; |
128 private: | 127 private: |
129 SkString fName; | 128 SkString fName; |
130 void (*fDrawProc)(SkCanvas*); | 129 void (*fDrawProc)(SkCanvas*); |
131 SkISize fSize; | 130 SkISize fSize; |
132 }; | 131 }; |
133 } | 132 } |
134 | 133 |
135 #endif | 134 #endif |
OLD | NEW |