OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 "GrClipMaskManager.h" | 8 #include "GrClipMaskManager.h" |
9 #include "GrCaps.h" | 9 #include "GrCaps.h" |
10 #include "GrDrawContext.h" | 10 #include "GrDrawContext.h" |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 fDrawTarget->drawAARect(*pipelineBuilder, color, viewMatrix, | 441 fDrawTarget->drawAARect(*pipelineBuilder, color, viewMatrix, |
442 element->getRect(), devRect); | 442 element->getRect(), devRect); |
443 } else { | 443 } else { |
444 fDrawTarget->drawNonAARect(*pipelineBuilder, color, viewMatrix, | 444 fDrawTarget->drawNonAARect(*pipelineBuilder, color, viewMatrix, |
445 element->getRect()); | 445 element->getRect()); |
446 } | 446 } |
447 return true; | 447 return true; |
448 default: { | 448 default: { |
449 SkPath path; | 449 SkPath path; |
450 element->asPath(&path); | 450 element->asPath(&path); |
| 451 path.setIsVolatile(true); |
451 if (path.isInverseFillType()) { | 452 if (path.isInverseFillType()) { |
452 path.toggleInverseFillType(); | 453 path.toggleInverseFillType(); |
453 } | 454 } |
454 GrStrokeInfo stroke(SkStrokeRec::kFill_InitStyle); | 455 GrStrokeInfo stroke(SkStrokeRec::kFill_InitStyle); |
455 if (nullptr == pr) { | 456 if (nullptr == pr) { |
456 GrPathRendererChain::DrawType type; | 457 GrPathRendererChain::DrawType type; |
457 type = element->isAA() ? GrPathRendererChain::kColorAntiAlias_Dr
awType : | 458 type = element->isAA() ? GrPathRendererChain::kColorAntiAlias_Dr
awType : |
458 GrPathRendererChain::kColor_DrawType; | 459 GrPathRendererChain::kColor_DrawType; |
459 pr = this->getContext()->getPathRenderer(*pipelineBuilder, viewM
atrix, | 460 pr = this->getContext()->getPathRenderer(*pipelineBuilder, viewM
atrix, |
460 path, stroke, false, ty
pe); | 461 path, stroke, false, ty
pe); |
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1135 | 1136 |
1136 //////////////////////////////////////////////////////////////////////////////// | 1137 //////////////////////////////////////////////////////////////////////////////// |
1137 | 1138 |
1138 void GrClipMaskManager::adjustPathStencilParams(const GrStencilAttachment* stenc
ilAttachment, | 1139 void GrClipMaskManager::adjustPathStencilParams(const GrStencilAttachment* stenc
ilAttachment, |
1139 GrStencilSettings* settings) { | 1140 GrStencilSettings* settings) { |
1140 if (stencilAttachment) { | 1141 if (stencilAttachment) { |
1141 int stencilBits = stencilAttachment->bits(); | 1142 int stencilBits = stencilAttachment->bits(); |
1142 this->adjustStencilParams(settings, fClipMode, stencilBits); | 1143 this->adjustStencilParams(settings, fClipMode, stencilBits); |
1143 } | 1144 } |
1144 } | 1145 } |
OLD | NEW |