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

Side by Side Diff: ui/gl/gl_gl_api_implementation.cc

Issue 2227603003: Fix BGRA for ES3 RenderbufferStorageMultisample (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change accidental "=" to "==" Created 4 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/gl/gl_gl_api_implementation.h" 5 #include "ui/gl/gl_gl_api_implementation.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 // GL_CHROMIUM_renderbuffer_format_BGRA8888 support is added to ANGLE then the 267 // GL_CHROMIUM_renderbuffer_format_BGRA8888 support is added to ANGLE then the
268 // ANGLE version should also be customized. 268 // ANGLE version should also be customized.
269 static void GL_BINDING_CALL CustomRenderbufferStorageMultisampleEXT( 269 static void GL_BINDING_CALL CustomRenderbufferStorageMultisampleEXT(
270 GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, 270 GLenum target, GLsizei samples, GLenum internalformat, GLsizei width,
271 GLsizei height) { 271 GLsizei height) {
272 GLenum gl_internal_format = GetInternalFormat(internalformat); 272 GLenum gl_internal_format = GetInternalFormat(internalformat);
273 g_driver_gl.orig_fn.glRenderbufferStorageMultisampleEXTFn( 273 g_driver_gl.orig_fn.glRenderbufferStorageMultisampleEXTFn(
274 target, samples, gl_internal_format, width, height); 274 target, samples, gl_internal_format, width, height);
275 } 275 }
276 276
277 static void GL_BINDING_CALL
278 CustomRenderbufferStorageMultisample(GLenum target,
279 GLsizei samples,
280 GLenum internalformat,
281 GLsizei width,
282 GLsizei height) {
283 GLenum gl_internal_format = GetInternalFormat(internalformat);
284 g_driver_gl.orig_fn.glRenderbufferStorageMultisampleFn(
285 target, samples, gl_internal_format, width, height);
286 }
287
277 } // anonymous namespace 288 } // anonymous namespace
278 289
279 void DriverGL::InitializeCustomDynamicBindings(GLContext* context) { 290 void DriverGL::InitializeCustomDynamicBindings(GLContext* context) {
280 InitializeDynamicBindings(context); 291 InitializeDynamicBindings(context);
281 292
282 DCHECK(orig_fn.glTexImage2DFn == NULL); 293 DCHECK(orig_fn.glTexImage2DFn == NULL);
283 orig_fn.glTexImage2DFn = fn.glTexImage2DFn; 294 orig_fn.glTexImage2DFn = fn.glTexImage2DFn;
284 fn.glTexImage2DFn = 295 fn.glTexImage2DFn =
285 reinterpret_cast<glTexImage2DProc>(CustomTexImage2D); 296 reinterpret_cast<glTexImage2DProc>(CustomTexImage2D);
286 297
(...skipping 12 matching lines...) Expand all
299 fn.glRenderbufferStorageEXTFn = 310 fn.glRenderbufferStorageEXTFn =
300 reinterpret_cast<glRenderbufferStorageEXTProc>( 311 reinterpret_cast<glRenderbufferStorageEXTProc>(
301 CustomRenderbufferStorageEXT); 312 CustomRenderbufferStorageEXT);
302 313
303 DCHECK(orig_fn.glRenderbufferStorageMultisampleEXTFn == NULL); 314 DCHECK(orig_fn.glRenderbufferStorageMultisampleEXTFn == NULL);
304 orig_fn.glRenderbufferStorageMultisampleEXTFn = 315 orig_fn.glRenderbufferStorageMultisampleEXTFn =
305 fn.glRenderbufferStorageMultisampleEXTFn; 316 fn.glRenderbufferStorageMultisampleEXTFn;
306 fn.glRenderbufferStorageMultisampleEXTFn = 317 fn.glRenderbufferStorageMultisampleEXTFn =
307 reinterpret_cast<glRenderbufferStorageMultisampleEXTProc>( 318 reinterpret_cast<glRenderbufferStorageMultisampleEXTProc>(
308 CustomRenderbufferStorageMultisampleEXT); 319 CustomRenderbufferStorageMultisampleEXT);
320
321 DCHECK(orig_fn.glRenderbufferStorageMultisampleFn == NULL);
322 orig_fn.glRenderbufferStorageMultisampleFn =
323 fn.glRenderbufferStorageMultisampleFn;
324 fn.glRenderbufferStorageMultisampleFn =
325 reinterpret_cast<glRenderbufferStorageMultisampleProc>(
326 CustomRenderbufferStorageMultisample);
309 } 327 }
310 328
311 static void GL_BINDING_CALL NullDrawClearFn(GLbitfield mask) { 329 static void GL_BINDING_CALL NullDrawClearFn(GLbitfield mask) {
312 if (!g_driver_gl.null_draw_bindings_enabled) 330 if (!g_driver_gl.null_draw_bindings_enabled)
313 g_driver_gl.orig_fn.glClearFn(mask); 331 g_driver_gl.orig_fn.glClearFn(mask);
314 } 332 }
315 333
316 static void GL_BINDING_CALL 334 static void GL_BINDING_CALL
317 NullDrawDrawArraysFn(GLenum mode, GLint first, GLsizei count) { 335 NullDrawDrawArraysFn(GLenum mode, GLint first, GLsizei count) {
318 if (!g_driver_gl.null_draw_bindings_enabled) 336 if (!g_driver_gl.null_draw_bindings_enabled)
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 TraceGLApi::~TraceGLApi() { 586 TraceGLApi::~TraceGLApi() {
569 } 587 }
570 588
571 NoContextGLApi::NoContextGLApi() { 589 NoContextGLApi::NoContextGLApi() {
572 } 590 }
573 591
574 NoContextGLApi::~NoContextGLApi() { 592 NoContextGLApi::~NoContextGLApi() {
575 } 593 }
576 594
577 } // namespace gl 595 } // namespace gl
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698