| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 #include "gm.h" | 8 #include "gm.h" |
| 9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 10 #include "SkPaint.h" | 10 #include "SkPaint.h" |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 } | 407 } |
| 408 }; | 408 }; |
| 409 | 409 |
| 410 ////////////////////////////////////////////////////////////////////////////// | 410 ////////////////////////////////////////////////////////////////////////////// |
| 411 | 411 |
| 412 class Dashing5GM : public skiagm::GM { | 412 class Dashing5GM : public skiagm::GM { |
| 413 public: | 413 public: |
| 414 Dashing5GM(bool doAA) : fDoAA(doAA) {} | 414 Dashing5GM(bool doAA) : fDoAA(doAA) {} |
| 415 | 415 |
| 416 protected: | 416 protected: |
| 417 uint32_t onGetFlags() const SK_OVERRIDE { return kAsBench_Flag | kSkipTiled_
Flag; } | 417 uint32_t onGetFlags() const SK_OVERRIDE { return kSkipTiled_Flag; } |
| 418 | 418 |
| 419 SkString onShortName() SK_OVERRIDE { | 419 bool runAsBench() const SK_OVERRIDE { return true; } |
| 420 |
| 421 SkString onShortName() SK_OVERRIDE { |
| 420 if (fDoAA) { | 422 if (fDoAA) { |
| 421 return SkString("dashing5_aa"); | 423 return SkString("dashing5_aa"); |
| 422 } else { | 424 } else { |
| 423 return SkString("dashing5_bw"); | 425 return SkString("dashing5_bw"); |
| 424 } | 426 } |
| 425 } | 427 } |
| 426 | 428 |
| 427 SkISize onISize() SK_OVERRIDE { return SkISize::Make(400, 200); } | 429 SkISize onISize() SK_OVERRIDE { return SkISize::Make(400, 200); } |
| 428 | 430 |
| 429 void onDraw(SkCanvas* canvas) SK_OVERRIDE { | 431 void onDraw(SkCanvas* canvas) SK_OVERRIDE { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 | 487 |
| 486 ////////////////////////////////////////////////////////////////////////////// | 488 ////////////////////////////////////////////////////////////////////////////// |
| 487 | 489 |
| 488 DEF_GM(return SkNEW(DashingGM);) | 490 DEF_GM(return SkNEW(DashingGM);) |
| 489 DEF_GM(return SkNEW(Dashing2GM);) | 491 DEF_GM(return SkNEW(Dashing2GM);) |
| 490 DEF_GM(return SkNEW(Dashing3GM);) | 492 DEF_GM(return SkNEW(Dashing3GM);) |
| 491 DEF_GM(return SkNEW(Dashing4GM);) | 493 DEF_GM(return SkNEW(Dashing4GM);) |
| 492 DEF_GM(return SkNEW_ARGS(Dashing5GM, (true));) | 494 DEF_GM(return SkNEW_ARGS(Dashing5GM, (true));) |
| 493 DEF_GM(return SkNEW_ARGS(Dashing5GM, (false));) | 495 DEF_GM(return SkNEW_ARGS(Dashing5GM, (false));) |
| 494 | 496 |
| OLD | NEW |