| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 #include "gm.h" | 8 #include "gm.h" |
| 9 #include "SkPath.h" | 9 #include "SkPath.h" |
| 10 #include "SkRegion.h" | 10 #include "SkRegion.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 SkString onShortName() { | 68 SkString onShortName() { |
| 69 SkString name("scaled_tilemodes"); | 69 SkString name("scaled_tilemodes"); |
| 70 if (!fPowerOfTwoSize) { | 70 if (!fPowerOfTwoSize) { |
| 71 name.append("_npot"); | 71 name.append("_npot"); |
| 72 } | 72 } |
| 73 return name; | 73 return name; |
| 74 } | 74 } |
| 75 | 75 |
| 76 #ifdef SK_CPU_ARM64 |
| 77 // Skip tiled drawing on 64-bit ARM until https://skbug.com/2908 is fixed. |
| 78 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
| 79 return this->INHERITED::onGetFlags() | GM::kSkipTiled_Flag; |
| 80 } |
| 81 #endif |
| 82 |
| 76 SkISize onISize() { return SkISize::Make(880, 760); } | 83 SkISize onISize() { return SkISize::Make(880, 760); } |
| 77 | 84 |
| 78 virtual void onOnceBeforeDraw() SK_OVERRIDE { | 85 virtual void onOnceBeforeDraw() SK_OVERRIDE { |
| 79 int size = fPowerOfTwoSize ? kPOTSize : kNPOTSize; | 86 int size = fPowerOfTwoSize ? kPOTSize : kNPOTSize; |
| 80 for (size_t i = 0; i < SK_ARRAY_COUNT(gColorTypes); i++) { | 87 for (size_t i = 0; i < SK_ARRAY_COUNT(gColorTypes); i++) { |
| 81 makebm(&fTexture[i], gColorTypes[i], size, size); | 88 makebm(&fTexture[i], gColorTypes[i], size, size); |
| 82 } | 89 } |
| 83 } | 90 } |
| 84 | 91 |
| 85 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { | 92 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 private: | 280 private: |
| 274 typedef skiagm::GM INHERITED; | 281 typedef skiagm::GM INHERITED; |
| 275 }; | 282 }; |
| 276 | 283 |
| 277 ////////////////////////////////////////////////////////////////////////////// | 284 ////////////////////////////////////////////////////////////////////////////// |
| 278 | 285 |
| 279 DEF_GM( return new ScaledTilingGM(true); ) | 286 DEF_GM( return new ScaledTilingGM(true); ) |
| 280 DEF_GM( return new ScaledTilingGM(false); ) | 287 DEF_GM( return new ScaledTilingGM(false); ) |
| 281 DEF_GM( return new ScaledTiling2GM(make_bm, "bitmap"); ) | 288 DEF_GM( return new ScaledTiling2GM(make_bm, "bitmap"); ) |
| 282 DEF_GM( return new ScaledTiling2GM(make_grad, "gradient"); ) | 289 DEF_GM( return new ScaledTiling2GM(make_grad, "gradient"); ) |
| OLD | NEW |