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 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 if (!drawState->getViewMatrix().hasPerspective() && | 484 if (!drawState->getViewMatrix().hasPerspective() && |
485 drawState->getViewInverse(&vmi)) { | 485 drawState->getViewInverse(&vmi)) { |
486 vmi.mapRect(&bounds); | 486 vmi.mapRect(&bounds); |
487 } else { | 487 } else { |
488 avmr.setIdentity(drawState); | 488 avmr.setIdentity(drawState); |
489 } | 489 } |
490 } else { | 490 } else { |
491 bounds = path.getBounds(); | 491 bounds = path.getBounds(); |
492 } | 492 } |
493 GrDrawTarget::AutoGeometryAndStatePush agasp(target, GrDrawTarget::k
Preserve_ASRInit); | 493 GrDrawTarget::AutoGeometryAndStatePush agasp(target, GrDrawTarget::k
Preserve_ASRInit); |
494 target->drawSimpleRect(bounds, NULL); | 494 target->drawSimpleRect(bounds); |
495 } else { | 495 } else { |
496 if (passCount > 1) { | 496 if (passCount > 1) { |
497 drawState->enableState(GrDrawState::kNoColorWrites_StateBit); | 497 drawState->enableState(GrDrawState::kNoColorWrites_StateBit); |
498 } | 498 } |
499 if (indexCnt) { | 499 if (indexCnt) { |
500 target->drawIndexed(primType, 0, 0, | 500 target->drawIndexed(primType, 0, 0, |
501 vertexCnt, indexCnt, &devBounds); | 501 vertexCnt, indexCnt, &devBounds); |
502 } else { | 502 } else { |
503 target->drawNonIndexed(primType, 0, vertexCnt, &devBounds); | 503 target->drawNonIndexed(primType, 0, vertexCnt, &devBounds); |
504 } | 504 } |
(...skipping 23 matching lines...) Expand all Loading... |
528 false); | 528 false); |
529 } | 529 } |
530 | 530 |
531 void GrDefaultPathRenderer::onStencilPath(const SkPath& path, | 531 void GrDefaultPathRenderer::onStencilPath(const SkPath& path, |
532 const SkStrokeRec& stroke, | 532 const SkStrokeRec& stroke, |
533 GrDrawTarget* target) { | 533 GrDrawTarget* target) { |
534 SkASSERT(SkPath::kInverseEvenOdd_FillType != path.getFillType()); | 534 SkASSERT(SkPath::kInverseEvenOdd_FillType != path.getFillType()); |
535 SkASSERT(SkPath::kInverseWinding_FillType != path.getFillType()); | 535 SkASSERT(SkPath::kInverseWinding_FillType != path.getFillType()); |
536 this->internalDrawPath(path, stroke, target, true); | 536 this->internalDrawPath(path, stroke, target, true); |
537 } | 537 } |
OLD | NEW |