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

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

Issue 1002013006: Disable GL_MULTISAMPLE when it's not being used (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 9 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/gl/GrGLGpu.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 "GrPipelineBuilder.h" 8 #include "GrPipelineBuilder.h"
9 9
10 #include "GrBatch.h" 10 #include "GrBatch.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 this->setRenderTarget(rt); 67 this->setRenderTarget(rt);
68 68
69 // These have no equivalent in GrPaint, set them to defaults 69 // These have no equivalent in GrPaint, set them to defaults
70 fDrawFace = kBoth_DrawFace; 70 fDrawFace = kBoth_DrawFace;
71 fStencilSettings.setDisabled(); 71 fStencilSettings.setDisabled();
72 fFlagBits = 0; 72 fFlagBits = 0;
73 73
74 fClip = clip; 74 fClip = clip;
75 75
76 this->setState(GrPipelineBuilder::kDither_StateBit, paint.isDither()); 76 this->setState(GrPipelineBuilder::kDither_StateBit, paint.isDither());
77 this->setState(GrPipelineBuilder::kHWAntialias_StateBit, paint.isAntiAlias() ); 77 this->setState(GrPipelineBuilder::kHWAntialias_StateBit,
78 rt->isMultisampled() && paint.isAntiAlias());
78 79
79 fColorProcInfoValid = false; 80 fColorProcInfoValid = false;
80 fCoverageProcInfoValid = false; 81 fCoverageProcInfoValid = false;
81 82
82 fColorCache = GrColor_ILLEGAL; 83 fColorCache = GrColor_ILLEGAL;
83 fCoverageCache = GrColor_ILLEGAL; 84 fCoverageCache = GrColor_ILLEGAL;
84 } 85 }
85 86
86 //////////////////////////////////////////////////////////////////////////////s 87 //////////////////////////////////////////////////////////////////////////////s
87 88
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 void GrPipelineBuilder::calcCoverageInvariantOutput(GrColor coverage) const { 177 void GrPipelineBuilder::calcCoverageInvariantOutput(GrColor coverage) const {
177 if (!fCoverageProcInfoValid || coverage != fCoverageCache) { 178 if (!fCoverageProcInfoValid || coverage != fCoverageCache) {
178 GrColorComponentFlags flags = kRGBA_GrColorComponentFlags; 179 GrColorComponentFlags flags = kRGBA_GrColorComponentFlags;
179 fCoverageProcInfo.calcWithInitialValues(fCoverageStages.begin(), 180 fCoverageProcInfo.calcWithInitialValues(fCoverageStages.begin(),
180 this->numCoverageFragmentStages( ), coverage, flags, 181 this->numCoverageFragmentStages( ), coverage, flags,
181 true); 182 true);
182 fCoverageProcInfoValid = true; 183 fCoverageProcInfoValid = true;
183 fCoverageCache = coverage; 184 fCoverageCache = coverage;
184 } 185 }
185 } 186 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/gl/GrGLGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698