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

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

Issue 1230023003: Modify GrClipMaskManager to reflect logical constness (Closed) Base URL: https://skia.googlesource.com/skia.git@proctomemorypool
Patch Set: deal with warnings Created 5 years, 5 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/GrPipelineBuilder.h ('k') | no next file » | 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 //////////////////////////////////////////////////////////////////////////////s 93 //////////////////////////////////////////////////////////////////////////////s
94 94
95 bool GrPipelineBuilder::willXPNeedDstTexture(const GrCaps& caps, 95 bool GrPipelineBuilder::willXPNeedDstTexture(const GrCaps& caps,
96 const GrProcOptInfo& colorPOI, 96 const GrProcOptInfo& colorPOI,
97 const GrProcOptInfo& coveragePOI) c onst { 97 const GrProcOptInfo& coveragePOI) c onst {
98 return this->getXPFactory()->willNeedDstTexture(caps, colorPOI, coveragePOI, 98 return this->getXPFactory()->willNeedDstTexture(caps, colorPOI, coveragePOI,
99 this->hasMixedSamples()); 99 this->hasMixedSamples());
100 } 100 }
101 101
102 void GrPipelineBuilder::AutoRestoreFragmentProcessors::set(GrPipelineBuilder* pi pelineBuilder) { 102 void GrPipelineBuilder::AutoRestoreFragmentProcessors::set(
103 const GrPipelineBuilder * pipelineBuilder) {
103 if (fPipelineBuilder) { 104 if (fPipelineBuilder) {
104 int m = fPipelineBuilder->numColorFragmentStages() - fColorEffectCnt; 105 int m = fPipelineBuilder->numColorFragmentStages() - fColorEffectCnt;
105 SkASSERT(m >= 0); 106 SkASSERT(m >= 0);
106 fPipelineBuilder->fColorStages.pop_back_n(m); 107 fPipelineBuilder->fColorStages.pop_back_n(m);
107 108
108 int n = fPipelineBuilder->numCoverageFragmentStages() - fCoverageEffectC nt; 109 int n = fPipelineBuilder->numCoverageFragmentStages() - fCoverageEffectC nt;
109 SkASSERT(n >= 0); 110 SkASSERT(n >= 0);
110 fPipelineBuilder->fCoverageStages.pop_back_n(n); 111 fPipelineBuilder->fCoverageStages.pop_back_n(n);
111 if (m + n > 0) { 112 if (m + n > 0) {
112 fPipelineBuilder->fColorProcInfoValid = false; 113 fPipelineBuilder->fColorProcInfoValid = false;
113 fPipelineBuilder->fCoverageProcInfoValid = false; 114 fPipelineBuilder->fCoverageProcInfoValid = false;
114 } 115 }
115 SkDEBUGCODE(--fPipelineBuilder->fBlockEffectRemovalCnt;) 116 SkDEBUGCODE(--fPipelineBuilder->fBlockEffectRemovalCnt;)
116 } 117 }
117 fPipelineBuilder = pipelineBuilder; 118 fPipelineBuilder = const_cast<GrPipelineBuilder*>(pipelineBuilder);
118 if (NULL != pipelineBuilder) { 119 if (NULL != pipelineBuilder) {
119 fColorEffectCnt = pipelineBuilder->numColorFragmentStages(); 120 fColorEffectCnt = pipelineBuilder->numColorFragmentStages();
120 fCoverageEffectCnt = pipelineBuilder->numCoverageFragmentStages(); 121 fCoverageEffectCnt = pipelineBuilder->numCoverageFragmentStages();
121 SkDEBUGCODE(++pipelineBuilder->fBlockEffectRemovalCnt;) 122 SkDEBUGCODE(++pipelineBuilder->fBlockEffectRemovalCnt;)
122 } 123 }
123 } 124 }
124 125
125 //////////////////////////////////////////////////////////////////////////////// 126 ////////////////////////////////////////////////////////////////////////////////
126 127
127 GrPipelineBuilder::~GrPipelineBuilder() { 128 GrPipelineBuilder::~GrPipelineBuilder() {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 void GrPipelineBuilder::calcCoverageInvariantOutput(GrColor coverage) const { 176 void GrPipelineBuilder::calcCoverageInvariantOutput(GrColor coverage) const {
176 if (!fCoverageProcInfoValid || coverage != fCoverageCache) { 177 if (!fCoverageProcInfoValid || coverage != fCoverageCache) {
177 GrColorComponentFlags flags = kRGBA_GrColorComponentFlags; 178 GrColorComponentFlags flags = kRGBA_GrColorComponentFlags;
178 fCoverageProcInfo.calcWithInitialValues(fCoverageStages.begin(), 179 fCoverageProcInfo.calcWithInitialValues(fCoverageStages.begin(),
179 this->numCoverageFragmentStages( ), coverage, flags, 180 this->numCoverageFragmentStages( ), coverage, flags,
180 true); 181 true);
181 fCoverageProcInfoValid = true; 182 fCoverageProcInfoValid = true;
182 fCoverageCache = coverage; 183 fCoverageCache = coverage;
183 } 184 }
184 } 185 }
OLDNEW
« no previous file with comments | « src/gpu/GrPipelineBuilder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698