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 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 paint.setAntiAlias(element->isAA()); | 709 paint.setAntiAlias(element->isAA()); |
710 paint.setCoverageSetOpXPFactory(op, false); | 710 paint.setCoverageSetOpXPFactory(op, false); |
711 | 711 |
712 draw_element(dc, GrClip::WideOpen(), paint, translate, element); | 712 draw_element(dc, GrClip::WideOpen(), paint, translate, element); |
713 } | 713 } |
714 } | 714 } |
715 | 715 |
716 return texture.detach(); | 716 return texture.release(); |
717 } | 717 } |
718 | 718 |
719 //////////////////////////////////////////////////////////////////////////////// | 719 //////////////////////////////////////////////////////////////////////////////// |
720 // Create a 1-bit clip mask in the stencil buffer. 'devClipBounds' are in device | 720 // Create a 1-bit clip mask in the stencil buffer. 'devClipBounds' are in device |
721 // (as opposed to canvas) coordinates | 721 // (as opposed to canvas) coordinates |
722 bool GrClipMaskManager::createStencilClipMask(GrRenderTarget* rt, | 722 bool GrClipMaskManager::createStencilClipMask(GrRenderTarget* rt, |
723 int32_t elementsGenID, | 723 int32_t elementsGenID, |
724 GrReducedClip::InitialState initia
lState, | 724 GrReducedClip::InitialState initia
lState, |
725 const GrReducedClip::ElementList&
elements, | 725 const GrReducedClip::ElementList&
elements, |
726 const SkIRect& clipSpaceIBounds, | 726 const SkIRect& clipSpaceIBounds, |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1154 | 1154 |
1155 //////////////////////////////////////////////////////////////////////////////// | 1155 //////////////////////////////////////////////////////////////////////////////// |
1156 | 1156 |
1157 void GrClipMaskManager::adjustPathStencilParams(const GrStencilAttachment* stenc
ilAttachment, | 1157 void GrClipMaskManager::adjustPathStencilParams(const GrStencilAttachment* stenc
ilAttachment, |
1158 GrStencilSettings* settings) { | 1158 GrStencilSettings* settings) { |
1159 if (stencilAttachment) { | 1159 if (stencilAttachment) { |
1160 int stencilBits = stencilAttachment->bits(); | 1160 int stencilBits = stencilAttachment->bits(); |
1161 this->adjustStencilParams(settings, fClipMode, stencilBits); | 1161 this->adjustStencilParams(settings, fClipMode, stencilBits); |
1162 } | 1162 } |
1163 } | 1163 } |
OLD | NEW |