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

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

Issue 791933006: Add xp optimization for RGB coverage. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nits2 Created 6 years 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 | « include/gpu/GrXferProcessor.h ('k') | src/gpu/effects/GrPorterDuffXferProcessor.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 2014 Google Inc. 2 * Copyright 2014 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 "GrOptDrawState.h" 8 #include "GrOptDrawState.h"
9 9
10 #include "GrDrawState.h" 10 #include "GrDrawState.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 150
151 void GrOptDrawState::adjustProgramFromOptimizations(const GrDrawState& ds, 151 void GrOptDrawState::adjustProgramFromOptimizations(const GrDrawState& ds,
152 GrXferProcessor::OptFlags fl ags, 152 GrXferProcessor::OptFlags fl ags,
153 const GrProcOptInfo& colorPO I, 153 const GrProcOptInfo& colorPO I,
154 const GrProcOptInfo& coverag ePOI, 154 const GrProcOptInfo& coverag ePOI,
155 int* firstColorStageIdx, 155 int* firstColorStageIdx,
156 int* firstCoverageStageIdx) { 156 int* firstCoverageStageIdx) {
157 fDescInfo.fReadsDst = false; 157 fDescInfo.fReadsDst = false;
158 fDescInfo.fReadsFragPosition = false; 158 fDescInfo.fReadsFragPosition = false;
159 159
160 if (flags & GrXferProcessor::kClearColorStages_OptFlag) { 160 if (flags & GrXferProcessor::kClearColorStages_OptFlag ||
161 flags & GrXferProcessor::kOverrideColor_OptFlag) {
161 fDescInfo.fInputColorIsUsed = true; 162 fDescInfo.fInputColorIsUsed = true;
162 *firstColorStageIdx = ds.numColorStages(); 163 *firstColorStageIdx = ds.numColorStages();
163 fDescInfo.fHasVertexColor = false; 164 fDescInfo.fHasVertexColor = false;
164 } else { 165 } else {
165 fDescInfo.fReadsDst = colorPOI.readsDst(); 166 fDescInfo.fReadsDst = colorPOI.readsDst();
166 fDescInfo.fReadsFragPosition = colorPOI.readsFragPosition(); 167 fDescInfo.fReadsFragPosition = colorPOI.readsFragPosition();
167 } 168 }
168 169
169 if (flags & GrXferProcessor::kClearCoverageStages_OptFlag) { 170 if (flags & GrXferProcessor::kClearCoverageStages_OptFlag) {
170 fDescInfo.fInputCoverageIsUsed = true; 171 fDescInfo.fInputCoverageIsUsed = true;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 SkASSERT(this->numFragmentStages() == that.numFragmentStages()); 232 SkASSERT(this->numFragmentStages() == that.numFragmentStages());
232 for (int i = 0; i < this->numFragmentStages(); i++) { 233 for (int i = 0; i < this->numFragmentStages(); i++) {
233 234
234 if (this->getFragmentStage(i) != that.getFragmentStage(i)) { 235 if (this->getFragmentStage(i) != that.getFragmentStage(i)) {
235 return false; 236 return false;
236 } 237 }
237 } 238 }
238 return true; 239 return true;
239 } 240 }
240 241
OLDNEW
« no previous file with comments | « include/gpu/GrXferProcessor.h ('k') | src/gpu/effects/GrPorterDuffXferProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698