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

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

Issue 1068463004: Set willReadFragmentPosition on XP when doing a DstCopy. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 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/GrXferProcessor.cpp » ('j') | src/gpu/GrXferProcessor.cpp » ('J')
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 "GrPipeline.h" 8 #include "GrPipeline.h"
9 9
10 #include "GrBatch.h" 10 #include "GrBatch.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 fInitBT.fCanTweakAlphaForCoverage = 105 fInitBT.fCanTweakAlphaForCoverage =
106 SkToBool(optFlags & GrXferProcessor::kCanTweakAlphaForCoverage_OptFlag); 106 SkToBool(optFlags & GrXferProcessor::kCanTweakAlphaForCoverage_OptFlag);
107 } 107 }
108 108
109 void GrPipeline::adjustProgramFromOptimizations(const GrPipelineBuilder& pipelin eBuilder, 109 void GrPipeline::adjustProgramFromOptimizations(const GrPipelineBuilder& pipelin eBuilder,
110 GrXferProcessor::OptFlags flags, 110 GrXferProcessor::OptFlags flags,
111 const GrProcOptInfo& colorPOI, 111 const GrProcOptInfo& colorPOI,
112 const GrProcOptInfo& coveragePOI , 112 const GrProcOptInfo& coveragePOI ,
113 int* firstColorStageIdx, 113 int* firstColorStageIdx,
114 int* firstCoverageStageIdx) { 114 int* firstCoverageStageIdx) {
115 fReadsFragPosition = false; 115 fReadsFragPosition = fXferProcessor->willReadFragmentPosition();
116 116
117 if ((flags & GrXferProcessor::kIgnoreColor_OptFlag) || 117 if ((flags & GrXferProcessor::kIgnoreColor_OptFlag) ||
118 (flags & GrXferProcessor::kOverrideColor_OptFlag)) { 118 (flags & GrXferProcessor::kOverrideColor_OptFlag)) {
119 *firstColorStageIdx = pipelineBuilder.numColorFragmentStages(); 119 *firstColorStageIdx = pipelineBuilder.numColorFragmentStages();
120 } else { 120 } else {
121 fReadsFragPosition = colorPOI.readsFragPosition(); 121 if (coveragePOI.readsFragPosition()) {
122 fReadsFragPosition = true;
123 }
122 } 124 }
123 125
124 if (flags & GrXferProcessor::kIgnoreCoverage_OptFlag) { 126 if (flags & GrXferProcessor::kIgnoreCoverage_OptFlag) {
125 *firstCoverageStageIdx = pipelineBuilder.numCoverageFragmentStages(); 127 *firstCoverageStageIdx = pipelineBuilder.numCoverageFragmentStages();
126 } else { 128 } else {
127 if (coveragePOI.readsFragPosition()) { 129 if (coveragePOI.readsFragPosition()) {
128 fReadsFragPosition = true; 130 fReadsFragPosition = true;
129 } 131 }
130 } 132 }
131 } 133 }
(...skipping 19 matching lines...) Expand all
151 SkASSERT(this->numFragmentStages() == that.numFragmentStages()); 153 SkASSERT(this->numFragmentStages() == that.numFragmentStages());
152 for (int i = 0; i < this->numFragmentStages(); i++) { 154 for (int i = 0; i < this->numFragmentStages(); i++) {
153 155
154 if (this->getFragmentStage(i) != that.getFragmentStage(i)) { 156 if (this->getFragmentStage(i) != that.getFragmentStage(i)) {
155 return false; 157 return false;
156 } 158 }
157 } 159 }
158 return true; 160 return true;
159 } 161 }
160 162
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrXferProcessor.cpp » ('j') | src/gpu/GrXferProcessor.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698