| 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 "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 10 #include "SkColorFilter.h" | 10 #include "SkColorFilter.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 SkString name("vertices"); | 72 SkString name("vertices"); |
| 73 return name; | 73 return name; |
| 74 } | 74 } |
| 75 | 75 |
| 76 SkISize onISize() override { | 76 SkISize onISize() override { |
| 77 return SkISize::Make(600, 600); | 77 return SkISize::Make(600, 600); |
| 78 } | 78 } |
| 79 | 79 |
| 80 void onDraw(SkCanvas* canvas) override { | 80 void onDraw(SkCanvas* canvas) override { |
| 81 // start with the center of a 3x3 grid | 81 // start with the center of a 3x3 grid |
| 82 static const uint16_t fan[] = { | 82 constexpr uint16_t fan[] = { |
| 83 4, | 83 4, |
| 84 0, 1, 2, 5, 8, 7, 6, 3, 0 | 84 0, 1, 2, 5, 8, 7, 6, 3, 0 |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 const struct { | 87 const struct { |
| 88 const SkColor* fColors; | 88 const SkColor* fColors; |
| 89 const SkPoint* fTexs; | 89 const SkPoint* fTexs; |
| 90 const sk_sp<SkShader>& fShader; | 90 const sk_sp<SkShader>& fShader; |
| 91 const sk_sp<SkColorFilter>& fColorFilter; | 91 const sk_sp<SkColorFilter>& fColorFilter; |
| 92 uint8_t fAlpha; | 92 uint8_t fAlpha; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 } | 173 } |
| 174 } | 174 } |
| 175 | 175 |
| 176 private: | 176 private: |
| 177 typedef skiagm::GM INHERITED; | 177 typedef skiagm::GM INHERITED; |
| 178 }; | 178 }; |
| 179 | 179 |
| 180 ////////////////////////////////////////////////////////////////////////////////
///// | 180 ////////////////////////////////////////////////////////////////////////////////
///// |
| 181 | 181 |
| 182 DEF_GM(return new VerticesGM();) | 182 DEF_GM(return new VerticesGM();) |
| OLD | NEW |