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 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
740 const Element* element = iter.get(); | 740 const Element* element = iter.get(); |
741 | 741 |
742 GrPipelineBuilder pipelineBuilder; | 742 GrPipelineBuilder pipelineBuilder; |
743 pipelineBuilder.setClip(clip); | 743 pipelineBuilder.setClip(clip); |
744 pipelineBuilder.setRenderTarget(rt); | 744 pipelineBuilder.setRenderTarget(rt); |
745 | 745 |
746 pipelineBuilder.setDisableColorXPFactory(); | 746 pipelineBuilder.setDisableColorXPFactory(); |
747 | 747 |
748 // if the target is MSAA then we want MSAA enabled when the clip is
soft | 748 // if the target is MSAA then we want MSAA enabled when the clip is
soft |
749 if (rt->isMultisampled()) { | 749 if (rt->isMultisampled()) { |
750 pipelineBuilder.setState(GrPipelineBuilder::kHWAntialias_StateBi
t, element->isAA()); | 750 pipelineBuilder.setState(GrPipelineBuilder::kHWAntialias_Flag, e
lement->isAA()); |
751 } | 751 } |
752 | 752 |
753 bool fillInverted = false; | 753 bool fillInverted = false; |
754 // enabled at bottom of loop | 754 // enabled at bottom of loop |
755 fClipMode = kIgnoreClip_StencilClipMode; | 755 fClipMode = kIgnoreClip_StencilClipMode; |
756 | 756 |
757 // This will be used to determine whether the clip shape can be rend
ered into the | 757 // This will be used to determine whether the clip shape can be rend
ered into the |
758 // stencil with arbitrary stencil settings. | 758 // stencil with arbitrary stencil settings. |
759 GrPathRenderer::StencilSupport stencilSupport; | 759 GrPathRenderer::StencilSupport stencilSupport; |
760 | 760 |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1127 fAACache.setContext(clipTarget->getContext()); | 1127 fAACache.setContext(clipTarget->getContext()); |
1128 } | 1128 } |
1129 | 1129 |
1130 void GrClipMaskManager::adjustPathStencilParams(const GrStencilAttachment* stenc
ilAttachment, | 1130 void GrClipMaskManager::adjustPathStencilParams(const GrStencilAttachment* stenc
ilAttachment, |
1131 GrStencilSettings* settings) { | 1131 GrStencilSettings* settings) { |
1132 if (stencilAttachment) { | 1132 if (stencilAttachment) { |
1133 int stencilBits = stencilAttachment->bits(); | 1133 int stencilBits = stencilAttachment->bits(); |
1134 this->adjustStencilParams(settings, fClipMode, stencilBits); | 1134 this->adjustStencilParams(settings, fClipMode, stencilBits); |
1135 } | 1135 } |
1136 } | 1136 } |
OLD | NEW |