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