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

Side by Side Diff: android_webview/browser/deferred_gpu_command_service.cc

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "android_webview/browser/deferred_gpu_command_service.h" 5 #include "android_webview/browser/deferred_gpu_command_service.h"
6 6
7 #include "android_webview/browser/gl_view_renderer_manager.h" 7 #include "android_webview/browser/gl_view_renderer_manager.h"
8 #include "android_webview/browser/render_thread_manager.h" 8 #include "android_webview/browser/render_thread_manager.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
11 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
12 #include "base/synchronization/lock.h" 12 #include "base/synchronization/lock.h"
13 #include "base/trace_event/trace_event.h" 13 #include "base/trace_event/trace_event.h"
14 #include "content/public/browser/gpu_utils.h" 14 #include "content/public/browser/gpu_utils.h"
15 #include "content/public/common/content_switches.h" 15 #include "content/public/common/content_switches.h"
16 #include "gpu/command_buffer/service/framebuffer_completeness_cache.h" 16 #include "gpu/command_buffer/service/framebuffer_completeness_cache.h"
17 #include "gpu/command_buffer/service/gpu_preferences.h" 17 #include "gpu/command_buffer/service/gpu_preferences.h"
18 #include "gpu/command_buffer/service/gpu_switches.h" 18 #include "gpu/command_buffer/service/gpu_switches.h"
19 #include "gpu/command_buffer/service/shader_translator_cache.h" 19 #include "gpu/command_buffer/service/shader_translator_cache.h"
20 #include "gpu/command_buffer/service/sync_point_manager.h" 20 #include "gpu/command_buffer/service/sync_point_manager.h"
21 #include "gpu/config/gpu_switches.h" 21 #include "gpu/config/gpu_switches.h"
22 #include "ui/gl/gl_switches.h" 22 #include "ui/gl/gl_switches.h"
23 23
24 namespace android_webview { 24 namespace android_webview {
25 25
26 namespace { 26 namespace {
27 base::LazyInstance<scoped_refptr<DeferredGpuCommandService> > 27 base::LazyInstance<scoped_refptr<DeferredGpuCommandService>>::DestructorAtExit
28 g_service = LAZY_INSTANCE_INITIALIZER; 28 g_service = LAZY_INSTANCE_INITIALIZER;
29 29
30 } // namespace 30 } // namespace
31 31
32 base::LazyInstance<base::ThreadLocalBoolean> ScopedAllowGL::allow_gl; 32 base::LazyInstance<base::ThreadLocalBoolean>::DestructorAtExit
33 ScopedAllowGL::allow_gl;
33 34
34 // static 35 // static
35 bool ScopedAllowGL::IsAllowed() { 36 bool ScopedAllowGL::IsAllowed() {
36 return allow_gl.Get().Get(); 37 return allow_gl.Get().Get();
37 } 38 }
38 39
39 ScopedAllowGL::ScopedAllowGL() { 40 ScopedAllowGL::ScopedAllowGL() {
40 DCHECK(!allow_gl.Get().Get()); 41 DCHECK(!allow_gl.Get().Get());
41 allow_gl.Get().Set(true); 42 allow_gl.Get().Set(true);
42 43
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 207
207 void DeferredGpuCommandService::Release() const { 208 void DeferredGpuCommandService::Release() const {
208 base::RefCountedThreadSafe<DeferredGpuCommandService>::Release(); 209 base::RefCountedThreadSafe<DeferredGpuCommandService>::Release();
209 } 210 }
210 211
211 bool DeferredGpuCommandService::BlockThreadOnWaitSyncToken() const { 212 bool DeferredGpuCommandService::BlockThreadOnWaitSyncToken() const {
212 return true; 213 return true;
213 } 214 }
214 215
215 } // namespace android_webview 216 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/deferred_gpu_command_service.h ('k') | android_webview/browser/gl_view_renderer_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698