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

Side by Side Diff: gpu/command_buffer/service/framebuffer_completeness_cache.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
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_COMPLETENESS_CACHE_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_COMPLETENESS_CACHE_H_
7
8 #include "base/containers/hash_tables.h"
9 #include "base/memory/ref_counted.h"
10 #include "gpu/gpu_export.h"
11
12 namespace gpu {
13 namespace gles2 {
14
15 // Refcounted wrapper for a hash_set of framebuffer format signatures
16 // representing framebuffer configurations that are reported by the GL
17 // driver as complete according to glCheckFramebufferStatusEXT.
18 class GPU_EXPORT FramebufferCompletenessCache
19 : public base::RefCounted<FramebufferCompletenessCache> {
20 public:
21 FramebufferCompletenessCache();
22
23 bool IsComplete(const std::string& signature) const;
24 void SetComplete(const std::string& signature);
25
26 protected:
27 virtual ~FramebufferCompletenessCache();
28
29 private:
30 friend class base::RefCounted<FramebufferCompletenessCache>;
31
32 typedef base::hash_set<std::string> Map;
33
34 Map cache_;
35
36 DISALLOW_COPY_AND_ASSIGN(FramebufferCompletenessCache);
37 };
38
39 } // namespace gles2
40 } // namespace gpu
41
42 #endif // GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_COMPLETENESS_CACHE_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/context_group_unittest.cc ('k') | gpu/command_buffer/service/framebuffer_completeness_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698