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

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

Issue 2700713004: gpu: Only init ANGLE Platform on ANGLE. (Closed)
Patch Set: Created 3 years, 10 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_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
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
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
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