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

Unified Diff: gpu/command_buffer/service/framebuffer_completeness_cache.cc

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; return unittesting of cache behaviour. 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/framebuffer_completeness_cache.cc
diff --git a/gpu/command_buffer/service/framebuffer_completeness_cache.cc b/gpu/command_buffer/service/framebuffer_completeness_cache.cc
new file mode 100644
index 0000000000000000000000000000000000000000..183b023314f303f377088318caeb9ac787c1dd86
--- /dev/null
+++ b/gpu/command_buffer/service/framebuffer_completeness_cache.cc
@@ -0,0 +1,24 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "gpu/command_buffer/service/framebuffer_completeness_cache.h"
+
+namespace gpu {
+namespace gles2 {
+
+FramebufferCompletenessCache::FramebufferCompletenessCache() {}
+
+FramebufferCompletenessCache::~FramebufferCompletenessCache() {}
+
+bool FramebufferCompletenessCache::IsComplete(
+ const std::string& signature) const {
+ return cache_.find(signature) != cache_.end();
+}
+
+void FramebufferCompletenessCache::SetComplete(const std::string& signature) {
+ cache_.insert(signature);
+}
+
+} // namespace gles2
+} // namespace gpu

Powered by Google App Engine
This is Rietveld 408576698