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

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

Issue 1471083002: Add debug option to clip each GrBatch to its device bounds (Closed) Base URL: https://skia.googlesource.com/skia.git@clipbounds
Patch Set: update Created 5 years, 1 month 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 | « include/gpu/GrContext.h ('k') | src/gpu/GrClipMaskManager.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 * 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 GrContextOptions_DEFINED 8 #ifndef GrContextOptions_DEFINED
9 #define GrContextOptions_DEFINED 9 #define GrContextOptions_DEFINED
10 10
11 #include "SkTypes.h" 11 #include "SkTypes.h"
12 12
13 struct GrContextOptions { 13 struct GrContextOptions {
14 GrContextOptions() 14 GrContextOptions()
15 : fDrawPathToCompressedTexture(false) 15 : fDrawPathToCompressedTexture(false)
16 , fSuppressPrints(false) 16 , fSuppressPrints(false)
17 , fMaxTextureSizeOverride(SK_MaxS32) 17 , fMaxTextureSizeOverride(SK_MaxS32)
18 , fMaxTileSizeOverride(0) 18 , fMaxTileSizeOverride(0)
19 , fSuppressDualSourceBlending(false) 19 , fSuppressDualSourceBlending(false)
20 , fGeometryBufferMapThreshold(-1) 20 , fGeometryBufferMapThreshold(-1)
21 , fUseDrawInsteadOfPartialRenderTargetWrite(false) 21 , fUseDrawInsteadOfPartialRenderTargetWrite(false)
22 , fImmediateMode(false) 22 , fImmediateMode(false)
23 , fClipBatchToBounds(false)
23 , fUseShaderSwizzling(false) {} 24 , fUseShaderSwizzling(false) {}
24 25
25 // EXPERIMENTAL 26 // EXPERIMENTAL
26 // May be removed in the future, or may become standard depending 27 // May be removed in the future, or may become standard depending
27 // on the outcomes of a variety of internal tests. 28 // on the outcomes of a variety of internal tests.
28 bool fDrawPathToCompressedTexture; 29 bool fDrawPathToCompressedTexture;
29 30
30 // Suppress prints for the GrContext. 31 // Suppress prints for the GrContext.
31 bool fSuppressPrints; 32 bool fSuppressPrints;
32 33
33 /** Overrides: These options override feature detection using backend API qu eries. These 34 /** Overrides: These options override feature detection using backend API qu eries. These
34 overrides can only reduce the feature set or limits, never increase them beyond the 35 overrides can only reduce the feature set or limits, never increase them beyond the
35 detected values. */ 36 detected values. */
36 37
37 int fMaxTextureSizeOverride; 38 int fMaxTextureSizeOverride;
38 /** If non-zero, overrides the maximum size of a tile for sw-backed images a nd bitmaps rendered 39 /** If non-zero, overrides the maximum size of a tile for sw-backed images a nd bitmaps rendered
39 by SkGpuDevice. */ 40 by SkGpuDevice. */
40 int fMaxTileSizeOverride; 41 int fMaxTileSizeOverride;
41 bool fSuppressDualSourceBlending; 42 bool fSuppressDualSourceBlending;
42 43
43 /** the threshold in bytes above which we will use a buffer mapping API to m ap vertex and index 44 /** the threshold in bytes above which we will use a buffer mapping API to m ap vertex and index
44 buffers to CPU memory in order to update them. A value of -1 means the GrContext should 45 buffers to CPU memory in order to update them. A value of -1 means the GrContext should
45 deduce the optimal value for this platform. */ 46 deduce the optimal value for this platform. */
46 int fGeometryBufferMapThreshold; 47 int fGeometryBufferMapThreshold;
47 48
48 /** some gpus have problems with partial writes of the rendertarget */ 49 /** some gpus have problems with partial writes of the rendertarget */
49 bool fUseDrawInsteadOfPartialRenderTargetWrite; 50 bool fUseDrawInsteadOfPartialRenderTargetWrite;
50 51
51 /** The GrContext operates in immedidate mode. It will issue all draws to th e backend API 52 /** The GrContext operates in immediate mode. It will issue all draws to the backend API
52 immediately. Intended to ease debugging. */ 53 immediately. Intended to ease debugging. */
53 bool fImmediateMode; 54 bool fImmediateMode;
54 55
56 /** For debugging purposes turn each GrBatch's bounds into a clip rect. This is used to
57 verify that the clip bounds are conservative. */
58 bool fClipBatchToBounds;
59
55 /** Force us to do all swizzling manually in the shader and don't rely on ex tensions to do 60 /** Force us to do all swizzling manually in the shader and don't rely on ex tensions to do
56 swizzling. */ 61 swizzling. */
57 bool fUseShaderSwizzling; 62 bool fUseShaderSwizzling;
58 }; 63 };
59 64
60 #endif 65 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrContext.h ('k') | src/gpu/GrClipMaskManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698