OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "GrDefaultPathRenderer.h" | 8 #include "GrDefaultPathRenderer.h" |
9 | 9 |
10 #include "GrContext.h" | 10 #include "GrContext.h" |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 lastPassIsBounds = true; | 434 lastPassIsBounds = true; |
435 drawFace[passCount-1] = GrDrawState::kBoth_DrawFace; | 435 drawFace[passCount-1] = GrDrawState::kBoth_DrawFace; |
436 if (reverse) { | 436 if (reverse) { |
437 passes[passCount-1] = &gInvWindColorPass; | 437 passes[passCount-1] = &gInvWindColorPass; |
438 } else { | 438 } else { |
439 passes[passCount-1] = &gWindColorPass; | 439 passes[passCount-1] = &gWindColorPass; |
440 } | 440 } |
441 } | 441 } |
442 break; | 442 break; |
443 default: | 443 default: |
444 SkASSERT(!"Unknown path fFill!"); | 444 SkDEBUGFAIL("Unknown path fFill!"); |
445 return false; | 445 return false; |
446 } | 446 } |
447 } | 447 } |
448 } | 448 } |
449 | 449 |
450 SkRect devBounds; | 450 SkRect devBounds; |
451 GetPathDevBounds(path, drawState->getRenderTarget(), viewM, &devBounds); | 451 GetPathDevBounds(path, drawState->getRenderTarget(), viewM, &devBounds); |
452 | 452 |
453 for (int p = 0; p < passCount; ++p) { | 453 for (int p = 0; p < passCount; ++p) { |
454 drawState->setDrawFace(drawFace[p]); | 454 drawState->setDrawFace(drawFace[p]); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 false); | 512 false); |
513 } | 513 } |
514 | 514 |
515 void GrDefaultPathRenderer::onStencilPath(const SkPath& path, | 515 void GrDefaultPathRenderer::onStencilPath(const SkPath& path, |
516 const SkStrokeRec& stroke, | 516 const SkStrokeRec& stroke, |
517 GrDrawTarget* target) { | 517 GrDrawTarget* target) { |
518 SkASSERT(SkPath::kInverseEvenOdd_FillType != path.getFillType()); | 518 SkASSERT(SkPath::kInverseEvenOdd_FillType != path.getFillType()); |
519 SkASSERT(SkPath::kInverseWinding_FillType != path.getFillType()); | 519 SkASSERT(SkPath::kInverseWinding_FillType != path.getFillType()); |
520 this->internalDrawPath(path, stroke, target, true); | 520 this->internalDrawPath(path, stroke, target, true); |
521 } | 521 } |
OLD | NEW |