Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(344)

Side by Side Diff: src/core/SkPathRef.h

Issue 17572010: Build fix for [-Werror=maybe-uninitialized]. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/core/SkAAClip.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 SkPoint* growForVerb(SkPath::Verb verb) { 463 SkPoint* growForVerb(SkPath::Verb verb) {
464 this->validate(); 464 this->validate();
465 int pCnt; 465 int pCnt;
466 switch (verb) { 466 switch (verb) {
467 case SkPath::kMove_Verb: 467 case SkPath::kMove_Verb:
468 pCnt = 1; 468 pCnt = 1;
469 break; 469 break;
470 case SkPath::kLine_Verb: 470 case SkPath::kLine_Verb:
471 pCnt = 1; 471 pCnt = 1;
472 break; 472 break;
473 case SkPath::kQuad_Verb:
474 // fall through
473 case SkPath::kConic_Verb: 475 case SkPath::kConic_Verb:
474 case SkPath::kQuad_Verb:
475 pCnt = 2; 476 pCnt = 2;
476 break; 477 break;
477 case SkPath::kCubic_Verb: 478 case SkPath::kCubic_Verb:
478 pCnt = 3; 479 pCnt = 3;
479 break; 480 break;
481 case SkPath::kClose_Verb:
482 pCnt = 0;
483 break;
480 case SkPath::kDone_Verb: 484 case SkPath::kDone_Verb:
481 SkASSERT(!"growForVerb called for kDone"); 485 SkASSERT(!"growForVerb called for kDone");
482 // fall through 486 // fall through
483 case SkPath::kClose_Verb: 487 default:
488 SkASSERT(!"default is not reached");
484 pCnt = 0; 489 pCnt = 0;
dshwang 2013/07/03 07:50:26 How about this change. now case statements are sor
485 } 490 }
486 size_t space = sizeof(uint8_t) + pCnt * sizeof (SkPoint); 491 size_t space = sizeof(uint8_t) + pCnt * sizeof (SkPoint);
487 this->makeSpace(space); 492 this->makeSpace(space);
488 this->fVerbs[~fVerbCnt] = verb; 493 this->fVerbs[~fVerbCnt] = verb;
489 SkPoint* ret = fPoints + fPointCnt; 494 SkPoint* ret = fPoints + fPointCnt;
490 fVerbCnt += 1; 495 fVerbCnt += 1;
491 fPointCnt += pCnt; 496 fPointCnt += pCnt;
492 fFreeSpace -= space; 497 fFreeSpace -= space;
493 this->validate(); 498 this->validate();
494 return ret; 499 return ret;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 #if SK_DEBUG_PATH_REF 604 #if SK_DEBUG_PATH_REF
600 SkTDArray<SkPath*> fOwners; 605 SkTDArray<SkPath*> fOwners;
601 #endif 606 #endif
602 607
603 typedef SkRefCnt INHERITED; 608 typedef SkRefCnt INHERITED;
604 }; 609 };
605 610
606 SK_DEFINE_INST_COUNT(SkPathRef); 611 SK_DEFINE_INST_COUNT(SkPathRef);
607 612
608 #endif 613 #endif
OLDNEW
« no previous file with comments | « src/core/SkAAClip.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698