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

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

Issue 1274513005: Rename GrPipelineInfo to GrPipelineOptimizations (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 4 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/GrPathProcessor.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 * Copyright 2013 Google Inc. 2 * Copyright 2013 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 "GrPathProcessor.h" 8 #include "GrPathProcessor.h"
9 9
10 #include "gl/GrGLPathProcessor.h" 10 #include "gl/GrGLPathProcessor.h"
(...skipping 12 matching lines...) Expand all
23 } 23 }
24 24
25 void GrPathProcessor::getInvariantOutputColor(GrInitInvariantOutput* out) const { 25 void GrPathProcessor::getInvariantOutputColor(GrInitInvariantOutput* out) const {
26 out->setKnownFourComponents(fColor); 26 out->setKnownFourComponents(fColor);
27 } 27 }
28 28
29 void GrPathProcessor::getInvariantOutputCoverage(GrInitInvariantOutput* out) con st { 29 void GrPathProcessor::getInvariantOutputCoverage(GrInitInvariantOutput* out) con st {
30 out->setKnownSingleComponent(0xff); 30 out->setKnownSingleComponent(0xff);
31 } 31 }
32 32
33 void GrPathProcessor::initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const { 33 void GrPathProcessor::initBatchTracker(GrBatchTracker* bt, const GrPipelineOptim izations& opt) const {
34 PathBatchTracker* local = bt->cast<PathBatchTracker>(); 34 PathBatchTracker* local = bt->cast<PathBatchTracker>();
35 if (!init.readsColor()) { 35 if (!opt.readsColor()) {
36 local->fInputColorType = kIgnored_GrGPInput; 36 local->fInputColorType = kIgnored_GrGPInput;
37 local->fColor = GrColor_ILLEGAL; 37 local->fColor = GrColor_ILLEGAL;
38 } else { 38 } else {
39 local->fInputColorType = kUniform_GrGPInput; 39 local->fInputColorType = kUniform_GrGPInput;
40 if (!init.getOverrideColorIfSet(&local->fColor)) { 40 if (!opt.getOverrideColorIfSet(&local->fColor)) {
41 local->fColor = this->color(); 41 local->fColor = this->color();
42 } 42 }
43 } 43 }
44 44
45 local->fInputCoverageType = init.readsCoverage() ? kAllOnes_GrGPInput : kIgn ored_GrGPInput; 45 local->fInputCoverageType = opt.readsCoverage() ? kAllOnes_GrGPInput : kIgno red_GrGPInput;
46 local->fUsesLocalCoords = init.readsLocalCoords(); 46 local->fUsesLocalCoords = opt.readsLocalCoords();
47 } 47 }
48 48
49 bool GrPathProcessor::canMakeEqual(const GrBatchTracker& m, 49 bool GrPathProcessor::canMakeEqual(const GrBatchTracker& m,
50 const GrPrimitiveProcessor& that, 50 const GrPrimitiveProcessor& that,
51 const GrBatchTracker& t) const { 51 const GrBatchTracker& t) const {
52 if (this->classID() != that.classID() || !this->hasSameTextureAccesses(that) ) { 52 if (this->classID() != that.classID() || !this->hasSameTextureAccesses(that) ) {
53 return false; 53 return false;
54 } 54 }
55 55
56 const GrPathProcessor& other = that.cast<GrPathProcessor>(); 56 const GrPathProcessor& other = that.cast<GrPathProcessor>();
(...skipping 22 matching lines...) Expand all
79 const GrGLSLCaps& caps, 79 const GrGLSLCaps& caps,
80 GrProcessorKeyBuilder* b) const { 80 GrProcessorKeyBuilder* b) const {
81 GrGLPathProcessor::GenKey(*this, bt, caps, b); 81 GrGLPathProcessor::GenKey(*this, bt, caps, b);
82 } 82 }
83 83
84 GrGLPrimitiveProcessor* GrPathProcessor::createGLInstance(const GrBatchTracker& bt, 84 GrGLPrimitiveProcessor* GrPathProcessor::createGLInstance(const GrBatchTracker& bt,
85 const GrGLSLCaps& caps ) const { 85 const GrGLSLCaps& caps ) const {
86 SkASSERT(caps.pathRenderingSupport()); 86 SkASSERT(caps.pathRenderingSupport());
87 return SkNEW_ARGS(GrGLPathProcessor, (*this, bt)); 87 return SkNEW_ARGS(GrGLPathProcessor, (*this, bt));
88 } 88 }
OLDNEW
« no previous file with comments | « src/gpu/GrPathProcessor.h ('k') | src/gpu/GrPipeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698