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

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

Issue 26342006: Move renderable config list to GrDrawTargetCaps (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fix size_t/int comparison Created 7 years, 2 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/GrGpu.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 8
9 #include "SkRefCnt.h" 9 #include "SkRefCnt.h"
10 #include "GrTypes.h"
10 11
11 #ifndef GrDrawTargetCaps_DEFINED 12 #ifndef GrDrawTargetCaps_DEFINED
12 #define GrDrawTargetCaps_DEFINED 13 #define GrDrawTargetCaps_DEFINED
13 14
14 /** 15 /**
15 * Represents the draw target capabilities. 16 * Represents the draw target capabilities.
16 */ 17 */
17 class GrDrawTargetCaps : public SkRefCnt { 18 class GrDrawTargetCaps : public SkRefCnt {
18 public: 19 public:
19 SK_DECLARE_INST_COUNT(Caps) 20 SK_DECLARE_INST_COUNT(Caps)
(...skipping 16 matching lines...) Expand all
36 bool bufferLockSupport() const { return fBufferLockSupport; } 37 bool bufferLockSupport() const { return fBufferLockSupport; }
37 bool pathRenderingSupport() const { return fPathRenderingSupport; } 38 bool pathRenderingSupport() const { return fPathRenderingSupport; }
38 bool dstReadInShaderSupport() const { return fDstReadInShaderSupport; } 39 bool dstReadInShaderSupport() const { return fDstReadInShaderSupport; }
39 bool reuseScratchTextures() const { return fReuseScratchTextures; } 40 bool reuseScratchTextures() const { return fReuseScratchTextures; }
40 41
41 int maxRenderTargetSize() const { return fMaxRenderTargetSize; } 42 int maxRenderTargetSize() const { return fMaxRenderTargetSize; }
42 int maxTextureSize() const { return fMaxTextureSize; } 43 int maxTextureSize() const { return fMaxTextureSize; }
43 // Will be 0 if MSAA is not supported 44 // Will be 0 if MSAA is not supported
44 int maxSampleCount() const { return fMaxSampleCount; } 45 int maxSampleCount() const { return fMaxSampleCount; }
45 46
47 /**
48 * Can the provided configuration act as a render target?
49 */
50 bool isConfigRenderable(GrPixelConfig config) const {
51 SkASSERT(kGrPixelConfigCnt > config);
52 return fConfigRenderSupport[config];
53 }
54
46 protected: 55 protected:
47 bool f8BitPaletteSupport : 1; 56 bool f8BitPaletteSupport : 1;
48 bool fNPOTTextureTileSupport : 1; 57 bool fNPOTTextureTileSupport : 1;
49 bool fTwoSidedStencilSupport : 1; 58 bool fTwoSidedStencilSupport : 1;
50 bool fStencilWrapOpsSupport : 1; 59 bool fStencilWrapOpsSupport : 1;
51 bool fHWAALineSupport : 1; 60 bool fHWAALineSupport : 1;
52 bool fShaderDerivativeSupport : 1; 61 bool fShaderDerivativeSupport : 1;
53 bool fGeometryShaderSupport : 1; 62 bool fGeometryShaderSupport : 1;
54 bool fDualSourceBlendingSupport : 1; 63 bool fDualSourceBlendingSupport : 1;
55 bool fBufferLockSupport : 1; 64 bool fBufferLockSupport : 1;
56 bool fPathRenderingSupport : 1; 65 bool fPathRenderingSupport : 1;
57 bool fDstReadInShaderSupport : 1; 66 bool fDstReadInShaderSupport : 1;
58 bool fReuseScratchTextures : 1; 67 bool fReuseScratchTextures : 1;
59 68
60 int fMaxRenderTargetSize; 69 int fMaxRenderTargetSize;
61 int fMaxTextureSize; 70 int fMaxTextureSize;
62 int fMaxSampleCount; 71 int fMaxSampleCount;
63 72
73 bool fConfigRenderSupport[kGrPixelConfigCnt];
74
64 typedef SkRefCnt INHERITED; 75 typedef SkRefCnt INHERITED;
65 }; 76 };
66 77
67 #endif 78 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698