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

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

Issue 2165283002: Remove DrawFace enum from GrPipelineBuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: try again 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
277 /** 269 /**
278 * Gets whether the target is drawing clockwise, counterclockwise, 270 * Gets whether the target is drawing clockwise, counterclockwise,
279 * or both faces. 271 * or both faces.
280 * @return the current draw face(s). 272 * @return the current draw face(s).
281 */ 273 */
282 DrawFace getDrawFace() const { return fDrawFace; } 274 GrDrawFace getDrawFace() const { return fDrawFace; }
283 275
284 /** 276 /**
285 * Controls whether clockwise, counterclockwise, or both faces are drawn. 277 * Controls whether clockwise, counterclockwise, or both faces are drawn.
286 * @param face the face(s) to draw. 278 * @param face the face(s) to draw.
287 */ 279 */
288 void setDrawFace(DrawFace face) { 280 void setDrawFace(GrDrawFace face) {
289 SkASSERT(kInvalid_DrawFace != face); 281 SkASSERT(GrDrawFace::kInvalid != face);
290 fDrawFace = face; 282 fDrawFace = face;
291 } 283 }
292 284
293 /// @} 285 /// @}
294 286
295 /////////////////////////////////////////////////////////////////////////// 287 ///////////////////////////////////////////////////////////////////////////
296 288
297 bool usePLSDstRead(const GrDrawBatch* batch) const; 289 bool usePLSDstRead(const GrDrawBatch* batch) const;
298 290
299 private: 291 private:
300 // Some of the auto restore objects assume that no effects are removed durin g their lifetime. 292 // Some of the auto restore objects assume that no effects are removed durin g their lifetime.
301 // This is used to assert that this condition holds. 293 // This is used to assert that this condition holds.
302 SkDEBUGCODE(mutable int fBlockEffectRemovalCnt;) 294 SkDEBUGCODE(mutable int fBlockEffectRemovalCnt;)
303 295
304 typedef SkSTArray<4, sk_sp<GrFragmentProcessor>> FragmentProcessorArray; 296 typedef SkSTArray<4, sk_sp<GrFragmentProcessor>> FragmentProcessorArray;
305 297
306 uint32_t fFlags; 298 uint32_t fFlags;
307 const GrUserStencilSettings* fUserStencilSettings; 299 const GrUserStencilSettings* fUserStencilSettings;
308 DrawFace fDrawFace; 300 GrDrawFace fDrawFace;
309 mutable sk_sp<GrXPFactory> fXPFactory; 301 mutable sk_sp<GrXPFactory> fXPFactory;
310 FragmentProcessorArray fColorFragmentProcessors; 302 FragmentProcessorArray fColorFragmentProcessors;
311 FragmentProcessorArray fCoverageFragmentProcessors; 303 FragmentProcessorArray fCoverageFragmentProcessors;
312 304
313 friend class GrPipeline; 305 friend class GrPipeline;
314 friend class GrDrawTarget; 306 friend class GrDrawTarget;
315 }; 307 };
316 308
317 #endif 309 #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