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

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

Issue 1359833004: Stop supporting HW dither (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: minor Created 5 years, 3 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.cpp ('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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 /////////////////////////////////////////////////////////////////////////// 289 ///////////////////////////////////////////////////////////////////////////
290 /// @name State Flags 290 /// @name State Flags
291 //// 291 ////
292 292
293 /** 293 /**
294 * Flags that affect rendering. Controlled using enable/disableState(). All 294 * Flags that affect rendering. Controlled using enable/disableState(). All
295 * default to disabled. 295 * default to disabled.
296 */ 296 */
297 enum Flags { 297 enum Flags {
298 /** 298 /**
299 * Perform dithering. TODO: Re-evaluate whether we need this bit
300 */
301 kDither_Flag = 0x01,
302 /**
303 * Perform HW anti-aliasing. This means either HW FSAA, if supported by the render target, 299 * Perform HW anti-aliasing. This means either HW FSAA, if supported by the render target,
304 * or smooth-line rendering if a line primitive is drawn and line smooth ing is supported by 300 * or smooth-line rendering if a line primitive is drawn and line smooth ing is supported by
305 * the 3D API. 301 * the 3D API.
306 */ 302 */
307 kHWAntialias_Flag = 0x02, 303 kHWAntialias_Flag = 0x01,
308 304
309 /** 305 /**
310 * Modifies the vertex shader so that vertices will be positioned at pix el centers. 306 * Modifies the vertex shader so that vertices will be positioned at pix el centers.
311 */ 307 */
312 kSnapVerticesToPixelCenters_Flag = 0x04, 308 kSnapVerticesToPixelCenters_Flag = 0x02,
313 309
314 kLast_Flag = kSnapVerticesToPixelCenters_Flag, 310 kLast_Flag = kSnapVerticesToPixelCenters_Flag,
315 }; 311 };
316 312
317 bool isDither() const { return SkToBool(fFlags & kDither_Flag); }
318 bool isHWAntialias() const { return SkToBool(fFlags & kHWAntialias_Flag); } 313 bool isHWAntialias() const { return SkToBool(fFlags & kHWAntialias_Flag); }
319 bool snapVerticesToPixelCenters() const { 314 bool snapVerticesToPixelCenters() const {
320 return SkToBool(fFlags & kSnapVerticesToPixelCenters_Flag); } 315 return SkToBool(fFlags & kSnapVerticesToPixelCenters_Flag); }
321 316
322 /** 317 /**
323 * Enable render state settings. 318 * Enable render state settings.
324 * 319 *
325 * @param flags bitfield of Flags specifying the states to enable 320 * @param flags bitfield of Flags specifying the states to enable
326 */ 321 */
327 void enableState(uint32_t flags) { fFlags |= flags; } 322 void enableState(uint32_t flags) { fFlags |= flags; }
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 FragmentProcessorArray fCoverageFragmentProcessors; 422 FragmentProcessorArray fCoverageFragmentProcessors;
428 GrClip fClip; 423 GrClip fClip;
429 424
430 mutable GrProcOptInfo fColorProcInfo; 425 mutable GrProcOptInfo fColorProcInfo;
431 mutable GrProcOptInfo fCoverageProcInfo; 426 mutable GrProcOptInfo fCoverageProcInfo;
432 427
433 friend class GrPipeline; 428 friend class GrPipeline;
434 }; 429 };
435 430
436 #endif 431 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrPipeline.cpp ('k') | src/gpu/GrPipelineBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698