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

Side by Side Diff: ui/ozone/platform/cast/surface_factory_cast.cc

Issue 2588263005: Change GLGetProcAddress typedef to function returning function pointer (Closed)
Patch Set: fix cast Created 3 years, 12 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
« ui/gl/gl_implementation.h ('K') | « ui/gl/wgl_api_unittest.cc ('k') | 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/ozone/platform/cast/surface_factory_cast.h" 5 #include "ui/ozone/platform/cast/surface_factory_cast.h"
6 6
7 #include <EGL/egl.h> 7 #include <EGL/egl.h>
8 #include <dlfcn.h> 8 #include <dlfcn.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 bool SurfaceFactoryCast::LoadEGLGLES2Bindings() { 314 bool SurfaceFactoryCast::LoadEGLGLES2Bindings() {
315 if (state_ != kInitialized) { 315 if (state_ != kInitialized) {
316 InitializeHardware(); 316 InitializeHardware();
317 if (state_ != kInitialized) { 317 if (state_ != kInitialized) {
318 return false; 318 return false;
319 } 319 }
320 } 320 }
321 321
322 void* lib_egl = egl_platform_->GetEglLibrary(); 322 void* lib_egl = egl_platform_->GetEglLibrary();
323 void* lib_gles2 = egl_platform_->GetGles2Library(); 323 void* lib_gles2 = egl_platform_->GetGles2Library();
324 gl::GLGetProcAddressProc gl_proc = egl_platform_->GetGLProcAddressProc(); 324 gl::GLGetProcAddressProc gl_proc = reinterpret_cast<gl::GLGetProcAddressProc>(
325 egl_platform_->GetGLProcAddressProc());
325 if (!lib_egl || !lib_gles2 || !gl_proc) { 326 if (!lib_egl || !lib_gles2 || !gl_proc) {
326 return false; 327 return false;
327 } 328 }
328 329
329 gl::SetGLGetProcAddressProc(gl_proc); 330 gl::SetGLGetProcAddressProc(gl_proc);
330 gl::AddGLNativeLibrary(lib_egl); 331 gl::AddGLNativeLibrary(lib_egl);
331 gl::AddGLNativeLibrary(lib_gles2); 332 gl::AddGLNativeLibrary(lib_gles2);
332 return true; 333 return true;
333 } 334 }
334 335
335 } // namespace ui 336 } // namespace ui
OLDNEW
« ui/gl/gl_implementation.h ('K') | « ui/gl/wgl_api_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698