OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #include "gm.h" | 8 #include "gm.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkGradientShader.h" | 10 #include "SkGradientShader.h" |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 canvas->scale(0.9f, 0.9f); | 268 canvas->scale(0.9f, 0.9f); |
269 | 269 |
270 // the drawRect shows the same problem as clipRect(r) followed by drawco
lor(red) | 270 // the drawRect shows the same problem as clipRect(r) followed by drawco
lor(red) |
271 canvas->drawRect(r, paint); | 271 canvas->drawRect(r, paint); |
272 canvas->drawBitmapRect(fBM, NULL, r, NULL); | 272 canvas->drawBitmapRect(fBM, NULL, r, NULL); |
273 } | 273 } |
274 | 274 |
275 private: | 275 private: |
276 typedef skiagm::GM INHERITED; | 276 typedef skiagm::GM INHERITED; |
277 }; | 277 }; |
| 278 DEF_GM( return new BitmapRectRounding; ) |
278 | 279 |
279 ////////////////////////////////////////////////////////////////////////////// | 280 ////////////////////////////////////////////////////////////////////////////// |
280 | 281 |
281 static skiagm::GM* MyFactory0(void*) { return new DrawBitmapRect2(false); } | 282 static skiagm::GM* MyFactory0(void*) { return new DrawBitmapRect2(false); } |
282 static skiagm::GM* MyFactory1(void*) { return new DrawBitmapRect2(true); } | 283 static skiagm::GM* MyFactory1(void*) { return new DrawBitmapRect2(true); } |
283 | 284 |
284 static skiagm::GM* MyFactory2(void*) { return new DrawBitmapRect3(); } | 285 static skiagm::GM* MyFactory2(void*) { return new DrawBitmapRect3(); } |
285 | 286 |
286 #ifndef SK_BUILD_FOR_ANDROID | 287 #ifndef SK_BUILD_FOR_ANDROID |
287 static skiagm::GM* MyFactory3(void*) { return new DrawBitmapRect4(false); } | 288 static skiagm::GM* MyFactory3(void*) { return new DrawBitmapRect4(false); } |
288 static skiagm::GM* MyFactory4(void*) { return new DrawBitmapRect4(true); } | 289 static skiagm::GM* MyFactory4(void*) { return new DrawBitmapRect4(true); } |
289 #endif | 290 #endif |
290 | 291 |
291 static skiagm::GMRegistry reg0(MyFactory0); | 292 static skiagm::GMRegistry reg0(MyFactory0); |
292 static skiagm::GMRegistry reg1(MyFactory1); | 293 static skiagm::GMRegistry reg1(MyFactory1); |
293 | 294 |
294 static skiagm::GMRegistry reg2(MyFactory2); | 295 static skiagm::GMRegistry reg2(MyFactory2); |
295 | 296 |
296 #ifndef SK_BUILD_FOR_ANDROID | 297 #ifndef SK_BUILD_FOR_ANDROID |
297 static skiagm::GMRegistry reg3(MyFactory3); | 298 static skiagm::GMRegistry reg3(MyFactory3); |
298 static skiagm::GMRegistry reg4(MyFactory4); | 299 static skiagm::GMRegistry reg4(MyFactory4); |
299 #endif | 300 #endif |
300 | 301 |
301 DEF_GM( return new BitmapRectRounding; ) | |
OLD | NEW |