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

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

Issue 1164973002: Add mixed samples support to XPs (Closed) Base URL: https://skia.googlesource.com/skia.git@upload2_reenablebea
Patch Set: Created 5 years, 6 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') | src/gpu/GrXferProcessor.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 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 fColorCache = GrColor_ILLEGAL; 83 fColorCache = GrColor_ILLEGAL;
84 fCoverageCache = GrColor_ILLEGAL; 84 fCoverageCache = GrColor_ILLEGAL;
85 } 85 }
86 86
87 //////////////////////////////////////////////////////////////////////////////s 87 //////////////////////////////////////////////////////////////////////////////s
88 88
89 bool GrPipelineBuilder::willXPNeedDstTexture(const GrCaps& caps, 89 bool GrPipelineBuilder::willXPNeedDstTexture(const GrCaps& caps,
90 const GrProcOptInfo& colorPOI, 90 const GrProcOptInfo& colorPOI,
91 const GrProcOptInfo& coveragePOI) c onst { 91 const GrProcOptInfo& coveragePOI) c onst {
92 return this->getXPFactory()->willNeedDstTexture(caps, colorPOI, coveragePOI) ; 92 return this->getXPFactory()->willNeedDstTexture(caps, colorPOI, coveragePOI,
93 this->hasMixedSamples());
93 } 94 }
94 95
95 void GrPipelineBuilder::AutoRestoreFragmentProcessors::set(GrPipelineBuilder* pi pelineBuilder) { 96 void GrPipelineBuilder::AutoRestoreFragmentProcessors::set(GrPipelineBuilder* pi pelineBuilder) {
96 if (fPipelineBuilder) { 97 if (fPipelineBuilder) {
97 int m = fPipelineBuilder->numColorFragmentStages() - fColorEffectCnt; 98 int m = fPipelineBuilder->numColorFragmentStages() - fColorEffectCnt;
98 SkASSERT(m >= 0); 99 SkASSERT(m >= 0);
99 fPipelineBuilder->fColorStages.pop_back_n(m); 100 fPipelineBuilder->fColorStages.pop_back_n(m);
100 101
101 int n = fPipelineBuilder->numCoverageFragmentStages() - fCoverageEffectC nt; 102 int n = fPipelineBuilder->numCoverageFragmentStages() - fCoverageEffectC nt;
102 SkASSERT(n >= 0); 103 SkASSERT(n >= 0);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 void GrPipelineBuilder::calcCoverageInvariantOutput(GrColor coverage) const { 169 void GrPipelineBuilder::calcCoverageInvariantOutput(GrColor coverage) const {
169 if (!fCoverageProcInfoValid || coverage != fCoverageCache) { 170 if (!fCoverageProcInfoValid || coverage != fCoverageCache) {
170 GrColorComponentFlags flags = kRGBA_GrColorComponentFlags; 171 GrColorComponentFlags flags = kRGBA_GrColorComponentFlags;
171 fCoverageProcInfo.calcWithInitialValues(fCoverageStages.begin(), 172 fCoverageProcInfo.calcWithInitialValues(fCoverageStages.begin(),
172 this->numCoverageFragmentStages( ), coverage, flags, 173 this->numCoverageFragmentStages( ), coverage, flags,
173 true); 174 true);
174 fCoverageProcInfoValid = true; 175 fCoverageProcInfoValid = true;
175 fCoverageCache = coverage; 176 fCoverageCache = coverage;
176 } 177 }
177 } 178 }
OLDNEW
« no previous file with comments | « src/gpu/GrPipelineBuilder.h ('k') | src/gpu/GrXferProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698