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

Side by Side Diff: src/gpu/GrPipeline.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 | « src/gpu/GrPipeline.h ('k') | src/gpu/GrPipelineBuilder.h » ('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 2015 Google Inc. 2 * Copyright 2015 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 "GrPipeline.h" 8 #include "GrPipeline.h"
9 9
10 #include "GrBatch.h" 10 #include "GrBatch.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 fStencilSettings = pipelineBuilder.getStencil(); 57 fStencilSettings = pipelineBuilder.getStencil();
58 fDrawFace = pipelineBuilder.getDrawFace(); 58 fDrawFace = pipelineBuilder.getDrawFace();
59 59
60 fFlags = 0; 60 fFlags = 0;
61 if (pipelineBuilder.isHWAntialias()) { 61 if (pipelineBuilder.isHWAntialias()) {
62 fFlags |= kHWAA_Flag; 62 fFlags |= kHWAA_Flag;
63 } 63 }
64 if (pipelineBuilder.isDither()) { 64 if (pipelineBuilder.isDither()) {
65 fFlags |= kDither_Flag; 65 fFlags |= kDither_Flag;
66 } 66 }
67 if (pipelineBuilder.snapVerticesToPixelCenters()) {
68 fFlags |= kSnapVertices_Flag;
69 }
67 70
68 int firstColorStageIdx = colorPOI.firstEffectiveStageIndex(); 71 int firstColorStageIdx = colorPOI.firstEffectiveStageIndex();
69 72
70 // TODO: Once we can handle single or four channel input into coverage stage s then we can use 73 // TODO: Once we can handle single or four channel input into coverage stage s then we can use
71 // GrPipelineBuilder's coverageProcInfo (like color above) to set this initi al information. 74 // GrPipelineBuilder's coverageProcInfo (like color above) to set this initi al information.
72 int firstCoverageStageIdx = 0; 75 int firstCoverageStageIdx = 0;
73 76
74 GrXferProcessor::BlendInfo blendInfo; 77 GrXferProcessor::BlendInfo blendInfo;
75 fXferProcessor->getBlendInfo(&blendInfo); 78 fXferProcessor->getBlendInfo(&blendInfo);
76 79
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 SkASSERT(this->numFragmentStages() == that.numFragmentStages()); 156 SkASSERT(this->numFragmentStages() == that.numFragmentStages());
154 for (int i = 0; i < this->numFragmentStages(); i++) { 157 for (int i = 0; i < this->numFragmentStages(); i++) {
155 158
156 if (this->getFragmentStage(i) != that.getFragmentStage(i)) { 159 if (this->getFragmentStage(i) != that.getFragmentStage(i)) {
157 return false; 160 return false;
158 } 161 }
159 } 162 }
160 return true; 163 return true;
161 } 164 }
162 165
OLDNEW
« no previous file with comments | « src/gpu/GrPipeline.h ('k') | src/gpu/GrPipelineBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698