| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "SkPath.h" | 10 #include "SkPath.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 protected: | 71 protected: |
| 72 virtual uint32_t onGetFlags() const SK_OVERRIDE { | 72 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
| 73 return kSkipTiled_Flag; | 73 return kSkipTiled_Flag; |
| 74 } | 74 } |
| 75 | 75 |
| 76 virtual SkString onShortName() { | 76 virtual SkString onShortName() { |
| 77 return SkString("path-reverse"); | 77 return SkString("path-reverse"); |
| 78 } | 78 } |
| 79 | 79 |
| 80 virtual SkISize onISize() { | 80 virtual SkISize onISize() { |
| 81 return make_isize(640, 480); | 81 return SkISize::Make(640, 480); |
| 82 } | 82 } |
| 83 | 83 |
| 84 virtual void onDraw(SkCanvas* canvas) { | 84 virtual void onDraw(SkCanvas* canvas) { |
| 85 if (false) test_rev(canvas); // avoid bit rot, suppress warning | 85 if (false) test_rev(canvas); // avoid bit rot, suppress warning |
| 86 SkRect r = { 10, 10, 100, 60 }; | 86 SkRect r = { 10, 10, 100, 60 }; |
| 87 | 87 |
| 88 SkPath path; | 88 SkPath path; |
| 89 | 89 |
| 90 path.addRect(r); test_rev(canvas, path); | 90 path.addRect(r); test_rev(canvas, path); |
| 91 | 91 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 114 private: | 114 private: |
| 115 typedef GM INHERITED; | 115 typedef GM INHERITED; |
| 116 }; | 116 }; |
| 117 | 117 |
| 118 ////////////////////////////////////////////////////////////////////////////// | 118 ////////////////////////////////////////////////////////////////////////////// |
| 119 | 119 |
| 120 static GM* MyFactory(void*) { return new PathReverseGM; } | 120 static GM* MyFactory(void*) { return new PathReverseGM; } |
| 121 static GMRegistry reg(MyFactory); | 121 static GMRegistry reg(MyFactory); |
| 122 | 122 |
| 123 } | 123 } |
| OLD | NEW |