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

Unified Diff: src/gpu/gl/GrGLCaps.h

Issue 14091008: Add support for GL_EXT_multisampled_render_to_texture. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/gpu/gl/GrGLCaps.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLCaps.h
===================================================================
--- src/gpu/gl/GrGLCaps.h (revision 8935)
+++ src/gpu/gl/GrGLCaps.h (working copy)
@@ -56,19 +56,27 @@
/**
* GL3.0-style MSAA FBO (GL_ARB_framebuffer_object)
*/
- kDesktopARB_MSFBOType,
+ kDesktop_ARB_MSFBOType,
/**
* earlier GL_EXT_framebuffer* extensions
*/
- kDesktopEXT_MSFBOType,
+ kDesktop_EXT_MSFBOType,
/**
* GL_APPLE_framebuffer_multisample ES extension
*/
- kAppleES_MSFBOType,
+ kES_Apple_MSFBOType,
/**
- * GL_IMG_multisampled_render_to_texture
+ * GL_IMG_multisampled_render_to_texture. This variation does not have MSAA renderbuffers.
+ * Instead the texture is multisampled when bound to the FBO and then resolved automatically
+ * when read. It also defines an alternate value for GL_MAX_SAMPLES (which we call
+ * GR_GL_MAX_SAMPLES_IMG).
*/
- kImaginationES_MSFBOType,
+ kES_IMG_MsToTexture_MSFBOType,
+ /**
+ * GL_EXT_multisampled_render_to_texture. Same as the IMG one above but uses the standard
+ * GL_MAX_SAMPLES value.
+ */
+ kES_EXT_MsToTexture_MSFBOType,
};
enum CoverageAAType {
@@ -145,6 +153,24 @@
MSFBOType msFBOType() const { return fMSFBOType; }
/**
+ * Does the supported MSAA FBO extension have MSAA renderbuffers?
+ */
+ bool usesMSAARenderBuffers() const {
+ return kNone_MSFBOType != fMSFBOType &&
+ kES_IMG_MsToTexture_MSFBOType != fMSFBOType &&
+ kES_EXT_MsToTexture_MSFBOType != fMSFBOType;
+ }
+
+ /**
+ * Is the MSAA FBO extension one where the texture is multisampled when bound to an FBO and
+ * then implicitly resolved when read.
+ */
+ bool usesImplicitMSAAResolve() const {
+ return kES_IMG_MsToTexture_MSFBOType == fMSFBOType ||
+ kES_EXT_MsToTexture_MSFBOType == fMSFBOType;
+ }
+
+ /**
* Reports the type of coverage sample AA support.
*/
CoverageAAType coverageAAType() const { return fCoverageAAType; }
« 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