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

Unified Diff: cc/test/ordered_texture_map.h

Issue 1531403002: Revert "Delete CC." (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « cc/test/ordered_simple_task_runner_unittest.cc ('k') | cc/test/ordered_texture_map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/ordered_texture_map.h
diff --git a/cc/test/ordered_texture_map.h b/cc/test/ordered_texture_map.h
new file mode 100644
index 0000000000000000000000000000000000000000..2aa311184a3a7c96c7f6b2ff4c455d392238b24d
--- /dev/null
+++ b/cc/test/ordered_texture_map.h
@@ -0,0 +1,44 @@
+// Copyright 2013 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.
+
+#ifndef CC_TEST_ORDERED_TEXTURE_MAP_H_
+#define CC_TEST_ORDERED_TEXTURE_MAP_H_
+
+#include <vector>
+
+#include "base/containers/hash_tables.h"
+#include "base/memory/ref_counted.h"
+#include "third_party/khronos/GLES2/gl2.h"
+
+namespace cc {
+
+struct TestTexture;
+
+class OrderedTextureMap {
+ public:
+ OrderedTextureMap();
+ ~OrderedTextureMap();
+
+ void Append(GLuint id, scoped_refptr<TestTexture> texture);
+ void Replace(GLuint id, scoped_refptr<TestTexture> texture);
+ void Remove(GLuint id);
+
+ size_t Size();
+
+ bool ContainsId(GLuint id);
+
+ scoped_refptr<TestTexture> TextureForId(GLuint id);
+ GLuint IdAt(size_t index);
+
+ private:
+ typedef base::hash_map<GLuint, scoped_refptr<TestTexture>> TextureMap;
+ typedef std::vector<GLuint> TextureList;
+
+ TextureMap textures_;
+ TextureList ordered_textures_;
+};
+
+} // namespace cc
+
+#endif // CC_TEST_ORDERED_TEXTURE_MAP_H_
« no previous file with comments | « cc/test/ordered_simple_task_runner_unittest.cc ('k') | cc/test/ordered_texture_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698