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); | |
452 if (path.isInverseFillType()) { | 451 if (path.isInverseFillType()) { |
453 path.toggleInverseFillType(); | 452 path.toggleInverseFillType(); |
454 } | 453 } |
455 GrStrokeInfo stroke(SkStrokeRec::kFill_InitStyle); | 454 GrStrokeInfo stroke(SkStrokeRec::kFill_InitStyle); |
456 if (nullptr == pr) { | 455 if (nullptr == pr) { |
457 GrPathRendererChain::DrawType type; | 456 GrPathRendererChain::DrawType type; |
458 type = element->isAA() ? GrPathRendererChain::kColorAntiAlias_Dr
awType : | 457 type = element->isAA() ? GrPathRendererChain::kColorAntiAlias_Dr
awType : |
459 GrPathRendererChain::kColor_DrawType; | 458 GrPathRendererChain::kColor_DrawType; |
460 pr = this->getContext()->getPathRenderer(*pipelineBuilder, viewM
atrix, | 459 pr = this->getContext()->getPathRenderer(*pipelineBuilder, viewM
atrix, |
461 path, stroke, false, ty
pe); | 460 path, stroke, false, ty
pe); |
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1136 | 1135 |
1137 //////////////////////////////////////////////////////////////////////////////// | 1136 //////////////////////////////////////////////////////////////////////////////// |
1138 | 1137 |
1139 void GrClipMaskManager::adjustPathStencilParams(const GrStencilAttachment* stenc
ilAttachment, | 1138 void GrClipMaskManager::adjustPathStencilParams(const GrStencilAttachment* stenc
ilAttachment, |
1140 GrStencilSettings* settings) { | 1139 GrStencilSettings* settings) { |
1141 if (stencilAttachment) { | 1140 if (stencilAttachment) { |
1142 int stencilBits = stencilAttachment->bits(); | 1141 int stencilBits = stencilAttachment->bits(); |
1143 this->adjustStencilParams(settings, fClipMode, stencilBits); | 1142 this->adjustStencilParams(settings, fClipMode, stencilBits); |
1144 } | 1143 } |
1145 } | 1144 } |
OLD | NEW |