OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 | 10 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 canvas->drawBitmap(bm, -310, 45, NULL); | 49 canvas->drawBitmap(bm, -310, 45, NULL); |
50 } | 50 } |
51 | 51 |
52 class BitmapRectTestGM : public skiagm::GM { | 52 class BitmapRectTestGM : public skiagm::GM { |
53 public: | 53 public: |
54 BitmapRectTestGM() { | 54 BitmapRectTestGM() { |
55 | 55 |
56 } | 56 } |
57 | 57 |
58 protected: | 58 protected: |
| 59 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
| 60 return kSkipTiled_Flag; |
| 61 } |
| 62 |
59 virtual SkString onShortName() { | 63 virtual SkString onShortName() { |
60 return SkString("bitmaprecttest"); | 64 return SkString("bitmaprecttest"); |
61 } | 65 } |
62 | 66 |
63 virtual SkISize onISize() { | 67 virtual SkISize onISize() { |
64 return SkISize::Make(320, 240); | 68 return SkISize::Make(320, 240); |
65 } | 69 } |
66 | 70 |
67 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { | 71 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { |
68 test_bitmaprect(canvas); | 72 test_bitmaprect(canvas); |
69 } | 73 } |
70 | 74 |
71 private: | 75 private: |
72 typedef skiagm::GM INHERITED; | 76 typedef skiagm::GM INHERITED; |
73 }; | 77 }; |
74 | 78 |
75 ////////////////////////////////////////////////////////////////////////////// | 79 ////////////////////////////////////////////////////////////////////////////// |
76 | 80 |
77 DEF_GM( return new BitmapRectTestGM; ) | 81 DEF_GM( return new BitmapRectTestGM; ) |
OLD | NEW |