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

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

Issue 1734163002: Replace fWillReadFragmentPosition with a bitfield (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: BuiltInState -> RequiredFeatures Created 4 years, 9 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 | « include/gpu/GrProcessor.h ('k') | src/gpu/GrPipeline.h » ('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 /* 2 /*
3 * Copyright 2015 Google Inc. 3 * Copyright 2015 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrFragmentProcessor.h" 9 #include "GrFragmentProcessor.h"
10 #include "GrCoordTransform.h" 10 #include "GrCoordTransform.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 child->fCoordTransforms.begin()); 89 child->fCoordTransforms.begin());
90 } 90 }
91 if (!child->fTextureAccesses.empty()) { 91 if (!child->fTextureAccesses.empty()) {
92 fTextureAccesses.push_back_n(child->fTextureAccesses.count(), 92 fTextureAccesses.push_back_n(child->fTextureAccesses.count(),
93 child->fTextureAccesses.begin()); 93 child->fTextureAccesses.begin());
94 } 94 }
95 95
96 int index = fChildProcessors.count(); 96 int index = fChildProcessors.count();
97 fChildProcessors.push_back(SkRef(child)); 97 fChildProcessors.push_back(SkRef(child));
98 98
99 if (child->willReadFragmentPosition()) { 99 this->combineRequiredFeatures(*child);
100 this->setWillReadFragmentPosition();
101 }
102 100
103 if (child->usesLocalCoords()) { 101 if (child->usesLocalCoords()) {
104 fUsesLocalCoords = true; 102 fUsesLocalCoords = true;
105 } 103 }
106 104
107 return index; 105 return index;
108 } 106 }
109 107
110 void GrFragmentProcessor::notifyRefCntIsZero() const { 108 void GrFragmentProcessor::notifyRefCntIsZero() const {
111 // See comment above GrProgramElement for a detailed explanation of why we d o this. 109 // See comment above GrProgramElement for a detailed explanation of why we d o this.
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 } 367 }
370 } 368 }
371 369
372 if (1 == cnt) { 370 if (1 == cnt) {
373 return SkRef(series[0]); 371 return SkRef(series[0]);
374 } else { 372 } else {
375 return new SeriesFragmentProcessor(series, cnt); 373 return new SeriesFragmentProcessor(series, cnt);
376 } 374 }
377 } 375 }
378 376
OLDNEW
« no previous file with comments | « include/gpu/GrProcessor.h ('k') | src/gpu/GrPipeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698