| 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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 SkDEBUGFAIL("Should never get here with an empty element."); | 397 SkDEBUGFAIL("Should never get here with an empty element."); |
| 398 break; | 398 break; |
| 399 case Element::kRect_Type: | 399 case Element::kRect_Type: |
| 400 // TODO: Do rects directly to the accumulator using a aa-rect GrEffe
ct that covers the | 400 // TODO: Do rects directly to the accumulator using a aa-rect GrEffe
ct that covers the |
| 401 // entire mask bounds and writes 0 outside the rect. | 401 // entire mask bounds and writes 0 outside the rect. |
| 402 if (element->isAA()) { | 402 if (element->isAA()) { |
| 403 getContext()->getAARectRenderer()->fillAARect(fGpu, | 403 getContext()->getAARectRenderer()->fillAARect(fGpu, |
| 404 fGpu, | 404 fGpu, |
| 405 element->getRect()
, | 405 element->getRect()
, |
| 406 SkMatrix::I(), | 406 SkMatrix::I(), |
| 407 element->getRect()
, | 407 element->getRect()
); |
| 408 false); | |
| 409 } else { | 408 } else { |
| 410 fGpu->drawSimpleRect(element->getRect()); | 409 fGpu->drawSimpleRect(element->getRect()); |
| 411 } | 410 } |
| 412 return true; | 411 return true; |
| 413 default: { | 412 default: { |
| 414 SkPath path; | 413 SkPath path; |
| 415 element->asPath(&path); | 414 element->asPath(&path); |
| 416 if (path.isInverseFillType()) { | 415 if (path.isInverseFillType()) { |
| 417 path.toggleInverseFillType(); | 416 path.toggleInverseFillType(); |
| 418 } | 417 } |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1139 | 1138 |
| 1140 // TODO: dynamically attach a stencil buffer | 1139 // TODO: dynamically attach a stencil buffer |
| 1141 int stencilBits = 0; | 1140 int stencilBits = 0; |
| 1142 GrStencilBuffer* stencilBuffer = | 1141 GrStencilBuffer* stencilBuffer = |
| 1143 drawState.getRenderTarget()->getStencilBuffer(); | 1142 drawState.getRenderTarget()->getStencilBuffer(); |
| 1144 if (NULL != stencilBuffer) { | 1143 if (NULL != stencilBuffer) { |
| 1145 stencilBits = stencilBuffer->bits(); | 1144 stencilBits = stencilBuffer->bits(); |
| 1146 this->adjustStencilParams(settings, clipMode, stencilBits); | 1145 this->adjustStencilParams(settings, clipMode, stencilBits); |
| 1147 } | 1146 } |
| 1148 } | 1147 } |
| OLD | NEW |