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

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

Issue 192823002: [Ozone] Remove unnecessary cast to EGLNativeDisplayType (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« 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 // 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
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
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
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