Chromium Code Reviews

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

Issue 304743004: Move ETC1 and LATC enums value to GrPixelConfig (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add isConfigTexturable() Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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 54 matching lines...)
65 int maxRenderTargetSize() const { return fMaxRenderTargetSize; } 65 int maxRenderTargetSize() const { return fMaxRenderTargetSize; }
66 int maxTextureSize() const { return fMaxTextureSize; } 66 int maxTextureSize() const { return fMaxTextureSize; }
67 // Will be 0 if MSAA is not supported 67 // Will be 0 if MSAA is not supported
68 int maxSampleCount() const { return fMaxSampleCount; } 68 int maxSampleCount() const { return fMaxSampleCount; }
69 69
70 bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const { 70 bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const {
71 SkASSERT(kGrPixelConfigCnt > config); 71 SkASSERT(kGrPixelConfigCnt > config);
72 return fConfigRenderSupport[config][withMSAA]; 72 return fConfigRenderSupport[config][withMSAA];
73 } 73 }
74 74
75 bool compressedTextureSupport(GrCompressedFormat format) const { 75 bool isConfigTexturable(GrPixelConfig config) const {
76 SkASSERT(kGrCompressedFormatCount > format); 76 SkASSERT(kGrPixelConfigCnt > config);
77 return fCompressedFormatSupport[format]; 77 return fConfigTextureSupport[config];
78 } 78 }
79 79
80 protected: 80 protected:
81 bool f8BitPaletteSupport : 1; 81 bool f8BitPaletteSupport : 1;
82 bool fNPOTTextureTileSupport : 1; 82 bool fNPOTTextureTileSupport : 1;
83 bool fMipMapSupport : 1; 83 bool fMipMapSupport : 1;
84 bool fTwoSidedStencilSupport : 1; 84 bool fTwoSidedStencilSupport : 1;
85 bool fStencilWrapOpsSupport : 1; 85 bool fStencilWrapOpsSupport : 1;
86 bool fHWAALineSupport : 1; 86 bool fHWAALineSupport : 1;
87 bool fShaderDerivativeSupport : 1; 87 bool fShaderDerivativeSupport : 1;
88 bool fGeometryShaderSupport : 1; 88 bool fGeometryShaderSupport : 1;
89 bool fDualSourceBlendingSupport : 1; 89 bool fDualSourceBlendingSupport : 1;
90 bool fPathRenderingSupport : 1; 90 bool fPathRenderingSupport : 1;
91 bool fDstReadInShaderSupport : 1; 91 bool fDstReadInShaderSupport : 1;
92 bool fDiscardRenderTargetSupport: 1; 92 bool fDiscardRenderTargetSupport: 1;
93 bool fReuseScratchTextures : 1; 93 bool fReuseScratchTextures : 1;
94 bool fGpuTracingSupport : 1; 94 bool fGpuTracingSupport : 1;
95 95
96 uint32_t fMapBufferFlags; 96 uint32_t fMapBufferFlags;
97 97
98 int fMaxRenderTargetSize; 98 int fMaxRenderTargetSize;
99 int fMaxTextureSize; 99 int fMaxTextureSize;
100 int fMaxSampleCount; 100 int fMaxSampleCount;
101 101
102 // The first entry for each config is without msaa and the second is with. 102 // The first entry for each config is without msaa and the second is with.
103 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; 103 bool fConfigRenderSupport[kGrPixelConfigCnt][2];
104 104 bool fConfigTextureSupport[kGrPixelConfigCnt];
105 bool fCompressedFormatSupport[kGrCompressedFormatCount];
106 105
107 typedef SkRefCnt INHERITED; 106 typedef SkRefCnt INHERITED;
108 }; 107 };
109 108
110 #endif 109 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrTexture.cpp » ('j') | src/gpu/gl/GrGLCaps.cpp » ('J')

Powered by Google App Engine