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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 // TODO: Draw rrects directly here. | 391 // TODO: Draw rrects directly here. |
392 switch (element->getType()) { | 392 switch (element->getType()) { |
393 case Element::kEmpty_Type: | 393 case Element::kEmpty_Type: |
394 SkDEBUGFAIL("Should never get here with an empty element."); | 394 SkDEBUGFAIL("Should never get here with an empty element."); |
395 break; | 395 break; |
396 case Element::kRect_Type: | 396 case Element::kRect_Type: |
397 // TODO: Do rects directly to the accumulator using a aa-rect GrProc
essor that covers | 397 // TODO: Do rects directly to the accumulator using a aa-rect GrProc
essor that covers |
398 // the entire mask bounds and writes 0 outside the rect. | 398 // the entire mask bounds and writes 0 outside the rect. |
399 if (element->isAA()) { | 399 if (element->isAA()) { |
400 this->getContext()->getAARectRenderer()->fillAARect(fGpu, | 400 this->getContext()->getAARectRenderer()->fillAARect(fGpu, |
401 fGpu, | |
402 element->get
Rect(), | 401 element->get
Rect(), |
403 SkMatrix::I(
), | 402 SkMatrix::I(
), |
404 element->get
Rect()); | 403 element->get
Rect()); |
405 } else { | 404 } else { |
406 fGpu->drawSimpleRect(element->getRect()); | 405 fGpu->drawSimpleRect(element->getRect()); |
407 } | 406 } |
408 return true; | 407 return true; |
409 default: { | 408 default: { |
410 SkPath path; | 409 SkPath path; |
411 element->asPath(&path); | 410 element->asPath(&path); |
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1131 | 1130 |
1132 // TODO: dynamically attach a stencil buffer | 1131 // TODO: dynamically attach a stencil buffer |
1133 int stencilBits = 0; | 1132 int stencilBits = 0; |
1134 GrStencilBuffer* stencilBuffer = | 1133 GrStencilBuffer* stencilBuffer = |
1135 drawState.getRenderTarget()->getStencilBuffer(); | 1134 drawState.getRenderTarget()->getStencilBuffer(); |
1136 if (stencilBuffer) { | 1135 if (stencilBuffer) { |
1137 stencilBits = stencilBuffer->bits(); | 1136 stencilBits = stencilBuffer->bits(); |
1138 this->adjustStencilParams(settings, clipMode, stencilBits); | 1137 this->adjustStencilParams(settings, clipMode, stencilBits); |
1139 } | 1138 } |
1140 } | 1139 } |
OLD | NEW |