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

Unified Diff: ui/gl/init/gl_initializer_win.cc

Issue 2491993002: ui/gl: Initialize the ANGLE Platform on all configurations (Closed)
Patch Set: Rebase on top of the renaming of ClearGLBindings Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gl/init/gl_initializer_ozone.cc ('k') | ui/gl/init/gl_initializer_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/init/gl_initializer_win.cc
diff --git a/ui/gl/init/gl_initializer_win.cc b/ui/gl/init/gl_initializer_win.cc
index 5b0fc28ed0760893c487d43991b26408a6ff1049..89a3586dc1cf313b4b0d9624f4d2166c8375ce3a 100644
--- a/ui/gl/init/gl_initializer_win.cc
+++ b/ui/gl/init/gl_initializer_win.cc
@@ -11,7 +11,6 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
-#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/native_library.h"
#include "base/path_service.h"
@@ -19,8 +18,6 @@
#include "base/threading/thread_restrictions.h"
#include "base/trace_event/trace_event.h"
#include "base/win/windows_version.h"
-// TODO(jmadill): Apply to all platforms eventually
-#include "ui/gl/angle_platform_impl.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_egl_api_implementation.h"
#include "ui/gl/gl_features.h"
@@ -38,12 +35,6 @@ namespace {
const wchar_t kD3DCompiler[] = L"D3DCompiler_47.dll";
-// TODO(jmadill): Apply to all platforms eventually
-base::LazyInstance<ANGLEPlatformImpl> g_angle_platform_impl =
- LAZY_INSTANCE_INITIALIZER;
-
-ANGLEPlatformShutdownFunc g_angle_platform_shutdown = nullptr;
-
bool LoadD3DXLibrary(const base::FilePath& module_path,
const base::FilePath::StringType& name) {
base::NativeLibrary library =
@@ -152,22 +143,6 @@ bool InitializeStaticEGLInternal() {
}
#endif
- if (!using_swift_shader) {
- // Init ANGLE platform here, before we call GetPlatformDisplay().
- // TODO(jmadill): Apply to all platforms eventually
- ANGLEPlatformInitializeFunc angle_platform_init =
- reinterpret_cast<ANGLEPlatformInitializeFunc>(
- base::GetFunctionPointerFromNativeLibrary(
- gles_library, "ANGLEPlatformInitialize"));
- if (angle_platform_init) {
- angle_platform_init(&g_angle_platform_impl.Get());
-
- g_angle_platform_shutdown = reinterpret_cast<ANGLEPlatformShutdownFunc>(
- base::GetFunctionPointerFromNativeLibrary(gles_library,
- "ANGLEPlatformShutdown"));
- }
- }
-
GLGetProcAddressProc get_proc_address =
reinterpret_cast<GLGetProcAddressProc>(
base::GetFunctionPointerFromNativeLibrary(egl_library,
@@ -320,11 +295,7 @@ void InitializeDebugGLBindings() {
}
void ShutdownGLPlatform() {
- // TODO(jmadill): Apply to all platforms eventually
- if (g_angle_platform_shutdown) {
- g_angle_platform_shutdown();
- }
-
+ GLSurfaceEGL::ShutdownOneOff();
ClearBindingsEGL();
ClearBindingsGL();
ClearBindingsOSMESA();
« no previous file with comments | « ui/gl/init/gl_initializer_ozone.cc ('k') | ui/gl/init/gl_initializer_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698