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

Side by Side Diff: src/gpu/gl/GrGLCaps.h

Issue 218763006: Use glInvalidateFramebuffer() when it is supported. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 8 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 | « no previous file | src/gpu/gl/GrGLCaps.cpp » ('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 * 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 kLast_MSFBOType = kES_EXT_MsToTexture_MSFBOType 68 kLast_MSFBOType = kES_EXT_MsToTexture_MSFBOType
69 }; 69 };
70 70
71 enum FBFetchType { 71 enum FBFetchType {
72 kNone_FBFetchType, 72 kNone_FBFetchType,
73 /** GL_EXT_shader_framebuffer_fetch */ 73 /** GL_EXT_shader_framebuffer_fetch */
74 kEXT_FBFetchType, 74 kEXT_FBFetchType,
75 /** GL_NV_shader_framebuffer_fetch */ 75 /** GL_NV_shader_framebuffer_fetch */
76 kNV_FBFetchType, 76 kNV_FBFetchType,
77 77
78 kLast_FBFetchType = kNV_FBFetchType, 78 kLast_FBFetchType = kNV_FBFetchType
79 };
80
81 enum InvalidateFBType {
82 kNone_InvalidateFBType,
83 kDiscard_InvalidateFBType, //<! glDiscardFramebuffer()
84 kInvalidate_InvalidateFBType, //<! glInvalidateFramebuffer()
85
86 kLast_InvalidateFBType = kInvalidate_InvalidateFBType
79 }; 87 };
80 88
81 /** 89 /**
82 * Creates a GrGLCaps that advertises no support for any extensions, 90 * Creates a GrGLCaps that advertises no support for any extensions,
83 * formats, etc. Call init to initialize from a GrGLContextInfo. 91 * formats, etc. Call init to initialize from a GrGLContextInfo.
84 */ 92 */
85 GrGLCaps(); 93 GrGLCaps();
86 94
87 GrGLCaps(const GrGLCaps& caps); 95 GrGLCaps(const GrGLCaps& caps);
88 96
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 * Is the MSAA FBO extension one where the texture is multisampled when boun d to an FBO and 160 * Is the MSAA FBO extension one where the texture is multisampled when boun d to an FBO and
153 * then implicitly resolved when read. 161 * then implicitly resolved when read.
154 */ 162 */
155 bool usesImplicitMSAAResolve() const { 163 bool usesImplicitMSAAResolve() const {
156 return kES_IMG_MsToTexture_MSFBOType == fMSFBOType || 164 return kES_IMG_MsToTexture_MSFBOType == fMSFBOType ||
157 kES_EXT_MsToTexture_MSFBOType == fMSFBOType; 165 kES_EXT_MsToTexture_MSFBOType == fMSFBOType;
158 } 166 }
159 167
160 FBFetchType fbFetchType() const { return fFBFetchType; } 168 FBFetchType fbFetchType() const { return fFBFetchType; }
161 169
170 InvalidateFBType invalidateFBType() const { return fInvalidateFBType; }
171
162 /** 172 /**
163 * Returs a string containeng the caps info. 173 * Returs a string containeng the caps info.
164 */ 174 */
165 virtual SkString dump() const SK_OVERRIDE; 175 virtual SkString dump() const SK_OVERRIDE;
166 176
167 /** 177 /**
168 * Gets an array of legal stencil formats. These formats are not guaranteed 178 * Gets an array of legal stencil formats. These formats are not guaranteed
169 * to be supported by the driver but are legal GLenum names given the GL 179 * to be supported by the driver but are legal GLenum names given the GL
170 * version and extensions supported. 180 * version and extensions supported.
171 */ 181 */
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 // tracks configs that have been verified to pass the FBO completeness when 310 // tracks configs that have been verified to pass the FBO completeness when
301 // used as a color attachment when a particular stencil format is used 311 // used as a color attachment when a particular stencil format is used
302 // as a stencil attachment. 312 // as a stencil attachment.
303 SkTArray<VerifiedColorConfigs, true> fStencilVerifiedColorConfigs; 313 SkTArray<VerifiedColorConfigs, true> fStencilVerifiedColorConfigs;
304 314
305 int fMaxFragmentUniformVectors; 315 int fMaxFragmentUniformVectors;
306 int fMaxVertexAttributes; 316 int fMaxVertexAttributes;
307 int fMaxFragmentTextureUnits; 317 int fMaxFragmentTextureUnits;
308 int fMaxFixedFunctionTextureCoords; 318 int fMaxFixedFunctionTextureCoords;
309 319
310 MSFBOType fMSFBOType; 320 MSFBOType fMSFBOType;
311 321 FBFetchType fFBFetchType;
312 FBFetchType fFBFetchType; 322 InvalidateFBType fInvalidateFBType;
313 323
314 bool fRGBA8RenderbufferSupport : 1; 324 bool fRGBA8RenderbufferSupport : 1;
315 bool fBGRAFormatSupport : 1; 325 bool fBGRAFormatSupport : 1;
316 bool fBGRAIsInternalFormat : 1; 326 bool fBGRAIsInternalFormat : 1;
317 bool fTextureSwizzleSupport : 1; 327 bool fTextureSwizzleSupport : 1;
318 bool fUnpackRowLengthSupport : 1; 328 bool fUnpackRowLengthSupport : 1;
319 bool fUnpackFlipYSupport : 1; 329 bool fUnpackFlipYSupport : 1;
320 bool fPackRowLengthSupport : 1; 330 bool fPackRowLengthSupport : 1;
321 bool fPackFlipYSupport : 1; 331 bool fPackFlipYSupport : 1;
322 bool fTextureUsageSupport : 1; 332 bool fTextureUsageSupport : 1;
323 bool fTexStorageSupport : 1; 333 bool fTexStorageSupport : 1;
324 bool fTextureRedSupport : 1; 334 bool fTextureRedSupport : 1;
325 bool fImagingSupport : 1; 335 bool fImagingSupport : 1;
326 bool fTwoFormatLimit : 1; 336 bool fTwoFormatLimit : 1;
327 bool fFragCoordsConventionSupport : 1; 337 bool fFragCoordsConventionSupport : 1;
328 bool fVertexArrayObjectSupport : 1; 338 bool fVertexArrayObjectSupport : 1;
329 bool fUseNonVBOVertexAndIndexDynamicData : 1; 339 bool fUseNonVBOVertexAndIndexDynamicData : 1;
330 bool fIsCoreProfile : 1; 340 bool fIsCoreProfile : 1;
331 bool fFixedFunctionSupport : 1; 341 bool fFixedFunctionSupport : 1;
332 bool fFullClearIsFree : 1; 342 bool fFullClearIsFree : 1;
333 bool fDropsTileOnZeroDivide : 1; 343 bool fDropsTileOnZeroDivide : 1;
334 344
335 typedef GrDrawTargetCaps INHERITED; 345 typedef GrDrawTargetCaps INHERITED;
336 }; 346 };
337 347
338 #endif 348 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/gl/GrGLCaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698