OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 // This test only works with the GPU backend. | 8 // This test only works with the GPU backend. |
9 | 9 |
10 #include "gm.h" | 10 #include "gm.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 renderRect, null
ptr, nullptr)); | 131 renderRect, null
ptr, nullptr)); |
132 drawContext->drawContextPriv().testingOnly_drawBatch(grPaint
, batch); | 132 drawContext->drawContextPriv().testingOnly_drawBatch(grPaint
, batch); |
133 x += renderRect.width() + kTestPad; | 133 x += renderRect.width() + kTestPad; |
134 } | 134 } |
135 y += renderRect.height() + kTestPad; | 135 y += renderRect.height() + kTestPad; |
136 } | 136 } |
137 } | 137 } |
138 } | 138 } |
139 | 139 |
140 private: | 140 private: |
141 static const SkScalar kDrawPad; | 141 static constexpr SkScalar kDrawPad = 10.f; |
142 static const SkScalar kTestPad; | 142 static constexpr SkScalar kTestPad = 10.f;; |
143 static const int kTargetWidth = 100; | 143 static constexpr int kTargetWidth = 100; |
144 static const int kTargetHeight = 100; | 144 static constexpr int kTargetHeight = 100; |
145 SkBitmap fBmp; | 145 SkBitmap fBmp; |
146 | 146 |
147 typedef GM INHERITED; | 147 typedef GM INHERITED; |
148 }; | 148 }; |
149 | 149 |
150 // Windows builds did not like SkScalar initialization in class :( | |
151 const SkScalar TextureDomainEffect::kDrawPad = 10.f; | |
152 const SkScalar TextureDomainEffect::kTestPad = 10.f; | |
153 | |
154 DEF_GM(return new TextureDomainEffect;) | 150 DEF_GM(return new TextureDomainEffect;) |
155 } | 151 } |
156 | 152 |
157 #endif | 153 #endif |
OLD | NEW |