OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "SkImage.h" | 10 #include "SkImage.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 canvas->translate(0, 20); | 46 canvas->translate(0, 20); |
47 } | 47 } |
48 canvas->drawImage(img, 20, 20, NULL); | 48 canvas->drawImage(img, 20, 20, NULL); |
49 } | 49 } |
50 | 50 |
51 class MipMapGM : public skiagm::GM { | 51 class MipMapGM : public skiagm::GM { |
52 public: | 52 public: |
53 MipMapGM() {} | 53 MipMapGM() {} |
54 | 54 |
55 protected: | 55 protected: |
56 SkString onShortName() SK_OVERRIDE { return SkString("mipmap"); } | 56 SkString onShortName() override { return SkString("mipmap"); } |
57 | 57 |
58 SkISize onISize() SK_OVERRIDE { return SkISize::Make(400, 200); } | 58 SkISize onISize() override { return SkISize::Make(400, 200); } |
59 | 59 |
60 void onDraw(SkCanvas* canvas) SK_OVERRIDE { | 60 void onDraw(SkCanvas* canvas) override { |
61 test_mip(canvas); | 61 test_mip(canvas); |
62 } | 62 } |
63 | 63 |
64 private: | 64 private: |
65 typedef skiagm::GM INHERITED; | 65 typedef skiagm::GM INHERITED; |
66 }; | 66 }; |
67 DEF_GM( return new MipMapGM; ) | 67 DEF_GM( return new MipMapGM; ) |
68 | 68 |
OLD | NEW |