OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |