| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "SkPaint.h" | 10 #include "SkPaint.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 canvas->drawLine(pictureSize * 1 / 3, pictureSize / 2, | 75 canvas->drawLine(pictureSize * 1 / 3, pictureSize / 2, |
| 76 pictureSize * 2 / 3, pictureSize / 2, paint); | 76 pictureSize * 2 / 3, pictureSize / 2, paint); |
| 77 | 77 |
| 78 paint.setColor(SK_ColorBLACK); | 78 paint.setColor(SK_ColorBLACK); |
| 79 paint.setStyle(SkPaint::kStroke_Style); | 79 paint.setStyle(SkPaint::kStroke_Style); |
| 80 canvas->drawRect(SkRect::MakeWH(pictureSize, pictureSize), paint); | 80 canvas->drawRect(SkRect::MakeWH(pictureSize, pictureSize), paint); |
| 81 } | 81 } |
| 82 | 82 |
| 83 class PictureShaderTileGM : public skiagm::GM { | 83 class PictureShaderTileGM : public skiagm::GM { |
| 84 protected: | 84 protected: |
| 85 uint32_t onGetFlags() const SK_OVERRIDE { | |
| 86 return kSkipTiled_Flag; | |
| 87 } | |
| 88 | 85 |
| 89 SkString onShortName() SK_OVERRIDE { | 86 SkString onShortName() SK_OVERRIDE { |
| 90 return SkString("pictureshadertile"); | 87 return SkString("pictureshadertile"); |
| 91 } | 88 } |
| 92 | 89 |
| 93 SkISize onISize() SK_OVERRIDE { | 90 SkISize onISize() SK_OVERRIDE { |
| 94 return SkISize::Make(800, 600); | 91 return SkISize::Make(800, 600); |
| 95 } | 92 } |
| 96 | 93 |
| 97 void onOnceBeforeDraw() SK_OVERRIDE { | 94 void onOnceBeforeDraw() SK_OVERRIDE { |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 } | 149 } |
| 153 } | 150 } |
| 154 | 151 |
| 155 private: | 152 private: |
| 156 SkAutoTUnref<SkShader> fShaders[SK_ARRAY_COUNT(tiles)]; | 153 SkAutoTUnref<SkShader> fShaders[SK_ARRAY_COUNT(tiles)]; |
| 157 | 154 |
| 158 typedef GM INHERITED; | 155 typedef GM INHERITED; |
| 159 }; | 156 }; |
| 160 | 157 |
| 161 DEF_GM( return SkNEW(PictureShaderTileGM); ) | 158 DEF_GM( return SkNEW(PictureShaderTileGM); ) |
| OLD | NEW |