| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #ifndef SkPathRef_DEFINED | 9 #ifndef SkPathRef_DEFINED |
| 10 #define SkPathRef_DEFINED | 10 #define SkPathRef_DEFINED |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 */ | 228 */ |
| 229 uint8_t atVerb(int index) const { | 229 uint8_t atVerb(int index) const { |
| 230 SkASSERT((unsigned) index < (unsigned) fVerbCnt); | 230 SkASSERT((unsigned) index < (unsigned) fVerbCnt); |
| 231 return this->verbs()[~index]; | 231 return this->verbs()[~index]; |
| 232 } | 232 } |
| 233 const SkPoint& atPoint(int index) const { | 233 const SkPoint& atPoint(int index) const { |
| 234 SkASSERT((unsigned) index < (unsigned) fPointCnt); | 234 SkASSERT((unsigned) index < (unsigned) fPointCnt); |
| 235 return this->points()[index]; | 235 return this->points()[index]; |
| 236 } | 236 } |
| 237 | 237 |
| 238 const SkScalar& atConicWeight(int index) const { |
| 239 SkASSERT((unsigned) index < (unsigned) fConicWeights.count()); |
| 240 return this->conicWeights()[index]; |
| 241 } |
| 242 |
| 238 bool operator== (const SkPathRef& ref) const; | 243 bool operator== (const SkPathRef& ref) const; |
| 239 | 244 |
| 240 /** | 245 /** |
| 241 * Writes the path points and verbs to a buffer. | 246 * Writes the path points and verbs to a buffer. |
| 242 */ | 247 */ |
| 243 void writeToBuffer(SkWBuffer* buffer) const; | 248 void writeToBuffer(SkWBuffer* buffer) const; |
| 244 | 249 |
| 245 /** | 250 /** |
| 246 * Gets the number of bytes that would be written in writeBuffer() | 251 * Gets the number of bytes that would be written in writeBuffer() |
| 247 */ | 252 */ |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 kEmptyGenID = 1, // GenID reserved for path ref with zero points and zer
o verbs. | 458 kEmptyGenID = 1, // GenID reserved for path ref with zero points and zer
o verbs. |
| 454 }; | 459 }; |
| 455 mutable uint32_t fGenerationID; | 460 mutable uint32_t fGenerationID; |
| 456 SkDEBUGCODE(int32_t fEditorsAttached;) // assert that only one editor in use
at any time. | 461 SkDEBUGCODE(int32_t fEditorsAttached;) // assert that only one editor in use
at any time. |
| 457 | 462 |
| 458 friend class PathRefTest_Private; | 463 friend class PathRefTest_Private; |
| 459 typedef SkRefCnt INHERITED; | 464 typedef SkRefCnt INHERITED; |
| 460 }; | 465 }; |
| 461 | 466 |
| 462 #endif | 467 #endif |
| OLD | NEW |