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

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

Issue 2167193002: Revert of Remove DrawFace enum from GrPipelineBuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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/GrPipeline.h ('k') | src/gpu/GrPipelineBuilder.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 GrPipelineBuilder_DEFINED 8 #ifndef GrPipelineBuilder_DEFINED
9 #define GrPipelineBuilder_DEFINED 9 #define GrPipelineBuilder_DEFINED
10 10
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 this->disableState(flags); 259 this->disableState(flags);
260 } 260 }
261 } 261 }
262 262
263 /// @} 263 /// @}
264 264
265 /////////////////////////////////////////////////////////////////////////// 265 ///////////////////////////////////////////////////////////////////////////
266 /// @name Face Culling 266 /// @name Face Culling
267 //// 267 ////
268 268
269 enum DrawFace {
270 kInvalid_DrawFace = -1,
271
272 kBoth_DrawFace,
273 kCCW_DrawFace,
274 kCW_DrawFace,
275 };
276
269 /** 277 /**
270 * Gets whether the target is drawing clockwise, counterclockwise, 278 * Gets whether the target is drawing clockwise, counterclockwise,
271 * or both faces. 279 * or both faces.
272 * @return the current draw face(s). 280 * @return the current draw face(s).
273 */ 281 */
274 GrDrawFace getDrawFace() const { return fDrawFace; } 282 DrawFace getDrawFace() const { return fDrawFace; }
275 283
276 /** 284 /**
277 * Controls whether clockwise, counterclockwise, or both faces are drawn. 285 * Controls whether clockwise, counterclockwise, or both faces are drawn.
278 * @param face the face(s) to draw. 286 * @param face the face(s) to draw.
279 */ 287 */
280 void setDrawFace(GrDrawFace face) { 288 void setDrawFace(DrawFace face) {
281 SkASSERT(GrDrawFace::kInvalid != face); 289 SkASSERT(kInvalid_DrawFace != face);
282 fDrawFace = face; 290 fDrawFace = face;
283 } 291 }
284 292
285 /// @} 293 /// @}
286 294
287 /////////////////////////////////////////////////////////////////////////// 295 ///////////////////////////////////////////////////////////////////////////
288 296
289 bool usePLSDstRead(const GrDrawBatch* batch) const; 297 bool usePLSDstRead(const GrDrawBatch* batch) const;
290 298
291 private: 299 private:
292 // Some of the auto restore objects assume that no effects are removed durin g their lifetime. 300 // Some of the auto restore objects assume that no effects are removed durin g their lifetime.
293 // This is used to assert that this condition holds. 301 // This is used to assert that this condition holds.
294 SkDEBUGCODE(mutable int fBlockEffectRemovalCnt;) 302 SkDEBUGCODE(mutable int fBlockEffectRemovalCnt;)
295 303
296 typedef SkSTArray<4, sk_sp<GrFragmentProcessor>> FragmentProcessorArray; 304 typedef SkSTArray<4, sk_sp<GrFragmentProcessor>> FragmentProcessorArray;
297 305
298 uint32_t fFlags; 306 uint32_t fFlags;
299 const GrUserStencilSettings* fUserStencilSettings; 307 const GrUserStencilSettings* fUserStencilSettings;
300 GrDrawFace fDrawFace; 308 DrawFace fDrawFace;
301 mutable sk_sp<GrXPFactory> fXPFactory; 309 mutable sk_sp<GrXPFactory> fXPFactory;
302 FragmentProcessorArray fColorFragmentProcessors; 310 FragmentProcessorArray fColorFragmentProcessors;
303 FragmentProcessorArray fCoverageFragmentProcessors; 311 FragmentProcessorArray fCoverageFragmentProcessors;
304 312
305 friend class GrPipeline; 313 friend class GrPipeline;
306 friend class GrDrawTarget; 314 friend class GrDrawTarget;
307 }; 315 };
308 316
309 #endif 317 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrPipeline.h ('k') | src/gpu/GrPipelineBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698