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

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

Issue 1275603002: Expose coord transforms from GrPipeline (Closed) Base URL: https://skia.googlesource.com/skia.git@lccleanup4
Patch Set: feedback inc 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 | « include/gpu/GrFragmentProcessor.h ('k') | src/gpu/GrPipeline.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 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 #ifndef GrPipeline_DEFINED 8 #ifndef GrPipeline_DEFINED
9 #define GrPipeline_DEFINED 9 #define GrPipeline_DEFINED
10 10
(...skipping 19 matching lines...) Expand all
30 class GrPipeline : public GrNonAtomicRef { 30 class GrPipeline : public GrNonAtomicRef {
31 public: 31 public:
32 GrPipeline(const GrPipelineBuilder&, 32 GrPipeline(const GrPipelineBuilder&,
33 const GrProcOptInfo& colorPOI, 33 const GrProcOptInfo& colorPOI,
34 const GrProcOptInfo& coveragePOI, 34 const GrProcOptInfo& coveragePOI,
35 const GrCaps&, 35 const GrCaps&,
36 const GrScissorState&, 36 const GrScissorState&,
37 const GrXferProcessor::DstTexture*); 37 const GrXferProcessor::DstTexture*);
38 38
39 /* 39 /*
40 * Returns true if these pipelines are equivalent. 40 * Returns true if these pipelines are equivalent. Coord transforms may be applied either on
41 * the GPU or the CPU. When we apply them on the CPU then the matrices need not agree in order
42 * to combine draws. Therefore we take a param that indicates whether coord transforms should be
43 * compared."
41 */ 44 */
42 bool isEqual(const GrPipeline& that) const; 45 bool isEqual(const GrPipeline& that, bool ignoreCoordTransforms = false) con st;
43 46
44 /// @} 47 /// @}
45 48
46 /////////////////////////////////////////////////////////////////////////// 49 ///////////////////////////////////////////////////////////////////////////
47 /// @name GrFragmentProcessors 50 /// @name GrFragmentProcessors
48 51
49 52
50 int numColorFragmentStages() const { return fNumColorStages; } 53 int numColorFragmentStages() const { return fNumColorStages; }
51 int numCoverageFragmentStages() const { return fFragmentStages.count() - fNu mColorStages; } 54 int numCoverageFragmentStages() const { return fFragmentStages.count() - fNu mColorStages; }
52 int numFragmentStages() const { return fFragmentStages.count(); } 55 int numFragmentStages() const { return fFragmentStages.count(); }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 96
94 97
95 /////////////////////////////////////////////////////////////////////////// 98 ///////////////////////////////////////////////////////////////////////////
96 99
97 bool readsFragPosition() const { return fReadsFragPosition; } 100 bool readsFragPosition() const { return fReadsFragPosition; }
98 101
99 const GrPipelineInfo& infoForPrimitiveProcessor() const { 102 const GrPipelineInfo& infoForPrimitiveProcessor() const {
100 return fInfoForPrimitiveProcessor; 103 return fInfoForPrimitiveProcessor;
101 } 104 }
102 105
106 const SkTArray<const GrCoordTransform*, true>& coordTransforms() const {
107 return fCoordTransforms;
108 }
109
103 private: 110 private:
104 /** 111 /**
105 * Alter the program desc and inputs (attribs and processors) based on the b lend optimization. 112 * Alter the program desc and inputs (attribs and processors) based on the b lend optimization.
106 */ 113 */
107 void adjustProgramFromOptimizations(const GrPipelineBuilder& ds, 114 void adjustProgramFromOptimizations(const GrPipelineBuilder& ds,
108 GrXferProcessor::OptFlags, 115 GrXferProcessor::OptFlags,
109 const GrProcOptInfo& colorPOI, 116 const GrProcOptInfo& colorPOI,
110 const GrProcOptInfo& coveragePOI, 117 const GrProcOptInfo& coveragePOI,
111 int* firstColorStageIdx, 118 int* firstColorStageIdx,
112 int* firstCoverageStageIdx); 119 int* firstCoverageStageIdx);
(...skipping 21 matching lines...) Expand all
134 GrPipelineBuilder::DrawFace fDrawFace; 141 GrPipelineBuilder::DrawFace fDrawFace;
135 uint32_t fFlags; 142 uint32_t fFlags;
136 ProgramXferProcessor fXferProcessor; 143 ProgramXferProcessor fXferProcessor;
137 FragmentStageArray fFragmentStages; 144 FragmentStageArray fFragmentStages;
138 bool fReadsFragPosition; 145 bool fReadsFragPosition;
139 GrPipelineInfo fInfoForPrimitiveProcessor; 146 GrPipelineInfo fInfoForPrimitiveProcessor;
140 147
141 // This function is equivalent to the offset into fFragmentStages where cove rage stages begin. 148 // This function is equivalent to the offset into fFragmentStages where cove rage stages begin.
142 int fNumColorStages; 149 int fNumColorStages;
143 150
144 GrProgramDesc fDesc; 151 SkSTArray<8, const GrCoordTransform*, true> fCoordTransforms;
152 int fNumCoordTransforms;
153 GrProgramDesc fDesc;
145 154
146 typedef SkRefCnt INHERITED; 155 typedef SkRefCnt INHERITED;
147 }; 156 };
148 157
149 #endif 158 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrFragmentProcessor.h ('k') | src/gpu/GrPipeline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698