| 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 GrPathRange_DEFINED | 8 #ifndef GrPathRange_DEFINED |
| 9 #define GrPathRange_DEFINED | 9 #define GrPathRange_DEFINED |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 return type; | 31 return type; |
| 32 } | 32 } |
| 33 | 33 |
| 34 /** | 34 /** |
| 35 * Initialize to a range with a fixed size and stroke. Stroke must not be ha
irline. | 35 * Initialize to a range with a fixed size and stroke. Stroke must not be ha
irline. |
| 36 */ | 36 */ |
| 37 GrPathRange(GrGpu* gpu, size_t size, const SkStrokeRec& stroke) | 37 GrPathRange(GrGpu* gpu, size_t size, const SkStrokeRec& stroke) |
| 38 : INHERITED(gpu, kIsWrapped), | 38 : INHERITED(gpu, kIsWrapped), |
| 39 fSize(size), | 39 fSize(size), |
| 40 fStroke(stroke) { | 40 fStroke(stroke) { |
| 41 this->registerWithCache(); | |
| 42 } | 41 } |
| 43 | 42 |
| 44 size_t getSize() const { return fSize; } | 43 size_t getSize() const { return fSize; } |
| 45 const SkStrokeRec& getStroke() const { return fStroke; } | 44 const SkStrokeRec& getStroke() const { return fStroke; } |
| 46 | 45 |
| 47 /** | 46 /** |
| 48 * Initialize a path in the range. It is invalid to call this method for a | 47 * Initialize a path in the range. It is invalid to call this method for a |
| 49 * path that has already been initialized. | 48 * path that has already been initialized. |
| 50 */ | 49 */ |
| 51 virtual void initAt(size_t index, const SkPath&) = 0; | 50 virtual void initAt(size_t index, const SkPath&) = 0; |
| 52 | 51 |
| 53 protected: | 52 protected: |
| 54 size_t fSize; | 53 size_t fSize; |
| 55 SkStrokeRec fStroke; | 54 SkStrokeRec fStroke; |
| 56 | 55 |
| 57 private: | 56 private: |
| 58 typedef GrGpuResource INHERITED; | 57 typedef GrGpuResource INHERITED; |
| 59 }; | 58 }; |
| 60 | 59 |
| 61 #endif | 60 #endif |
| OLD | NEW |