OLD | NEW |
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 #include "GrClipMaskManager.h" | 9 #include "GrClipMaskManager.h" |
10 #include "GrAAConvexPathRenderer.h" | 10 #include "GrAAConvexPathRenderer.h" |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 element->getRect()
, | 407 element->getRect()
, |
408 SkMatrix::I(), | 408 SkMatrix::I(), |
409 element->getRect()
); | 409 element->getRect()
); |
410 } else { | 410 } else { |
411 fGpu->drawSimpleRect(element->getRect()); | 411 fGpu->drawSimpleRect(element->getRect()); |
412 } | 412 } |
413 return true; | 413 return true; |
414 default: { | 414 default: { |
415 SkPath path; | 415 SkPath path; |
416 element->asPath(&path); | 416 element->asPath(&path); |
| 417 path.setIsVolatile(true); |
417 if (path.isInverseFillType()) { | 418 if (path.isInverseFillType()) { |
418 path.toggleInverseFillType(); | 419 path.toggleInverseFillType(); |
419 } | 420 } |
420 SkStrokeRec stroke(SkStrokeRec::kFill_InitStyle); | 421 SkStrokeRec stroke(SkStrokeRec::kFill_InitStyle); |
421 if (NULL == pr) { | 422 if (NULL == pr) { |
422 GrPathRendererChain::DrawType type; | 423 GrPathRendererChain::DrawType type; |
423 type = element->isAA() ? GrPathRendererChain::kColorAntiAlias_Dr
awType : | 424 type = element->isAA() ? GrPathRendererChain::kColorAntiAlias_Dr
awType : |
424 GrPathRendererChain::kColor_DrawType; | 425 GrPathRendererChain::kColor_DrawType; |
425 pr = this->getContext()->getPathRenderer(path, stroke, fGpu, fal
se, type); | 426 pr = this->getContext()->getPathRenderer(path, stroke, fGpu, fal
se, type); |
426 } | 427 } |
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1136 | 1137 |
1137 // TODO: dynamically attach a stencil buffer | 1138 // TODO: dynamically attach a stencil buffer |
1138 int stencilBits = 0; | 1139 int stencilBits = 0; |
1139 GrStencilBuffer* stencilBuffer = | 1140 GrStencilBuffer* stencilBuffer = |
1140 drawState.getRenderTarget()->getStencilBuffer(); | 1141 drawState.getRenderTarget()->getStencilBuffer(); |
1141 if (stencilBuffer) { | 1142 if (stencilBuffer) { |
1142 stencilBits = stencilBuffer->bits(); | 1143 stencilBits = stencilBuffer->bits(); |
1143 this->adjustStencilParams(settings, clipMode, stencilBits); | 1144 this->adjustStencilParams(settings, clipMode, stencilBits); |
1144 } | 1145 } |
1145 } | 1146 } |
OLD | NEW |