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

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

Issue 266353003: aw: Ubercomp mega patch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
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/shared_renderer_state.h" 8 #include "android_webview/browser/shared_renderer_state.h"
9 #include "content/public/browser/android/synchronous_compositor.h" 9 #include "content/public/browser/android/synchronous_compositor.h"
10 #include "gpu/command_buffer/service/shader_translator_cache.h" 10 #include "gpu/command_buffer/service/shader_translator_cache.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 // Called from different threads! 62 // Called from different threads!
63 void DeferredGpuCommandService::ScheduleTask(const base::Closure& task) { 63 void DeferredGpuCommandService::ScheduleTask(const base::Closure& task) {
64 { 64 {
65 base::AutoLock lock(tasks_lock_); 65 base::AutoLock lock(tasks_lock_);
66 tasks_.push(task); 66 tasks_.push(task);
67 } 67 }
68 if (ScopedAllowGL::IsAllowed()) { 68 if (ScopedAllowGL::IsAllowed()) {
69 RunTasks(); 69 RunTasks();
70 } else { 70 } else {
71 // TODO(boliu): Improve this to avoid PostTask storm.
71 RequestProcessGLOnUIThread(); 72 RequestProcessGLOnUIThread();
72 } 73 }
73 } 74 }
74 75
75 void DeferredGpuCommandService::ScheduleIdleWork( 76 void DeferredGpuCommandService::ScheduleIdleWork(
76 const base::Closure& callback) { 77 const base::Closure& callback) {
77 // TODO(sievers): Should this do anything? 78 // TODO(sievers): Should this do anything?
78 } 79 }
79 80
80 bool DeferredGpuCommandService::UseVirtualizedGLContexts() { return true; } 81 bool DeferredGpuCommandService::UseVirtualizedGLContexts() { return true; }
(...skipping 29 matching lines...) Expand all
110 111
111 void DeferredGpuCommandService::AddRef() const { 112 void DeferredGpuCommandService::AddRef() const {
112 base::RefCountedThreadSafe<DeferredGpuCommandService>::AddRef(); 113 base::RefCountedThreadSafe<DeferredGpuCommandService>::AddRef();
113 } 114 }
114 115
115 void DeferredGpuCommandService::Release() const { 116 void DeferredGpuCommandService::Release() const {
116 base::RefCountedThreadSafe<DeferredGpuCommandService>::Release(); 117 base::RefCountedThreadSafe<DeferredGpuCommandService>::Release();
117 } 118 }
118 119
119 } // namespace android_webview 120 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/browser_view_renderer.cc ('k') | android_webview/browser/hardware_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698