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

Side by Side Diff: gpu/gles2_conform_support/egl/thread_state.cc

Issue 1998723002: Move code in ui/gl/* from gfx:: to gl:: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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 (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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 "gpu/gles2_conform_support/egl/thread_state.h" 5 #include "gpu/gles2_conform_support/egl/thread_state.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/environment.h" 9 #include "base/environment.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 #if defined(COMMAND_BUFFER_GLES_LIB_SUPPORT_ONLY) 50 #if defined(COMMAND_BUFFER_GLES_LIB_SUPPORT_ONLY)
51 #if defined(COMPONENT_BUILD) 51 #if defined(COMPONENT_BUILD)
52 if (!g_command_buffer_gles_has_atexit_manager) 52 if (!g_command_buffer_gles_has_atexit_manager)
53 g_exit_manager = new base::AtExitManager; 53 g_exit_manager = new base::AtExitManager;
54 #else 54 #else
55 g_exit_manager = new base::AtExitManager; 55 g_exit_manager = new base::AtExitManager;
56 #endif 56 #endif
57 #endif 57 #endif
58 gles2::Initialize(); 58 gles2::Initialize();
59 59
60 if (gfx::GetGLImplementation() == gfx::kGLImplementationNone) { 60 if (gl::GetGLImplementation() == gl::kGLImplementationNone) {
61 base::CommandLine::StringVector argv; 61 base::CommandLine::StringVector argv;
62 std::unique_ptr<base::Environment> env(base::Environment::Create()); 62 std::unique_ptr<base::Environment> env(base::Environment::Create());
63 std::string env_string; 63 std::string env_string;
64 env->GetVar("CHROME_COMMAND_BUFFER_GLES2_ARGS", &env_string); 64 env->GetVar("CHROME_COMMAND_BUFFER_GLES2_ARGS", &env_string);
65 #if defined(OS_WIN) 65 #if defined(OS_WIN)
66 argv = base::SplitString(base::UTF8ToUTF16(env_string), 66 argv = base::SplitString(base::UTF8ToUTF16(env_string),
67 base::kWhitespaceUTF16, base::TRIM_WHITESPACE, 67 base::kWhitespaceUTF16, base::TRIM_WHITESPACE,
68 base::SPLIT_WANT_NONEMPTY); 68 base::SPLIT_WANT_NONEMPTY);
69 argv.insert(argv.begin(), base::UTF8ToUTF16("dummy")); 69 argv.insert(argv.begin(), base::UTF8ToUTF16("dummy"));
70 #else 70 #else
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 Context::ApplyContextReleased(); 190 Context::ApplyContextReleased();
191 } 191 }
192 } 192 }
193 193
194 void ThreadState::AutoCurrentContextRestore::SetCurrent(Surface* surface, 194 void ThreadState::AutoCurrentContextRestore::SetCurrent(Surface* surface,
195 Context* context) { 195 Context* context) {
196 thread_state_->SetCurrent(surface, context); 196 thread_state_->SetCurrent(surface, context);
197 } 197 }
198 198
199 } // namespace egl 199 } // namespace egl
OLDNEW
« no previous file with comments | « gpu/gles2_conform_support/egl/surface.cc ('k') | gpu/ipc/client/android/in_process_surface_texture_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698