| 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 #include "ui/gl/gl_surface_egl.h" | 5 #include "ui/gl/gl_surface_egl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 for (size_t disp_index = 0; disp_index < init_displays.size(); ++disp_index) { | 647 for (size_t disp_index = 0; disp_index < init_displays.size(); ++disp_index) { |
| 648 DisplayType display_type = init_displays[disp_index]; | 648 DisplayType display_type = init_displays[disp_index]; |
| 649 EGLDisplay display = | 649 EGLDisplay display = |
| 650 GetDisplayFromType(display_type, g_native_display); | 650 GetDisplayFromType(display_type, g_native_display); |
| 651 if (display == EGL_NO_DISPLAY) { | 651 if (display == EGL_NO_DISPLAY) { |
| 652 LOG(ERROR) << "EGL display query failed with error " | 652 LOG(ERROR) << "EGL display query failed with error " |
| 653 << GetLastEGLErrorString(); | 653 << GetLastEGLErrorString(); |
| 654 } | 654 } |
| 655 | 655 |
| 656 // Init ANGLE platform now that we have the global display. | 656 // Init ANGLE platform now that we have the global display. |
| 657 if (!InitializeANGLEPlatform(display)) { | 657 if (supports_angle_d3d || supports_angle_opengl || supports_angle_null) { |
| 658 LOG(ERROR) << "ANGLE Platform initialization failed."; | 658 if (!InitializeANGLEPlatform(display)) { |
| 659 LOG(ERROR) << "ANGLE Platform initialization failed."; |
| 660 } |
| 659 } | 661 } |
| 660 | 662 |
| 661 if (!eglInitialize(display, nullptr, nullptr)) { | 663 if (!eglInitialize(display, nullptr, nullptr)) { |
| 662 bool is_last = disp_index == init_displays.size() - 1; | 664 bool is_last = disp_index == init_displays.size() - 1; |
| 663 | 665 |
| 664 LOG(ERROR) << "eglInitialize " << DisplayTypeString(display_type) | 666 LOG(ERROR) << "eglInitialize " << DisplayTypeString(display_type) |
| 665 << " failed with error " << GetLastEGLErrorString() | 667 << " failed with error " << GetLastEGLErrorString() |
| 666 << (is_last ? "" : ", trying next display type"); | 668 << (is_last ? "" : ", trying next display type"); |
| 667 } else { | 669 } else { |
| 668 UMA_HISTOGRAM_ENUMERATION("GPU.EGLDisplayType", display_type, | 670 UMA_HISTOGRAM_ENUMERATION("GPU.EGLDisplayType", display_type, |
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1216 } | 1218 } |
| 1217 | 1219 |
| 1218 void* SurfacelessEGL::GetShareHandle() { | 1220 void* SurfacelessEGL::GetShareHandle() { |
| 1219 return NULL; | 1221 return NULL; |
| 1220 } | 1222 } |
| 1221 | 1223 |
| 1222 SurfacelessEGL::~SurfacelessEGL() { | 1224 SurfacelessEGL::~SurfacelessEGL() { |
| 1223 } | 1225 } |
| 1224 | 1226 |
| 1225 } // namespace gl | 1227 } // namespace gl |
| OLD | NEW |