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

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

Issue 837633005: Add Arithmetic mode xp. (Closed) Base URL: https://skia.googlesource.com/skia.git@arithGpuFile
Patch Set: Fix compile Created 5 years, 11 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/effects/SkArithmeticMode_gpu.cpp ('k') | src/gpu/GrProcessor.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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 if (flags & GrXferProcessor::kIgnoreCoverage_OptFlag) { 148 if (flags & GrXferProcessor::kIgnoreCoverage_OptFlag) {
149 *firstCoverageStageIdx = ds.numCoverageStages(); 149 *firstCoverageStageIdx = ds.numCoverageStages();
150 } else { 150 } else {
151 if (coveragePOI.readsDst()) { 151 if (coveragePOI.readsDst()) {
152 fDescInfo.fReadsDst = true; 152 fDescInfo.fReadsDst = true;
153 } 153 }
154 if (coveragePOI.readsFragPosition()) { 154 if (coveragePOI.readsFragPosition()) {
155 fDescInfo.fReadsFragPosition = true; 155 fDescInfo.fReadsFragPosition = true;
156 } 156 }
157 } 157 }
158
159 if (fXferProcessor->willReadDstColor()) {
160 fDescInfo.fReadsDst = true;
161 }
158 } 162 }
159 163
160 void GrOptDrawState::finalize(GrGpu* gpu) { 164 void GrOptDrawState::finalize(GrGpu* gpu) {
161 gpu->buildProgramDesc(*this, fDescInfo, fDrawType, &fDesc); 165 gpu->buildProgramDesc(*this, fDescInfo, fDrawType, &fDesc);
162 fFinalized = true; 166 fFinalized = true;
163 } 167 }
164 168
165 //////////////////////////////////////////////////////////////////////////////// 169 ////////////////////////////////////////////////////////////////////////////////
166 170
167 bool GrOptDrawState::combineIfPossible(const GrOptDrawState& that) { 171 bool GrOptDrawState::combineIfPossible(const GrOptDrawState& that) {
(...skipping 30 matching lines...) Expand all
198 if (this->getFragmentStage(i) != that.getFragmentStage(i)) { 202 if (this->getFragmentStage(i) != that.getFragmentStage(i)) {
199 return false; 203 return false;
200 } 204 }
201 } 205 }
202 206
203 // Now update the GrPrimitiveProcessor's batch tracker 207 // Now update the GrPrimitiveProcessor's batch tracker
204 fPrimitiveProcessor->makeEqual(&fBatchTracker, that.getBatchTracker()); 208 fPrimitiveProcessor->makeEqual(&fBatchTracker, that.getBatchTracker());
205 return true; 209 return true;
206 } 210 }
207 211
OLDNEW
« no previous file with comments | « src/effects/SkArithmeticMode_gpu.cpp ('k') | src/gpu/GrProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698