| OLD | NEW | 
|    1 /* |    1 /* | 
|    2  * Copyright 2012 Google Inc. |    2  * Copyright 2012 Google Inc. | 
|    3  * |    3  * | 
|    4  * Use of this source code is governed by a BSD-style license that can be |    4  * Use of this source code is governed by a BSD-style license that can be | 
|    5  * found in the LICENSE file. |    5  * found in the LICENSE file. | 
|    6  */ |    6  */ | 
|    7  |    7  | 
|    8  |    8  | 
|    9 #ifndef GrGLCaps_DEFINED |    9 #ifndef GrGLCaps_DEFINED | 
|   10 #define GrGLCaps_DEFINED |   10 #define GrGLCaps_DEFINED | 
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   61         kES_IMG_MsToTexture_MSFBOType, |   61         kES_IMG_MsToTexture_MSFBOType, | 
|   62         /** |   62         /** | 
|   63          * GL_EXT_multisampled_render_to_texture. Same as the IMG one above but 
     uses the standard |   63          * GL_EXT_multisampled_render_to_texture. Same as the IMG one above but 
     uses the standard | 
|   64          * GL_MAX_SAMPLES value. |   64          * GL_MAX_SAMPLES value. | 
|   65          */ |   65          */ | 
|   66         kES_EXT_MsToTexture_MSFBOType, |   66         kES_EXT_MsToTexture_MSFBOType, | 
|   67  |   67  | 
|   68         kLast_MSFBOType = kES_EXT_MsToTexture_MSFBOType |   68         kLast_MSFBOType = kES_EXT_MsToTexture_MSFBOType | 
|   69     }; |   69     }; | 
|   70  |   70  | 
|   71     enum FBFetchType { |  | 
|   72         kNone_FBFetchType, |  | 
|   73         /** GL_EXT_shader_framebuffer_fetch */ |  | 
|   74         kEXT_FBFetchType, |  | 
|   75         /** GL_NV_shader_framebuffer_fetch */ |  | 
|   76         kNV_FBFetchType, |  | 
|   77  |  | 
|   78         kLast_FBFetchType = kNV_FBFetchType |  | 
|   79     }; |  | 
|   80  |  | 
|   81     enum InvalidateFBType { |   71     enum InvalidateFBType { | 
|   82         kNone_InvalidateFBType, |   72         kNone_InvalidateFBType, | 
|   83         kDiscard_InvalidateFBType,       //<! glDiscardFramebuffer() |   73         kDiscard_InvalidateFBType,       //<! glDiscardFramebuffer() | 
|   84         kInvalidate_InvalidateFBType,     //<! glInvalidateFramebuffer() |   74         kInvalidate_InvalidateFBType,     //<! glInvalidateFramebuffer() | 
|   85  |   75  | 
|   86         kLast_InvalidateFBType = kInvalidate_InvalidateFBType |   76         kLast_InvalidateFBType = kInvalidate_InvalidateFBType | 
|   87     }; |   77     }; | 
|   88  |   78  | 
|   89     enum MapBufferType { |   79     enum MapBufferType { | 
|   90         kNone_MapBufferType, |   80         kNone_MapBufferType, | 
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  167  |  157  | 
|  168     /** |  158     /** | 
|  169      * Is the MSAA FBO extension one where the texture is multisampled when boun
     d to an FBO and |  159      * Is the MSAA FBO extension one where the texture is multisampled when boun
     d to an FBO and | 
|  170      * then implicitly resolved when read. |  160      * then implicitly resolved when read. | 
|  171      */ |  161      */ | 
|  172     bool usesImplicitMSAAResolve() const { |  162     bool usesImplicitMSAAResolve() const { | 
|  173         return kES_IMG_MsToTexture_MSFBOType == fMSFBOType || |  163         return kES_IMG_MsToTexture_MSFBOType == fMSFBOType || | 
|  174                kES_EXT_MsToTexture_MSFBOType == fMSFBOType; |  164                kES_EXT_MsToTexture_MSFBOType == fMSFBOType; | 
|  175     } |  165     } | 
|  176  |  166  | 
|  177     FBFetchType fbFetchType() const { return fFBFetchType; } |  167     /** | 
 |  168      * Some helper functions for encapsulating various extensions to read FB Buf
     fer on openglES | 
 |  169      * | 
 |  170      * TODO On desktop opengl 4.2+ we can achieve something similar to this effe
     ct | 
 |  171      */ | 
 |  172     bool fbFetchSupport() const { return fFBFetchSupport; } | 
 |  173  | 
 |  174     const char* fbFetchColorName() const { return fFBFetchColorName; } | 
 |  175  | 
 |  176     const char* fbFetchExtensionString() const { return fFBFetchExtensionString;
      } | 
|  178  |  177  | 
|  179     InvalidateFBType invalidateFBType() const { return fInvalidateFBType; } |  178     InvalidateFBType invalidateFBType() const { return fInvalidateFBType; } | 
|  180  |  179  | 
|  181     /// What type of buffer mapping is supported? |  180     /// What type of buffer mapping is supported? | 
|  182     MapBufferType mapBufferType() const { return fMapBufferType; } |  181     MapBufferType mapBufferType() const { return fMapBufferType; } | 
|  183  |  182  | 
|  184     /** |  183     /** | 
|  185      * Gets an array of legal stencil formats. These formats are not guaranteed |  184      * Gets an array of legal stencil formats. These formats are not guaranteed | 
|  186      * to be supported by the driver but are legal GLenum names given the GL |  185      * to be supported by the driver but are legal GLenum names given the GL | 
|  187      * version and extensions supported. |  186      * version and extensions supported. | 
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  333     // used as a color attachment when a particular stencil format is used |  332     // used as a color attachment when a particular stencil format is used | 
|  334     // as a stencil attachment. |  333     // as a stencil attachment. | 
|  335     SkTArray<VerifiedColorConfigs, true> fStencilVerifiedColorConfigs; |  334     SkTArray<VerifiedColorConfigs, true> fStencilVerifiedColorConfigs; | 
|  336  |  335  | 
|  337     int fMaxFragmentUniformVectors; |  336     int fMaxFragmentUniformVectors; | 
|  338     int fMaxVertexAttributes; |  337     int fMaxVertexAttributes; | 
|  339     int fMaxFragmentTextureUnits; |  338     int fMaxFragmentTextureUnits; | 
|  340     int fMaxFixedFunctionTextureCoords; |  339     int fMaxFixedFunctionTextureCoords; | 
|  341  |  340  | 
|  342     MSFBOType           fMSFBOType; |  341     MSFBOType           fMSFBOType; | 
|  343     FBFetchType         fFBFetchType; |  | 
|  344     InvalidateFBType    fInvalidateFBType; |  342     InvalidateFBType    fInvalidateFBType; | 
|  345     MapBufferType       fMapBufferType; |  343     MapBufferType       fMapBufferType; | 
|  346     LATCAlias           fLATCAlias; |  344     LATCAlias           fLATCAlias; | 
|  347  |  345  | 
|  348     bool fRGBA8RenderbufferSupport : 1; |  346     bool fRGBA8RenderbufferSupport : 1; | 
|  349     bool fBGRAIsInternalFormat : 1; |  347     bool fBGRAIsInternalFormat : 1; | 
|  350     bool fTextureSwizzleSupport : 1; |  348     bool fTextureSwizzleSupport : 1; | 
|  351     bool fUnpackRowLengthSupport : 1; |  349     bool fUnpackRowLengthSupport : 1; | 
|  352     bool fUnpackFlipYSupport : 1; |  350     bool fUnpackFlipYSupport : 1; | 
|  353     bool fPackRowLengthSupport : 1; |  351     bool fPackRowLengthSupport : 1; | 
|  354     bool fPackFlipYSupport : 1; |  352     bool fPackFlipYSupport : 1; | 
|  355     bool fTextureUsageSupport : 1; |  353     bool fTextureUsageSupport : 1; | 
|  356     bool fTexStorageSupport : 1; |  354     bool fTexStorageSupport : 1; | 
|  357     bool fTextureRedSupport : 1; |  355     bool fTextureRedSupport : 1; | 
|  358     bool fImagingSupport  : 1; |  356     bool fImagingSupport  : 1; | 
|  359     bool fTwoFormatLimit : 1; |  357     bool fTwoFormatLimit : 1; | 
|  360     bool fFragCoordsConventionSupport : 1; |  358     bool fFragCoordsConventionSupport : 1; | 
|  361     bool fVertexArrayObjectSupport : 1; |  359     bool fVertexArrayObjectSupport : 1; | 
|  362     bool fUseNonVBOVertexAndIndexDynamicData : 1; |  360     bool fUseNonVBOVertexAndIndexDynamicData : 1; | 
|  363     bool fIsCoreProfile : 1; |  361     bool fIsCoreProfile : 1; | 
|  364     bool fFullClearIsFree : 1; |  362     bool fFullClearIsFree : 1; | 
|  365     bool fDropsTileOnZeroDivide : 1; |  363     bool fDropsTileOnZeroDivide : 1; | 
 |  364     bool fFBFetchSupport : 1; | 
 |  365  | 
 |  366     const char* fFBFetchColorName; | 
 |  367     const char* fFBFetchExtensionString; | 
|  366  |  368  | 
|  367     typedef GrDrawTargetCaps INHERITED; |  369     typedef GrDrawTargetCaps INHERITED; | 
|  368 }; |  370 }; | 
|  369  |  371  | 
|  370 #endif |  372 #endif | 
| OLD | NEW |