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

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

Issue 2722883002: gpu: Allow waiting on sync tokens without sync token client. (Closed)
Patch Set: review 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
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 // static 65 // static
66 DeferredGpuCommandService* DeferredGpuCommandService::GetInstance() { 66 DeferredGpuCommandService* DeferredGpuCommandService::GetInstance() {
67 DCHECK(g_service.Get().get()); 67 DCHECK(g_service.Get().get());
68 return g_service.Get().get(); 68 return g_service.Get().get();
69 } 69 }
70 70
71 DeferredGpuCommandService::DeferredGpuCommandService() 71 DeferredGpuCommandService::DeferredGpuCommandService()
72 : gpu::InProcessCommandBuffer::Service( 72 : gpu::InProcessCommandBuffer::Service(
73 content::GetGpuPreferencesFromCommandLine()), 73 content::GetGpuPreferencesFromCommandLine()),
74 sync_point_manager_(new gpu::SyncPointManager(true)) { 74 sync_point_manager_(new gpu::SyncPointManager()) {}
75 }
76 75
77 DeferredGpuCommandService::~DeferredGpuCommandService() { 76 DeferredGpuCommandService::~DeferredGpuCommandService() {
78 base::AutoLock lock(tasks_lock_); 77 base::AutoLock lock(tasks_lock_);
79 DCHECK(tasks_.empty()); 78 DCHECK(tasks_.empty());
80 } 79 }
81 80
82 // This method can be called on any thread. 81 // This method can be called on any thread.
83 // static 82 // static
84 void DeferredGpuCommandService::RequestProcessGL(bool for_idle) { 83 void DeferredGpuCommandService::RequestProcessGL(bool for_idle) {
85 RenderThreadManager* renderer_state = 84 RenderThreadManager* renderer_state =
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 206
208 void DeferredGpuCommandService::Release() const { 207 void DeferredGpuCommandService::Release() const {
209 base::RefCountedThreadSafe<DeferredGpuCommandService>::Release(); 208 base::RefCountedThreadSafe<DeferredGpuCommandService>::Release();
210 } 209 }
211 210
212 bool DeferredGpuCommandService::BlockThreadOnWaitSyncToken() const { 211 bool DeferredGpuCommandService::BlockThreadOnWaitSyncToken() const {
213 return true; 212 return true;
214 } 213 }
215 214
216 } // namespace android_webview 215 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698