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

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

Issue 302553008: Revert of Revert of Add compressed texture capabilities for GPU devices (Closed) Base URL: https://skia.googlesource.com/skia.git@master
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
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/gl/GrGLCaps.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 /* 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...) Expand 10 before | Expand all | Expand 10 after
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 {
76 SkASSERT(kGrCompressedFormatCount > format);
77 return fCompressedFormatSupport[format];
78 }
79
75 protected: 80 protected:
76 bool f8BitPaletteSupport : 1; 81 bool f8BitPaletteSupport : 1;
77 bool fNPOTTextureTileSupport : 1; 82 bool fNPOTTextureTileSupport : 1;
78 bool fMipMapSupport : 1; 83 bool fMipMapSupport : 1;
79 bool fTwoSidedStencilSupport : 1; 84 bool fTwoSidedStencilSupport : 1;
80 bool fStencilWrapOpsSupport : 1; 85 bool fStencilWrapOpsSupport : 1;
81 bool fHWAALineSupport : 1; 86 bool fHWAALineSupport : 1;
82 bool fShaderDerivativeSupport : 1; 87 bool fShaderDerivativeSupport : 1;
83 bool fGeometryShaderSupport : 1; 88 bool fGeometryShaderSupport : 1;
84 bool fDualSourceBlendingSupport : 1; 89 bool fDualSourceBlendingSupport : 1;
85 bool fPathRenderingSupport : 1; 90 bool fPathRenderingSupport : 1;
86 bool fDstReadInShaderSupport : 1; 91 bool fDstReadInShaderSupport : 1;
87 bool fDiscardRenderTargetSupport: 1; 92 bool fDiscardRenderTargetSupport: 1;
88 bool fReuseScratchTextures : 1; 93 bool fReuseScratchTextures : 1;
89 bool fGpuTracingSupport : 1; 94 bool fGpuTracingSupport : 1;
90 95
91 uint32_t fMapBufferFlags; 96 uint32_t fMapBufferFlags;
92 97
93 int fMaxRenderTargetSize; 98 int fMaxRenderTargetSize;
94 int fMaxTextureSize; 99 int fMaxTextureSize;
95 int fMaxSampleCount; 100 int fMaxSampleCount;
96 101
97 // 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.
98 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; 103 bool fConfigRenderSupport[kGrPixelConfigCnt][2];
99 104
105 bool fCompressedFormatSupport[kGrCompressedFormatCount];
106
100 typedef SkRefCnt INHERITED; 107 typedef SkRefCnt INHERITED;
101 }; 108 };
102 109
103 #endif 110 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/gl/GrGLCaps.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698