| 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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 case SkPath::kConic_Verb: | 417 case SkPath::kConic_Verb: |
| 418 pCnt = 2; | 418 pCnt = 2; |
| 419 break; | 419 break; |
| 420 case SkPath::kCubic_Verb: | 420 case SkPath::kCubic_Verb: |
| 421 pCnt = 3; | 421 pCnt = 3; |
| 422 break; | 422 break; |
| 423 case SkPath::kClose_Verb: | 423 case SkPath::kClose_Verb: |
| 424 pCnt = 0; | 424 pCnt = 0; |
| 425 break; | 425 break; |
| 426 case SkPath::kDone_Verb: | 426 case SkPath::kDone_Verb: |
| 427 SkASSERT(!"growForVerb called for kDone"); | 427 SkDEBUGFAIL("growForVerb called for kDone"); |
| 428 // fall through | 428 // fall through |
| 429 default: | 429 default: |
| 430 SkASSERT(!"default is not reached"); | 430 SkDEBUGFAIL("default is not reached"); |
| 431 pCnt = 0; | 431 pCnt = 0; |
| 432 } | 432 } |
| 433 size_t space = sizeof(uint8_t) + pCnt * sizeof (SkPoint); | 433 size_t space = sizeof(uint8_t) + pCnt * sizeof (SkPoint); |
| 434 this->makeSpace(space); | 434 this->makeSpace(space); |
| 435 this->fVerbs[~fVerbCnt] = verb; | 435 this->fVerbs[~fVerbCnt] = verb; |
| 436 SkPoint* ret = fPoints + fPointCnt; | 436 SkPoint* ret = fPoints + fPointCnt; |
| 437 fVerbCnt += 1; | 437 fVerbCnt += 1; |
| 438 fPointCnt += pCnt; | 438 fPointCnt += pCnt; |
| 439 fFreeSpace -= space; | 439 fFreeSpace -= space; |
| 440 this->validate(); | 440 this->validate(); |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 }; | 542 }; |
| 543 mutable int32_t fGenerationID; | 543 mutable int32_t fGenerationID; |
| 544 SkDEBUGCODE(int32_t fEditorsAttached;) // assert that only one editor in use
at any time. | 544 SkDEBUGCODE(int32_t fEditorsAttached;) // assert that only one editor in use
at any time. |
| 545 | 545 |
| 546 typedef SkRefCnt INHERITED; | 546 typedef SkRefCnt INHERITED; |
| 547 }; | 547 }; |
| 548 | 548 |
| 549 SK_DEFINE_INST_COUNT(SkPathRef); | 549 SK_DEFINE_INST_COUNT(SkPathRef); |
| 550 | 550 |
| 551 #endif | 551 #endif |
| OLD | NEW |