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