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

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

Issue 2253173002: Remove callbacks for SurfaceFactoryOzone::LoadEGLGLES2Bindings(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 private: 301 private:
302 ~CastPixmap() override {} 302 ~CastPixmap() override {}
303 303
304 SurfaceFactoryCast* parent_; 304 SurfaceFactoryCast* parent_;
305 305
306 DISALLOW_COPY_AND_ASSIGN(CastPixmap); 306 DISALLOW_COPY_AND_ASSIGN(CastPixmap);
307 }; 307 };
308 return make_scoped_refptr(new CastPixmap(this)); 308 return make_scoped_refptr(new CastPixmap(this));
309 } 309 }
310 310
311 bool SurfaceFactoryCast::LoadEGLGLES2Bindings( 311 bool SurfaceFactoryCast::LoadEGLGLES2Bindings() {
312 AddGLLibraryCallback add_gl_library,
313 SetGLGetProcAddressProcCallback set_gl_get_proc_address) {
314 if (state_ != kInitialized) { 312 if (state_ != kInitialized) {
315 InitializeHardware(); 313 InitializeHardware();
316 if (state_ != kInitialized) { 314 if (state_ != kInitialized) {
317 return false; 315 return false;
318 } 316 }
319 } 317 }
320 318
321 void* lib_egl = egl_platform_->GetEglLibrary(); 319 void* lib_egl = egl_platform_->GetEglLibrary();
322 void* lib_gles2 = egl_platform_->GetGles2Library(); 320 void* lib_gles2 = egl_platform_->GetGles2Library();
323 GLGetProcAddressProc gl_proc = egl_platform_->GetGLProcAddressProc(); 321 gl::GLGetProcAddressProc gl_proc = egl_platform_->GetGLProcAddressProc();
324 if (!lib_egl || !lib_gles2 || !gl_proc) { 322 if (!lib_egl || !lib_gles2 || !gl_proc) {
325 return false; 323 return false;
326 } 324 }
327 325
328 set_gl_get_proc_address.Run(gl_proc); 326 gl::SetGLGetProcAddressProc(gl_proc);
329 add_gl_library.Run(lib_egl); 327 gl::AddGLNativeLibrary(lib_egl);
330 add_gl_library.Run(lib_gles2); 328 gl::AddGLNativeLibrary(lib_gles2);
331 return true; 329 return true;
332 } 330 }
333 331
334 } // namespace ui 332 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/cast/surface_factory_cast.h ('k') | ui/ozone/platform/drm/gpu/gbm_surface_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698