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 "GrAAConvexPathRenderer.h" | 9 #include "GrAAConvexPathRenderer.h" |
10 #include "GrAAHairLinePathRenderer.h" | 10 #include "GrAAHairLinePathRenderer.h" |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 case Element::kEmpty_Type: | 353 case Element::kEmpty_Type: |
354 SkDEBUGFAIL("Should never get here with an empty element."); | 354 SkDEBUGFAIL("Should never get here with an empty element."); |
355 break; | 355 break; |
356 case Element::kRect_Type: | 356 case Element::kRect_Type: |
357 // TODO: Do rects directly to the accumulator using a aa-rect GrProc
essor that covers | 357 // TODO: Do rects directly to the accumulator using a aa-rect GrProc
essor that covers |
358 // the entire mask bounds and writes 0 outside the rect. | 358 // the entire mask bounds and writes 0 outside the rect. |
359 if (element->isAA()) { | 359 if (element->isAA()) { |
360 this->getContext()->getAARectRenderer()->fillAARect(fClipTarget, | 360 this->getContext()->getAARectRenderer()->fillAARect(fClipTarget, |
361 drawState, | 361 drawState, |
362 color, | 362 color, |
| 363 SkMatrix::I(
), |
363 element->get
Rect(), | 364 element->get
Rect(), |
364 SkMatrix::I(
), | 365 SkMatrix::I(
), |
365 element->get
Rect()); | 366 element->get
Rect()); |
366 } else { | 367 } else { |
367 fClipTarget->drawSimpleRect(drawState, color, element->getRect()
); | 368 fClipTarget->drawSimpleRect(drawState, color, element->getRect()
); |
368 } | 369 } |
369 return true; | 370 return true; |
370 default: { | 371 default: { |
371 SkPath path; | 372 SkPath path; |
372 element->asPath(&path); | 373 element->asPath(&path); |
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1065 } | 1066 } |
1066 | 1067 |
1067 void GrClipMaskManager::adjustPathStencilParams(const GrStencilBuffer* stencilBu
ffer, | 1068 void GrClipMaskManager::adjustPathStencilParams(const GrStencilBuffer* stencilBu
ffer, |
1068 GrStencilSettings* settings) { | 1069 GrStencilSettings* settings) { |
1069 // TODO: dynamically attach a stencil buffer | 1070 // TODO: dynamically attach a stencil buffer |
1070 if (stencilBuffer) { | 1071 if (stencilBuffer) { |
1071 int stencilBits = stencilBuffer->bits(); | 1072 int stencilBits = stencilBuffer->bits(); |
1072 this->adjustStencilParams(settings, fClipMode, stencilBits); | 1073 this->adjustStencilParams(settings, fClipMode, stencilBits); |
1073 } | 1074 } |
1074 } | 1075 } |
OLD | NEW |