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/GrPipeline.h

Issue 1275603002: Expose coord transforms from GrPipeline (Closed) Base URL: https://skia.googlesource.com/skia.git@lccleanup4
Patch Set: 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
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 21 matching lines...) Expand all
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.
41 */ 41 */
42 bool isEqual(const GrPipeline& that) const; 42 bool isEqual(const GrPipeline& that, bool ignoreCoordTransforms = false) con st;
43 43
44 /// @} 44 /// @}
45 45
46 /////////////////////////////////////////////////////////////////////////// 46 ///////////////////////////////////////////////////////////////////////////
47 /// @name GrFragmentProcessors 47 /// @name GrFragmentProcessors
48 48
49 49
50 int numColorFragmentStages() const { return fNumColorStages; } 50 int numColorFragmentStages() const { return fNumColorStages; }
51 int numCoverageFragmentStages() const { return fFragmentStages.count() - fNu mColorStages; } 51 int numCoverageFragmentStages() const { return fFragmentStages.count() - fNu mColorStages; }
52 int numFragmentStages() const { return fFragmentStages.count(); } 52 int numFragmentStages() const { return fFragmentStages.count(); }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 94
95 /////////////////////////////////////////////////////////////////////////// 95 ///////////////////////////////////////////////////////////////////////////
96 96
97 bool readsFragPosition() const { return fReadsFragPosition; } 97 bool readsFragPosition() const { return fReadsFragPosition; }
98 98
99 const GrPipelineInfo& infoForPrimitiveProcessor() const { 99 const GrPipelineInfo& infoForPrimitiveProcessor() const {
100 return fInfoForPrimitiveProcessor; 100 return fInfoForPrimitiveProcessor;
101 } 101 }
102 102
103 const SkTArray<const GrCoordTransform*, true>& coordTransforms() const {
104 return fCoordTransforms;
105 }
106
103 private: 107 private:
104 /** 108 /**
105 * Alter the program desc and inputs (attribs and processors) based on the b lend optimization. 109 * Alter the program desc and inputs (attribs and processors) based on the b lend optimization.
106 */ 110 */
107 void adjustProgramFromOptimizations(const GrPipelineBuilder& ds, 111 void adjustProgramFromOptimizations(const GrPipelineBuilder& ds,
108 GrXferProcessor::OptFlags, 112 GrXferProcessor::OptFlags,
109 const GrProcOptInfo& colorPOI, 113 const GrProcOptInfo& colorPOI,
110 const GrProcOptInfo& coveragePOI, 114 const GrProcOptInfo& coveragePOI,
111 int* firstColorStageIdx, 115 int* firstColorStageIdx,
112 int* firstCoverageStageIdx); 116 int* firstCoverageStageIdx);
(...skipping 21 matching lines...) Expand all
134 GrPipelineBuilder::DrawFace fDrawFace; 138 GrPipelineBuilder::DrawFace fDrawFace;
135 uint32_t fFlags; 139 uint32_t fFlags;
136 ProgramXferProcessor fXferProcessor; 140 ProgramXferProcessor fXferProcessor;
137 FragmentStageArray fFragmentStages; 141 FragmentStageArray fFragmentStages;
138 bool fReadsFragPosition; 142 bool fReadsFragPosition;
139 GrPipelineInfo fInfoForPrimitiveProcessor; 143 GrPipelineInfo fInfoForPrimitiveProcessor;
140 144
141 // This function is equivalent to the offset into fFragmentStages where cove rage stages begin. 145 // This function is equivalent to the offset into fFragmentStages where cove rage stages begin.
142 int fNumColorStages; 146 int fNumColorStages;
143 147
144 GrProgramDesc fDesc; 148 SkSTArray<8, const GrCoordTransform*, true> fCoordTransforms;
149 int fNumCoordTransforms;
150 GrProgramDesc fDesc;
145 151
146 typedef SkRefCnt INHERITED; 152 typedef SkRefCnt INHERITED;
147 }; 153 };
148 154
149 #endif 155 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698