| 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 #ifndef SkPatchUtils_DEFINED | 8 #ifndef SkPatchUtils_DEFINED |
| 9 #define SkPatchUtils_DEFINED | 9 #define SkPatchUtils_DEFINED |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 struct VertexData { | 22 struct VertexData { |
| 23 int fVertexCount, fIndexCount; | 23 int fVertexCount, fIndexCount; |
| 24 SkPoint* fPoints; | 24 SkPoint* fPoints; |
| 25 SkPoint* fTexCoords; | 25 SkPoint* fTexCoords; |
| 26 uint32_t* fColors; | 26 uint32_t* fColors; |
| 27 uint16_t* fIndices; | 27 uint16_t* fIndices; |
| 28 | 28 |
| 29 VertexData() | 29 VertexData() |
| 30 : fVertexCount(0) | 30 : fVertexCount(0) |
| 31 , fIndexCount(0) | 31 , fIndexCount(0) |
| 32 , fPoints(NULL) | 32 , fPoints(nullptr) |
| 33 , fTexCoords(NULL) | 33 , fTexCoords(nullptr) |
| 34 , fColors(NULL) | 34 , fColors(nullptr) |
| 35 , fIndices(NULL) { } | 35 , fIndices(nullptr) { } |
| 36 | 36 |
| 37 ~VertexData() { | 37 ~VertexData() { |
| 38 delete[] fPoints; | 38 delete[] fPoints; |
| 39 delete[] fTexCoords; | 39 delete[] fTexCoords; |
| 40 delete[] fColors; | 40 delete[] fColors; |
| 41 delete[] fIndices; | 41 delete[] fIndices; |
| 42 } | 42 } |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 // Enums for control points based on the order specified in the constructor
(clockwise). | 45 // Enums for control points based on the order specified in the constructor
(clockwise). |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 * colors refers to the corner colors that will be bilerp across the patch (
optional parameter) | 112 * colors refers to the corner colors that will be bilerp across the patch (
optional parameter) |
| 113 * texCoords refers to the corner texture coordinates that will be bilerp ac
ross the patch | 113 * texCoords refers to the corner texture coordinates that will be bilerp ac
ross the patch |
| 114 (optional parameter) | 114 (optional parameter) |
| 115 */ | 115 */ |
| 116 static bool getVertexData(SkPatchUtils::VertexData* data, const SkPoint cubi
cs[12], | 116 static bool getVertexData(SkPatchUtils::VertexData* data, const SkPoint cubi
cs[12], |
| 117 const SkColor colors[4], const SkPoint texCoords[4
], | 117 const SkColor colors[4], const SkPoint texCoords[4
], |
| 118 int lodX, int lodY); | 118 int lodX, int lodY); |
| 119 }; | 119 }; |
| 120 | 120 |
| 121 #endif | 121 #endif |
| OLD | NEW |