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

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

Issue 1278333003: Fix crash caused by concurrent access to framebuffer_combo_complete_map_. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 5 years, 4 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 28 matching lines...) Expand all
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 ScheduleIdleWork(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>
50 framebuffer_completeness_cache() override;
49 gpu::SyncPointManager* sync_point_manager() override; 51 gpu::SyncPointManager* sync_point_manager() override;
50 52
51 void RunTasks(); 53 void RunTasks();
52 // 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.
53 void PerformIdleWork(bool is_idle); 55 void PerformIdleWork(bool is_idle);
54 // Flush the idle queue until it is empty. This is different from 56 // Flush the idle queue until it is empty. This is different from
55 // PerformIdleWork(is_idle = true), which does not run any newly scheduled 57 // PerformIdleWork(is_idle = true), which does not run any newly scheduled
56 // idle tasks during the idle run. 58 // idle tasks during the idle run.
57 void PerformAllIdleWork(); 59 void PerformAllIdleWork();
58 60
(...skipping 10 matching lines...) Expand all
69 71
70 DeferredGpuCommandService(); 72 DeferredGpuCommandService();
71 size_t IdleQueueSize(); 73 size_t IdleQueueSize();
72 74
73 base::Lock tasks_lock_; 75 base::Lock tasks_lock_;
74 std::queue<base::Closure> tasks_; 76 std::queue<base::Closure> tasks_;
75 std::queue<std::pair<base::Time, base::Closure> > idle_tasks_; 77 std::queue<std::pair<base::Time, base::Closure> > idle_tasks_;
76 78
77 scoped_ptr<gpu::SyncPointManager> sync_point_manager_; 79 scoped_ptr<gpu::SyncPointManager> sync_point_manager_;
78 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_; 80 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_;
81 scoped_refptr<gpu::gles2::FramebufferCompletenessCache>
82 framebuffer_completeness_cache_;
79 DISALLOW_COPY_AND_ASSIGN(DeferredGpuCommandService); 83 DISALLOW_COPY_AND_ASSIGN(DeferredGpuCommandService);
80 }; 84 };
81 85
82 } // namespace android_webview 86 } // namespace android_webview
83 87
84 #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