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

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

Issue 1315713007: gpu: Reduce GL context switches used to check pending queries. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 3 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 | android_webview/browser/deferred_gpu_command_service.cc » ('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 #ifndef ANDROID_WEBVIEW_BROWSER_DEFERRED_GPU_COMMAND_SERVICE_H_ 5 #ifndef ANDROID_WEBVIEW_BROWSER_DEFERRED_GPU_COMMAND_SERVICE_H_
6 #define ANDROID_WEBVIEW_BROWSER_DEFERRED_GPU_COMMAND_SERVICE_H_ 6 #define ANDROID_WEBVIEW_BROWSER_DEFERRED_GPU_COMMAND_SERVICE_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 24 matching lines...) Expand all
35 }; 35 };
36 36
37 class DeferredGpuCommandService 37 class DeferredGpuCommandService
38 : public gpu::InProcessCommandBuffer::Service, 38 : public gpu::InProcessCommandBuffer::Service,
39 public base::RefCountedThreadSafe<DeferredGpuCommandService> { 39 public base::RefCountedThreadSafe<DeferredGpuCommandService> {
40 public: 40 public:
41 static void SetInstance(); 41 static void SetInstance();
42 static DeferredGpuCommandService* GetInstance(); 42 static DeferredGpuCommandService* GetInstance();
43 43
44 void ScheduleTask(const base::Closure& task) override; 44 void ScheduleTask(const base::Closure& task) override;
45 void ScheduleIdleWork(const base::Closure& task) override; 45 void ScheduleDelayedWork(const base::Closure& task) override;
46 bool UseVirtualizedGLContexts() override; 46 bool UseVirtualizedGLContexts() override;
47 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache() 47 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache()
48 override; 48 override;
49 scoped_refptr<gpu::gles2::FramebufferCompletenessCache> 49 scoped_refptr<gpu::gles2::FramebufferCompletenessCache>
50 framebuffer_completeness_cache() override; 50 framebuffer_completeness_cache() override;
51 gpu::SyncPointManager* sync_point_manager() override; 51 gpu::SyncPointManager* sync_point_manager() override;
52 52
53 void RunTasks(); 53 void RunTasks();
54 // If |is_idle| is false, this will only run older idle tasks. 54 // If |is_idle| is false, this will only run older idle tasks.
55 void PerformIdleWork(bool is_idle); 55 void PerformIdleWork(bool is_idle);
(...skipping 23 matching lines...) Expand all
79 scoped_ptr<gpu::SyncPointManager> sync_point_manager_; 79 scoped_ptr<gpu::SyncPointManager> sync_point_manager_;
80 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_; 80 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_;
81 scoped_refptr<gpu::gles2::FramebufferCompletenessCache> 81 scoped_refptr<gpu::gles2::FramebufferCompletenessCache>
82 framebuffer_completeness_cache_; 82 framebuffer_completeness_cache_;
83 DISALLOW_COPY_AND_ASSIGN(DeferredGpuCommandService); 83 DISALLOW_COPY_AND_ASSIGN(DeferredGpuCommandService);
84 }; 84 };
85 85
86 } // namespace android_webview 86 } // namespace android_webview
87 87
88 #endif // ANDROID_WEBVIEW_BROWSER_DEFERRED_GPU_COMMAND_SERVICE_H_ 88 #endif // ANDROID_WEBVIEW_BROWSER_DEFERRED_GPU_COMMAND_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | android_webview/browser/deferred_gpu_command_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698