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

Side by Side Diff: include/gpu/GrPaint.h

Issue 1225363002: Move GrProcessorDataManager to GrMemoryPool (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks 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 | « no previous file | include/gpu/GrProcessorDataManager.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 2011 Google Inc. 3 * Copyright 2011 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 9
10 #ifndef GrPaint_DEFINED 10 #ifndef GrPaint_DEFINED
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 GrPaint& operator=(const GrPaint& paint) { 118 GrPaint& operator=(const GrPaint& paint) {
119 fAntiAlias = paint.fAntiAlias; 119 fAntiAlias = paint.fAntiAlias;
120 fDither = paint.fDither; 120 fDither = paint.fDither;
121 121
122 fColor = paint.fColor; 122 fColor = paint.fColor;
123 123
124 fColorStages = paint.fColorStages; 124 fColorStages = paint.fColorStages;
125 fCoverageStages = paint.fCoverageStages; 125 fCoverageStages = paint.fCoverageStages;
126 126
127 fXPFactory.reset(SkRef(paint.getXPFactory())); 127 fXPFactory.reset(SkRef(paint.getXPFactory()));
128 fProcDataManager.reset(SkNEW_ARGS(GrProcessorDataManager, (*paint.proces sorDataManager())));
128 129
129 return *this; 130 return *this;
130 } 131 }
131 132
132 /** 133 /**
133 * Returns true if the paint's output color will be constant after blending. If the result is 134 * Returns true if the paint's output color will be constant after blending. If the result is
134 * true, constantColor will be updated to contain the constant color. Note t hat we can conflate 135 * true, constantColor will be updated to contain the constant color. Note t hat we can conflate
135 * coverage and color, so the actual values written to pixels with partial c overage may still 136 * coverage and color, so the actual values written to pixels with partial c overage may still
136 * not seem constant, even if this function returns true. 137 * not seem constant, even if this function returns true.
137 */ 138 */
138 bool isConstantBlendedColor(GrColor* constantColor) const; 139 bool isConstantBlendedColor(GrColor* constantColor) const;
139 140
140 GrProcessorDataManager* getProcessorDataManager() { return &fProcDataManager ; } 141 GrProcessorDataManager* getProcessorDataManager() { return fProcDataManager. get(); }
142
143 const GrProcessorDataManager* processorDataManager() const { return fProcDat aManager.get(); }
141 144
142 private: 145 private:
143 mutable SkAutoTUnref<const GrXPFactory> fXPFactory; 146 mutable SkAutoTUnref<const GrXPFactory> fXPFactory;
144 SkSTArray<4, GrFragmentStage> fColorStages; 147 SkSTArray<4, GrFragmentStage> fColorStages;
145 SkSTArray<2, GrFragmentStage> fCoverageStages; 148 SkSTArray<2, GrFragmentStage> fCoverageStages;
146 149
147 bool fAntiAlias; 150 bool fAntiAlias;
148 bool fDither; 151 bool fDither;
149 152
150 GrColor fColor; 153 GrColor fColor;
151 GrProcessorDataManager fProcDataManager; 154 SkAutoTUnref<GrProcessorDataManager> fProcDataManager;
152 }; 155 };
153 156
154 #endif 157 #endif
OLDNEW
« no previous file with comments | « no previous file | include/gpu/GrProcessorDataManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698