| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |