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

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

Issue 98643013: Take GL version and extensions correctly into account when binding functions (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Clarify code in generate_bindings.py according to feedback Created 6 years, 11 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
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 // This include must be here so that the includes provided transitively 5 // This include must be here so that the includes provided transitively
6 // by gl_surface_egl.h don't make it impossible to compile this code. 6 // by gl_surface_egl.h don't make it impossible to compile this code.
7 #include "third_party/mesa/src/include/GL/osmesa.h" 7 #include "third_party/mesa/src/include/GL/osmesa.h"
8 8
9 #include "ui/gl/gl_surface_egl.h" 9 #include "ui/gl/gl_surface_egl.h"
10 10
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 bool GLSurfaceOSMesaHeadless::SwapBuffers() { return true; } 685 bool GLSurfaceOSMesaHeadless::SwapBuffers() { return true; }
686 686
687 GLSurfaceOSMesaHeadless::GLSurfaceOSMesaHeadless(gfx::AcceleratedWidget window) 687 GLSurfaceOSMesaHeadless::GLSurfaceOSMesaHeadless(gfx::AcceleratedWidget window)
688 : GLSurfaceOSMesa(OSMESA_BGRA, gfx::Size(1, 1)) { 688 : GLSurfaceOSMesa(OSMESA_BGRA, gfx::Size(1, 1)) {
689 DCHECK(window); 689 DCHECK(window);
690 } 690 }
691 691
692 GLSurfaceOSMesaHeadless::~GLSurfaceOSMesaHeadless() { Destroy(); } 692 GLSurfaceOSMesaHeadless::~GLSurfaceOSMesaHeadless() { Destroy(); }
693 693
694 // static 694 // static
695 bool GLSurface::InitializePreBindingsInternal(GLImplementation) {
696 return true;
697 }
698
699 // static
695 bool GLSurface::InitializeOneOffInternal() { 700 bool GLSurface::InitializeOneOffInternal() {
696 if (GetGLImplementation() == kGLImplementationOSMesaGL) { 701 if (GetGLImplementation() == kGLImplementationOSMesaGL) {
697 return true; 702 return true;
698 } 703 }
699 DCHECK(GetGLImplementation() == kGLImplementationEGLGLES2); 704 DCHECK(GetGLImplementation() == kGLImplementationEGLGLES2);
700 705
701 if (!GLSurfaceEGL::InitializeOneOff()) { 706 if (!GLSurfaceEGL::InitializeOneOff()) {
702 LOG(ERROR) << "GLSurfaceEGL::InitializeOneOff failed."; 707 LOG(ERROR) << "GLSurfaceEGL::InitializeOneOff failed.";
703 return false; 708 return false;
704 } 709 }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 } 766 }
762 default: 767 default:
763 NOTREACHED(); 768 NOTREACHED();
764 return NULL; 769 return NULL;
765 } 770 }
766 } 771 }
767 772
768 #endif 773 #endif
769 774
770 } // namespace gfx 775 } // namespace gfx
OLDNEW
« ui/gl/gl_surface.cc ('K') | « ui/gl/gl_surface.cc ('k') | ui/gl/gl_surface_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698