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

Unified Diff: ui/gl/gl_bindings_autogen_gl.cc

Issue 1298523003: Add GL_CHROMIUM_screen_space_antialiasing to support alternative AA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix nit Created 5 years, 3 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 | « ui/gl/gl_bindings_autogen_gl.h ('k') | ui/gl/gl_bindings_autogen_mock.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_bindings_autogen_gl.cc
diff --git a/ui/gl/gl_bindings_autogen_gl.cc b/ui/gl/gl_bindings_autogen_gl.cc
index c2493db892feb9a76e8314a3efbb9a06bfe0e0db..2917d993b9680bd9362a4032d7fb3a1218dba030 100644
--- a/ui/gl/gl_bindings_autogen_gl.cc
+++ b/ui/gl/gl_bindings_autogen_gl.cc
@@ -26,6 +26,7 @@ DriverGL g_driver_gl;
void DriverGL::InitializeStaticBindings() {
fn.glActiveTextureFn = reinterpret_cast<glActiveTextureProc>(
GetGLProcAddress("glActiveTexture"));
+ fn.glApplyFramebufferAttachmentCMAAINTELFn = 0;
fn.glAttachShaderFn =
reinterpret_cast<glAttachShaderProc>(GetGLProcAddress("glAttachShader"));
fn.glBeginQueryFn = 0;
@@ -528,6 +529,8 @@ void DriverGL::InitializeDynamicBindings(GLContext* context) {
ext.b_GL_IMG_multisampled_render_to_texture =
extensions.find("GL_IMG_multisampled_render_to_texture ") !=
std::string::npos;
+ ext.b_GL_INTEL_framebuffer_CMAA =
+ extensions.find("GL_INTEL_framebuffer_CMAA ") != std::string::npos;
ext.b_GL_KHR_blend_equation_advanced =
extensions.find("GL_KHR_blend_equation_advanced ") != std::string::npos;
ext.b_GL_KHR_robustness =
@@ -546,6 +549,14 @@ void DriverGL::InitializeDynamicBindings(GLContext* context) {
ext.b_GL_OES_vertex_array_object =
extensions.find("GL_OES_vertex_array_object ") != std::string::npos;
+ debug_fn.glApplyFramebufferAttachmentCMAAINTELFn = 0;
+ if (ext.b_GL_INTEL_framebuffer_CMAA) {
+ fn.glApplyFramebufferAttachmentCMAAINTELFn =
+ reinterpret_cast<glApplyFramebufferAttachmentCMAAINTELProc>(
+ GetGLProcAddress("glApplyFramebufferAttachmentCMAAINTEL"));
+ DCHECK(fn.glApplyFramebufferAttachmentCMAAINTELFn);
+ }
+
debug_fn.glBeginQueryFn = 0;
if (!ver->is_es || ver->IsAtLeastGLES(3u, 0u)) {
fn.glBeginQueryFn =
@@ -2120,6 +2131,13 @@ static void GL_BINDING_CALL Debug_glActiveTexture(GLenum texture) {
g_driver_gl.debug_fn.glActiveTextureFn(texture);
}
+static void GL_BINDING_CALL Debug_glApplyFramebufferAttachmentCMAAINTEL(void) {
+ GL_SERVICE_LOG("glApplyFramebufferAttachmentCMAAINTEL"
+ << "("
+ << ")");
+ g_driver_gl.debug_fn.glApplyFramebufferAttachmentCMAAINTELFn();
+}
+
static void GL_BINDING_CALL Debug_glAttachShader(GLuint program,
GLuint shader) {
GL_SERVICE_LOG("glAttachShader"
@@ -5022,6 +5040,12 @@ void DriverGL::InitializeDebugBindings() {
debug_fn.glActiveTextureFn = fn.glActiveTextureFn;
fn.glActiveTextureFn = Debug_glActiveTexture;
}
+ if (!debug_fn.glApplyFramebufferAttachmentCMAAINTELFn) {
+ debug_fn.glApplyFramebufferAttachmentCMAAINTELFn =
+ fn.glApplyFramebufferAttachmentCMAAINTELFn;
+ fn.glApplyFramebufferAttachmentCMAAINTELFn =
+ Debug_glApplyFramebufferAttachmentCMAAINTEL;
+ }
if (!debug_fn.glAttachShaderFn) {
debug_fn.glAttachShaderFn = fn.glAttachShaderFn;
fn.glAttachShaderFn = Debug_glAttachShader;
@@ -6252,6 +6276,10 @@ void GLApiBase::glActiveTextureFn(GLenum texture) {
driver_->fn.glActiveTextureFn(texture);
}
+void GLApiBase::glApplyFramebufferAttachmentCMAAINTELFn(void) {
+ driver_->fn.glApplyFramebufferAttachmentCMAAINTELFn();
+}
+
void GLApiBase::glAttachShaderFn(GLuint program, GLuint shader) {
driver_->fn.glAttachShaderFn(program, shader);
}
@@ -7989,6 +8017,12 @@ void TraceGLApi::glActiveTextureFn(GLenum texture) {
gl_api_->glActiveTextureFn(texture);
}
+void TraceGLApi::glApplyFramebufferAttachmentCMAAINTELFn(void) {
+ TRACE_EVENT_BINARY_EFFICIENT0(
+ "gpu", "TraceGLAPI::glApplyFramebufferAttachmentCMAAINTEL")
+ gl_api_->glApplyFramebufferAttachmentCMAAINTELFn();
+}
+
void TraceGLApi::glAttachShaderFn(GLuint program, GLuint shader) {
TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glAttachShader")
gl_api_->glAttachShaderFn(program, shader);
@@ -10049,6 +10083,13 @@ void NoContextGLApi::glActiveTextureFn(GLenum texture) {
LOG(ERROR) << "Trying to call glActiveTexture() without current GL context";
}
+void NoContextGLApi::glApplyFramebufferAttachmentCMAAINTELFn(void) {
+ NOTREACHED() << "Trying to call glApplyFramebufferAttachmentCMAAINTEL() "
+ "without current GL context";
+ LOG(ERROR) << "Trying to call glApplyFramebufferAttachmentCMAAINTEL() "
+ "without current GL context";
+}
+
void NoContextGLApi::glAttachShaderFn(GLuint program, GLuint shader) {
NOTREACHED() << "Trying to call glAttachShader() without current GL context";
LOG(ERROR) << "Trying to call glAttachShader() without current GL context";
« no previous file with comments | « ui/gl/gl_bindings_autogen_gl.h ('k') | ui/gl/gl_bindings_autogen_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698