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

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

Issue 262963002: Revert of Add support for glMapBufferRange. Use glMapBufferRange and glMapBufferSubData. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/gl/GrGLAssembleInterface.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 /* 2 /*
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 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 #ifndef GrDrawTargetCaps_DEFINED 8 #ifndef GrDrawTargetCaps_DEFINED
9 #define GrDrawTargetCaps_DEFINED 9 #define GrDrawTargetCaps_DEFINED
10 10
(...skipping 19 matching lines...) Expand all
30 bool npotTextureTileSupport() const { return fNPOTTextureTileSupport; } 30 bool npotTextureTileSupport() const { return fNPOTTextureTileSupport; }
31 /** To avoid as-yet-unnecessary complexity we don't allow any partial suppor t of MIP Maps (e.g. 31 /** To avoid as-yet-unnecessary complexity we don't allow any partial suppor t of MIP Maps (e.g.
32 only for POT textures) */ 32 only for POT textures) */
33 bool mipMapSupport() const { return fMipMapSupport; } 33 bool mipMapSupport() const { return fMipMapSupport; }
34 bool twoSidedStencilSupport() const { return fTwoSidedStencilSupport; } 34 bool twoSidedStencilSupport() const { return fTwoSidedStencilSupport; }
35 bool stencilWrapOpsSupport() const { return fStencilWrapOpsSupport; } 35 bool stencilWrapOpsSupport() const { return fStencilWrapOpsSupport; }
36 bool hwAALineSupport() const { return fHWAALineSupport; } 36 bool hwAALineSupport() const { return fHWAALineSupport; }
37 bool shaderDerivativeSupport() const { return fShaderDerivativeSupport; } 37 bool shaderDerivativeSupport() const { return fShaderDerivativeSupport; }
38 bool geometryShaderSupport() const { return fGeometryShaderSupport; } 38 bool geometryShaderSupport() const { return fGeometryShaderSupport; }
39 bool dualSourceBlendingSupport() const { return fDualSourceBlendingSupport; } 39 bool dualSourceBlendingSupport() const { return fDualSourceBlendingSupport; }
40 bool bufferLockSupport() const { return fBufferLockSupport; }
40 bool pathRenderingSupport() const { return fPathRenderingSupport; } 41 bool pathRenderingSupport() const { return fPathRenderingSupport; }
41 bool dstReadInShaderSupport() const { return fDstReadInShaderSupport; } 42 bool dstReadInShaderSupport() const { return fDstReadInShaderSupport; }
42 bool discardRenderTargetSupport() const { return fDiscardRenderTargetSupport ; } 43 bool discardRenderTargetSupport() const { return fDiscardRenderTargetSupport ; }
43 bool gpuTracingSupport() const { return fGpuTracingSupport; } 44 bool gpuTracingSupport() const { return fGpuTracingSupport; }
44 45
45 /**
46 * Indicates whether GPU->CPU memory mapping for GPU resources such as verte x buffers and
47 * textures allows partial mappings or full mappings.
48 */
49 enum MapFlags {
50 kNone_MapFlags = 0x0, //<! Cannot map the resource.
51
52 kCanMap_MapFlag = 0x1, //<! The resource can be mapped. Must be s et for any of
53 // the other flags to have meaning.k
54 kSubset_MapFlag = 0x2, //<! The resource can be partially mapped.
55 };
56
57 uint32_t mapBufferFlags() const { return fMapBufferFlags; }
58
59 // Scratch textures not being reused means that those scratch textures 46 // Scratch textures not being reused means that those scratch textures
60 // that we upload to (i.e., don't have a render target) will not be 47 // that we upload to (i.e., don't have a render target) will not be
61 // recycled in the texture cache. This is to prevent ghosting by drivers 48 // recycled in the texture cache. This is to prevent ghosting by drivers
62 // (in particular for deferred architectures). 49 // (in particular for deferred architectures).
63 bool reuseScratchTextures() const { return fReuseScratchTextures; } 50 bool reuseScratchTextures() const { return fReuseScratchTextures; }
64 51
65 int maxRenderTargetSize() const { return fMaxRenderTargetSize; } 52 int maxRenderTargetSize() const { return fMaxRenderTargetSize; }
66 int maxTextureSize() const { return fMaxTextureSize; } 53 int maxTextureSize() const { return fMaxTextureSize; }
67 // Will be 0 if MSAA is not supported 54 // Will be 0 if MSAA is not supported
68 int maxSampleCount() const { return fMaxSampleCount; } 55 int maxSampleCount() const { return fMaxSampleCount; }
69 56
70 bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const { 57 bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const {
71 SkASSERT(kGrPixelConfigCnt > config); 58 SkASSERT(kGrPixelConfigCnt > config);
72 return fConfigRenderSupport[config][withMSAA]; 59 return fConfigRenderSupport[config][withMSAA];
73 } 60 }
74 61
75 protected: 62 protected:
76 bool f8BitPaletteSupport : 1; 63 bool f8BitPaletteSupport : 1;
77 bool fNPOTTextureTileSupport : 1; 64 bool fNPOTTextureTileSupport : 1;
78 bool fMipMapSupport : 1; 65 bool fMipMapSupport : 1;
79 bool fTwoSidedStencilSupport : 1; 66 bool fTwoSidedStencilSupport : 1;
80 bool fStencilWrapOpsSupport : 1; 67 bool fStencilWrapOpsSupport : 1;
81 bool fHWAALineSupport : 1; 68 bool fHWAALineSupport : 1;
82 bool fShaderDerivativeSupport : 1; 69 bool fShaderDerivativeSupport : 1;
83 bool fGeometryShaderSupport : 1; 70 bool fGeometryShaderSupport : 1;
84 bool fDualSourceBlendingSupport : 1; 71 bool fDualSourceBlendingSupport : 1;
72 bool fBufferLockSupport : 1;
85 bool fPathRenderingSupport : 1; 73 bool fPathRenderingSupport : 1;
86 bool fDstReadInShaderSupport : 1; 74 bool fDstReadInShaderSupport : 1;
87 bool fDiscardRenderTargetSupport: 1; 75 bool fDiscardRenderTargetSupport: 1;
88 bool fReuseScratchTextures : 1; 76 bool fReuseScratchTextures : 1;
89 bool fGpuTracingSupport : 1; 77 bool fGpuTracingSupport : 1;
90 78
91 uint32_t fMapBufferFlags;
92
93 int fMaxRenderTargetSize; 79 int fMaxRenderTargetSize;
94 int fMaxTextureSize; 80 int fMaxTextureSize;
95 int fMaxSampleCount; 81 int fMaxSampleCount;
96 82
97 // The first entry for each config is without msaa and the second is with. 83 // The first entry for each config is without msaa and the second is with.
98 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; 84 bool fConfigRenderSupport[kGrPixelConfigCnt][2];
99 85
100 typedef SkRefCnt INHERITED; 86 typedef SkRefCnt INHERITED;
101 }; 87 };
102 88
103 #endif 89 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/gl/GrGLAssembleInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698