| 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 "SkBitmapDevice.h" | 9 #include "SkBitmapDevice.h" |
| 10 #include "SkBitmapSource.h" | 10 #include "SkBitmapSource.h" |
| 11 #include "SkColor.h" | 11 #include "SkColor.h" |
| 12 #include "SkMatrixImageFilter.h" | 12 #include "SkMatrixImageFilter.h" |
| 13 #include "SkRefCnt.h" | 13 #include "SkRefCnt.h" |
| 14 | 14 |
| 15 namespace skiagm { | 15 namespace skiagm { |
| 16 | 16 |
| 17 class ResizeGM : public GM { | 17 class ResizeGM : public GM { |
| 18 public: | 18 public: |
| 19 ResizeGM() { | 19 ResizeGM() { |
| 20 this->setBGColor(0x00000000); | 20 this->setBGColor(0x00000000); |
| 21 } | 21 } |
| 22 | 22 |
| 23 protected: | 23 protected: |
| 24 virtual SkString onShortName() { | 24 virtual SkString onShortName() { |
| 25 return SkString("resizeimagefilter"); | 25 return SkString("resizeimagefilter"); |
| 26 } | 26 } |
| 27 | 27 |
| 28 #ifdef SK_CPU_ARM64 | 28 #ifdef SK_CPU_ARM64 |
| 29 // Skip tiled drawing on 64-bit ARM until https://skbug.com/2908 is fixed. | 29 // Skip tiled drawing on 64-bit ARM until https://skbug.com/2908 is fixed. |
| 30 virtual uint32_t onGetFlags() const SK_OVERRIDE { | 30 uint32_t onGetFlags() const SK_OVERRIDE { |
| 31 return kSkipTiled_Flag; | 31 return kSkipTiled_Flag; |
| 32 } | 32 } |
| 33 #endif | 33 #endif |
| 34 | 34 |
| 35 void draw(SkCanvas* canvas, | 35 void draw(SkCanvas* canvas, |
| 36 const SkRect& rect, | 36 const SkRect& rect, |
| 37 const SkSize& deviceSize, | 37 const SkSize& deviceSize, |
| 38 SkPaint::FilterLevel filterLevel, | 38 SkPaint::FilterLevel filterLevel, |
| 39 SkImageFilter* input = NULL) { | 39 SkImageFilter* input = NULL) { |
| 40 SkRect dstRect; | 40 SkRect dstRect; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 private: | 121 private: |
| 122 typedef GM INHERITED; | 122 typedef GM INHERITED; |
| 123 }; | 123 }; |
| 124 | 124 |
| 125 ////////////////////////////////////////////////////////////////////////////// | 125 ////////////////////////////////////////////////////////////////////////////// |
| 126 | 126 |
| 127 static GM* MyFactory(void*) { return new ResizeGM; } | 127 static GM* MyFactory(void*) { return new ResizeGM; } |
| 128 static GMRegistry reg(MyFactory); | 128 static GMRegistry reg(MyFactory); |
| 129 | 129 |
| 130 } | 130 } |
| OLD | NEW |