| 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 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 */ | 414 */ |
| 415 size_t currSize() const { | 415 size_t currSize() const { |
| 416 return reinterpret_cast<intptr_t>(fVerbs) - reinterpret_cast<intptr_t>(f
Points); | 416 return reinterpret_cast<intptr_t>(fVerbs) - reinterpret_cast<intptr_t>(f
Points); |
| 417 } | 417 } |
| 418 | 418 |
| 419 SkDEBUGCODE(void validate() const;) | 419 SkDEBUGCODE(void validate() const;) |
| 420 | 420 |
| 421 /** | 421 /** |
| 422 * Called the first time someone calls CreateEmpty to actually create the si
ngleton. | 422 * Called the first time someone calls CreateEmpty to actually create the si
ngleton. |
| 423 */ | 423 */ |
| 424 static SkPathRef* CreateEmptyImpl(); | 424 friend SkPathRef* sk_create_empty_pathref(); |
| 425 | 425 |
| 426 void setIsOval(bool isOval) { fIsOval = isOval; } | 426 void setIsOval(bool isOval) { fIsOval = isOval; } |
| 427 | 427 |
| 428 SkPoint* getPoints() { | 428 SkPoint* getPoints() { |
| 429 SkDEBUGCODE(this->validate();) | 429 SkDEBUGCODE(this->validate();) |
| 430 fIsOval = false; | 430 fIsOval = false; |
| 431 return fPoints; | 431 return fPoints; |
| 432 } | 432 } |
| 433 | 433 |
| 434 enum { | 434 enum { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 453 kEmptyGenID = 1, // GenID reserved for path ref with zero points and zer
o verbs. | 453 kEmptyGenID = 1, // GenID reserved for path ref with zero points and zer
o verbs. |
| 454 }; | 454 }; |
| 455 mutable uint32_t fGenerationID; | 455 mutable uint32_t fGenerationID; |
| 456 SkDEBUGCODE(int32_t fEditorsAttached;) // assert that only one editor in use
at any time. | 456 SkDEBUGCODE(int32_t fEditorsAttached;) // assert that only one editor in use
at any time. |
| 457 | 457 |
| 458 friend class PathRefTest_Private; | 458 friend class PathRefTest_Private; |
| 459 typedef SkRefCnt INHERITED; | 459 typedef SkRefCnt INHERITED; |
| 460 }; | 460 }; |
| 461 | 461 |
| 462 #endif | 462 #endif |
| OLD | NEW |