Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: src/gpu/GrClipMaskManager.cpp

Issue 1101663007: Make non-AA hairline stroke rects snap to pixels centers so they close. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/gpu/GrContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698