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

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

Issue 2498053004: Add InProcessContextProvider and update InProcessCommandBuffer (Closed)
Patch Set: Revert experiments and fix android_webview Created 4 years, 1 month 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 #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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 void RunTasks(); 56 void RunTasks();
57 // If |is_idle| is false, this will only run older idle tasks. 57 // If |is_idle| is false, this will only run older idle tasks.
58 void PerformIdleWork(bool is_idle); 58 void PerformIdleWork(bool is_idle);
59 // Flush the idle queue until it is empty. This is different from 59 // Flush the idle queue until it is empty. This is different from
60 // PerformIdleWork(is_idle = true), which does not run any newly scheduled 60 // PerformIdleWork(is_idle = true), which does not run any newly scheduled
61 // idle tasks during the idle run. 61 // idle tasks during the idle run.
62 void PerformAllIdleWork(); 62 void PerformAllIdleWork();
63 63
64 void AddRef() const override; 64 void AddRef() const override;
65 void Release() const override; 65 void Release() const override;
66 bool BlockThreadOnWaitSyncToken() const override;
66 67
67 protected: 68 protected:
68 ~DeferredGpuCommandService() override; 69 ~DeferredGpuCommandService() override;
69 friend class base::RefCountedThreadSafe<DeferredGpuCommandService>; 70 friend class base::RefCountedThreadSafe<DeferredGpuCommandService>;
70 71
71 private: 72 private:
72 friend class ScopedAllowGL; 73 friend class ScopedAllowGL;
73 static void RequestProcessGL(bool for_idle); 74 static void RequestProcessGL(bool for_idle);
74 75
75 DeferredGpuCommandService(); 76 DeferredGpuCommandService();
76 size_t IdleQueueSize(); 77 size_t IdleQueueSize();
77 78
78 base::Lock tasks_lock_; 79 base::Lock tasks_lock_;
79 std::queue<base::Closure> tasks_; 80 std::queue<base::Closure> tasks_;
80 std::queue<std::pair<base::Time, base::Closure> > idle_tasks_; 81 std::queue<std::pair<base::Time, base::Closure> > idle_tasks_;
81 82
82 std::unique_ptr<gpu::SyncPointManager> sync_point_manager_; 83 std::unique_ptr<gpu::SyncPointManager> sync_point_manager_;
83 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_; 84 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_;
84 scoped_refptr<gpu::gles2::FramebufferCompletenessCache> 85 scoped_refptr<gpu::gles2::FramebufferCompletenessCache>
85 framebuffer_completeness_cache_; 86 framebuffer_completeness_cache_;
86 DISALLOW_COPY_AND_ASSIGN(DeferredGpuCommandService); 87 DISALLOW_COPY_AND_ASSIGN(DeferredGpuCommandService);
87 }; 88 };
88 89
89 } // namespace android_webview 90 } // namespace android_webview
90 91
91 #endif // ANDROID_WEBVIEW_BROWSER_DEFERRED_GPU_COMMAND_SERVICE_H_ 92 #endif // ANDROID_WEBVIEW_BROWSER_DEFERRED_GPU_COMMAND_SERVICE_H_
OLDNEW
« no previous file with comments | « android_webview/browser/aw_render_thread_context_provider.cc ('k') | android_webview/browser/deferred_gpu_command_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698