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 | |
63 virtual SkString onShortName() { | 59 virtual SkString onShortName() { |
64 return SkString("bitmaprecttest"); | 60 return SkString("bitmaprecttest"); |
65 } | 61 } |
66 | 62 |
67 virtual SkISize onISize() { | 63 virtual SkISize onISize() { |
68 return SkISize::Make(320, 240); | 64 return SkISize::Make(320, 240); |
69 } | 65 } |
70 | 66 |
71 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { | 67 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { |
72 test_bitmaprect(canvas); | 68 test_bitmaprect(canvas); |
73 } | 69 } |
74 | 70 |
75 private: | 71 private: |
76 typedef skiagm::GM INHERITED; | 72 typedef skiagm::GM INHERITED; |
77 }; | 73 }; |
78 | 74 |
79 ////////////////////////////////////////////////////////////////////////////// | 75 ////////////////////////////////////////////////////////////////////////////// |
80 | 76 |
81 DEF_GM( return new BitmapRectTestGM; ) | 77 DEF_GM( return new BitmapRectTestGM; ) |
OLD | NEW |