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 "GrCaps.h" | 9 #include "GrCaps.h" |
10 #include "GrDrawingManager.h" | 10 #include "GrDrawingManager.h" |
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
699 if (!dc->drawContextPriv().drawAndStencilRect(&maskSpaceIBounds, kDr awOutsideElement, | 699 if (!dc->drawContextPriv().drawAndStencilRect(&maskSpaceIBounds, kDr awOutsideElement, |
700 op, !invert, false, | 700 op, !invert, false, |
701 translate, | 701 translate, |
702 SkRect::Make(clipSpace IBounds))) { | 702 SkRect::Make(clipSpace IBounds))) { |
703 texture->resourcePriv().removeUniqueKey(); | 703 texture->resourcePriv().removeUniqueKey(); |
704 return nullptr; | 704 return nullptr; |
705 } | 705 } |
706 } else { | 706 } else { |
707 // all the remaining ops can just be directly draw into the accumula tion buffer | 707 // all the remaining ops can just be directly draw into the accumula tion buffer |
708 GrPaint paint; | 708 GrPaint paint; |
709 // SRGBTODO: AllowSRGBInputs? | |
bsalomon
2016/04/05 13:24:01
This is drawing clips as coverage masks, no need f
Brian Osman
2016/04/05 15:36:41
Acknowledged.
| |
709 paint.setAntiAlias(element->isAA()); | 710 paint.setAntiAlias(element->isAA()); |
710 paint.setCoverageSetOpXPFactory(op, false); | 711 paint.setCoverageSetOpXPFactory(op, false); |
711 | 712 |
712 draw_element(dc, GrClip::WideOpen(), paint, translate, element); | 713 draw_element(dc, GrClip::WideOpen(), paint, translate, element); |
713 } | 714 } |
714 } | 715 } |
715 | 716 |
716 return texture.release(); | 717 return texture.release(); |
717 } | 718 } |
718 | 719 |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1154 | 1155 |
1155 //////////////////////////////////////////////////////////////////////////////// | 1156 //////////////////////////////////////////////////////////////////////////////// |
1156 | 1157 |
1157 void GrClipMaskManager::adjustPathStencilParams(const GrStencilAttachment* stenc ilAttachment, | 1158 void GrClipMaskManager::adjustPathStencilParams(const GrStencilAttachment* stenc ilAttachment, |
1158 GrStencilSettings* settings) { | 1159 GrStencilSettings* settings) { |
1159 if (stencilAttachment) { | 1160 if (stencilAttachment) { |
1160 int stencilBits = stencilAttachment->bits(); | 1161 int stencilBits = stencilAttachment->bits(); |
1161 this->adjustStencilParams(settings, fClipMode, stencilBits); | 1162 this->adjustStencilParams(settings, fClipMode, stencilBits); |
1162 } | 1163 } |
1163 } | 1164 } |
OLD | NEW |