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

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

Issue 1213383005: Rework GrPipelineInfo (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fixed Created 5 years, 5 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/GrOvalRenderer.cpp ('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 14 matching lines...) Expand all
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 GrPipelineInfo& init) const {
34 PathBatchTracker* local = bt->cast<PathBatchTracker>(); 34 PathBatchTracker* local = bt->cast<PathBatchTracker>();
35 if (init.fColorIgnored) { 35 if (!init.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 local->fColor = GrColor_ILLEGAL == init.fOverrideColor ? this->color() : 40 if (!init.getOverrideColorIfSet(&local->fColor)) {
41 init.fOverrideC olor; 41 local->fColor = this->color();
42 }
42 } 43 }
43 44
44 local->fInputCoverageType = init.fCoverageIgnored ? kIgnored_GrGPInput : kAl lOnes_GrGPInput; 45 local->fInputCoverageType = init.readsCoverage() ? kAllOnes_GrGPInput : kIgn ored_GrGPInput;
45 local->fUsesLocalCoords = init.fUsesLocalCoords; 46 local->fUsesLocalCoords = init.readsLocalCoords();
46 } 47 }
47 48
48 bool GrPathProcessor::canMakeEqual(const GrBatchTracker& m, 49 bool GrPathProcessor::canMakeEqual(const GrBatchTracker& m,
49 const GrPrimitiveProcessor& that, 50 const GrPrimitiveProcessor& that,
50 const GrBatchTracker& t) const { 51 const GrBatchTracker& t) const {
51 if (this->classID() != that.classID() || !this->hasSameTextureAccesses(that) ) { 52 if (this->classID() != that.classID() || !this->hasSameTextureAccesses(that) ) {
52 return false; 53 return false;
53 } 54 }
54 55
55 const GrPathProcessor& other = that.cast<GrPathProcessor>(); 56 const GrPathProcessor& other = that.cast<GrPathProcessor>();
(...skipping 22 matching lines...) Expand all
78 const GrGLSLCaps& caps, 79 const GrGLSLCaps& caps,
79 GrProcessorKeyBuilder* b) const { 80 GrProcessorKeyBuilder* b) const {
80 GrGLPathProcessor::GenKey(*this, bt, caps, b); 81 GrGLPathProcessor::GenKey(*this, bt, caps, b);
81 } 82 }
82 83
83 GrGLPrimitiveProcessor* GrPathProcessor::createGLInstance(const GrBatchTracker& bt, 84 GrGLPrimitiveProcessor* GrPathProcessor::createGLInstance(const GrBatchTracker& bt,
84 const GrGLSLCaps& caps ) const { 85 const GrGLSLCaps& caps ) const {
85 SkASSERT(caps.pathRenderingSupport()); 86 SkASSERT(caps.pathRenderingSupport());
86 return SkNEW_ARGS(GrGLPathProcessor, (*this, bt)); 87 return SkNEW_ARGS(GrGLPathProcessor, (*this, bt));
87 } 88 }
OLDNEW
« no previous file with comments | « src/gpu/GrOvalRenderer.cpp ('k') | src/gpu/GrPipeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698