| 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 | 9 |
| 10 #include "Resources.h" | 10 #include "Resources.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 68 |
| 69 FilterIndiaBoxGM(const char filename[]) : fFilename(filename) { | 69 FilterIndiaBoxGM(const char filename[]) : fFilename(filename) { |
| 70 fName.printf("filterindiabox"); | 70 fName.printf("filterindiabox"); |
| 71 } | 71 } |
| 72 | 72 |
| 73 protected: | 73 protected: |
| 74 virtual SkString onShortName() SK_OVERRIDE { | 74 virtual SkString onShortName() SK_OVERRIDE { |
| 75 return fName; | 75 return fName; |
| 76 } | 76 } |
| 77 | 77 |
| 78 #ifdef SK_CPU_ARM64 |
| 79 // Skip tiled drawing on 64-bit ARM until https://skbug.com/2908 is fixed. |
| 80 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
| 81 return kSkipTiled_Flag; |
| 82 } |
| 83 #endif |
| 84 |
| 78 virtual SkISize onISize() SK_OVERRIDE { | 85 virtual SkISize onISize() SK_OVERRIDE { |
| 79 return SkISize::Make(1024, 768); | 86 return SkISize::Make(1024, 768); |
| 80 } | 87 } |
| 81 | 88 |
| 82 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { | 89 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { |
| 83 canvas->translate(10, 10); | 90 canvas->translate(10, 10); |
| 84 for (size_t i = 0; i < SK_ARRAY_COUNT(fMatrix); ++i) { | 91 for (size_t i = 0; i < SK_ARRAY_COUNT(fMatrix); ++i) { |
| 85 SkSize size = computeSize(fBM, fMatrix[i]); | 92 SkSize size = computeSize(fBM, fMatrix[i]); |
| 86 size.fWidth += 20; | 93 size.fWidth += 20; |
| 87 size.fHeight += 20; | 94 size.fHeight += 20; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 117 fSize = fBM.height(); | 124 fSize = fBM.height(); |
| 118 } | 125 } |
| 119 private: | 126 private: |
| 120 typedef skiagm::GM INHERITED; | 127 typedef skiagm::GM INHERITED; |
| 121 }; | 128 }; |
| 122 | 129 |
| 123 ////////////////////////////////////////////////////////////////////////////// | 130 ////////////////////////////////////////////////////////////////////////////// |
| 124 | 131 |
| 125 | 132 |
| 126 DEF_GM( return new FilterIndiaBoxGM("box.gif"); ) | 133 DEF_GM( return new FilterIndiaBoxGM("box.gif"); ) |
| OLD | NEW |