| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 g_native_display = EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE; | 135 g_native_display = EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE; |
| 136 } | 136 } |
| 137 #elif defined(USE_OZONE) | 137 #elif defined(USE_OZONE) |
| 138 gfx::SurfaceFactoryOzone* surface_factory = | 138 gfx::SurfaceFactoryOzone* surface_factory = |
| 139 gfx::SurfaceFactoryOzone::GetInstance(); | 139 gfx::SurfaceFactoryOzone::GetInstance(); |
| 140 if (surface_factory->InitializeHardware() != | 140 if (surface_factory->InitializeHardware() != |
| 141 gfx::SurfaceFactoryOzone::INITIALIZED) { | 141 gfx::SurfaceFactoryOzone::INITIALIZED) { |
| 142 LOG(ERROR) << "OZONE failed to initialize hardware"; | 142 LOG(ERROR) << "OZONE failed to initialize hardware"; |
| 143 return false; | 143 return false; |
| 144 } | 144 } |
| 145 g_native_display = reinterpret_cast<EGLNativeDisplayType>( | 145 g_native_display = surface_factory->GetNativeDisplay(); |
| 146 surface_factory->GetNativeDisplay()); | |
| 147 #else | 146 #else |
| 148 g_native_display = EGL_DEFAULT_DISPLAY; | 147 g_native_display = EGL_DEFAULT_DISPLAY; |
| 149 #endif | 148 #endif |
| 150 g_display = eglGetDisplay(g_native_display); | 149 g_display = eglGetDisplay(g_native_display); |
| 151 if (!g_display) { | 150 if (!g_display) { |
| 152 LOG(ERROR) << "eglGetDisplay failed with error " << GetLastEGLErrorString(); | 151 LOG(ERROR) << "eglGetDisplay failed with error " << GetLastEGLErrorString(); |
| 153 return false; | 152 return false; |
| 154 } | 153 } |
| 155 | 154 |
| 156 if (!eglInitialize(g_display, NULL, NULL)) { | 155 if (!eglInitialize(g_display, NULL, NULL)) { |
| (...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 867 } | 866 } |
| 868 default: | 867 default: |
| 869 NOTREACHED(); | 868 NOTREACHED(); |
| 870 return NULL; | 869 return NULL; |
| 871 } | 870 } |
| 872 } | 871 } |
| 873 | 872 |
| 874 #endif | 873 #endif |
| 875 | 874 |
| 876 } // namespace gfx | 875 } // namespace gfx |
| OLD | NEW |