Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 | |
| 2 /* | |
| 3 * Copyright 2013 Google Inc. | |
| 4 * | |
| 5 * Use of this source code is governed by a BSD-style license that can be | |
| 6 * found in the LICENSE file. | |
| 7 */ | |
| 8 | |
|
robertphillips
2013/03/25 18:11:36
double inclusion #ifdefs?
bsalomon
2013/03/25 18:20:14
Done.
bsalomon
2013/03/25 18:20:14
Done.
| |
| 9 #include "SkRefCnt.h" | |
| 10 | |
| 11 /** | |
| 12 * Represents the draw target capabilities. | |
| 13 */ | |
| 14 class GrDrawTargetCaps : public SkRefCnt { | |
| 15 public: | |
| 16 SK_DECLARE_INST_COUNT(Caps) | |
| 17 | |
| 18 GrDrawTargetCaps() { this->reset(); } | |
| 19 GrDrawTargetCaps(const GrDrawTargetCaps& other) { *this = other; } | |
| 20 GrDrawTargetCaps& operator= (const GrDrawTargetCaps&); | |
| 21 | |
| 22 virtual void reset(); | |
| 23 virtual void print() const; | |
| 24 | |
| 25 bool eightBitPaletteSupport() const { return f8BitPaletteSupport; } | |
| 26 bool npotTextureTileSupport() const { return fNPOTTextureTileSupport; } | |
| 27 bool twoSidedStencilSupport() const { return fTwoSidedStencilSupport; } | |
| 28 bool stencilWrapOpsSupport() const { return fStencilWrapOpsSupport; } | |
| 29 bool hwAALineSupport() const { return fHWAALineSupport; } | |
| 30 bool shaderDerivativeSupport() const { return fShaderDerivativeSupport; } | |
| 31 bool geometryShaderSupport() const { return fGeometryShaderSupport; } | |
| 32 bool dualSourceBlendingSupport() const { return fDualSourceBlendingSupport; } | |
| 33 bool bufferLockSupport() const { return fBufferLockSupport; } | |
| 34 bool pathStencilingSupport() const { return fPathStencilingSupport; } | |
| 35 | |
| 36 int maxRenderTargetSize() const { return fMaxRenderTargetSize; } | |
| 37 int maxTextureSize() const { return fMaxTextureSize; } | |
| 38 // Will be 0 if MSAA is not supported | |
| 39 int maxSampleCount() const { return fMaxSampleCount; } | |
| 40 | |
| 41 protected: | |
| 42 bool f8BitPaletteSupport : 1; | |
| 43 bool fNPOTTextureTileSupport : 1; | |
| 44 bool fTwoSidedStencilSupport : 1; | |
| 45 bool fStencilWrapOpsSupport : 1; | |
| 46 bool fHWAALineSupport : 1; | |
| 47 bool fShaderDerivativeSupport : 1; | |
| 48 bool fGeometryShaderSupport : 1; | |
| 49 bool fDualSourceBlendingSupport : 1; | |
| 50 bool fBufferLockSupport : 1; | |
| 51 bool fPathStencilingSupport : 1; | |
| 52 | |
| 53 int fMaxRenderTargetSize; | |
| 54 int fMaxTextureSize; | |
| 55 int fMaxSampleCount; | |
| 56 | |
| 57 typedef SkRefCnt INHERITED; | |
| 58 }; | |
| OLD | NEW |