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

Side by Side Diff: cc/test/test_texture.h

Issue 1587283002: Switch cc to std::unordered_*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@unordered-map
Patch Set: Fix MSVC build issue Created 4 years, 10 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 | « cc/test/ordered_texture_map.h ('k') | cc/test/test_web_graphics_context_3d.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CC_TEST_TEST_TEXTURE_H_ 5 #ifndef CC_TEST_TEST_TEXTURE_H_
6 #define CC_TEST_TEST_TEXTURE_H_ 6 #define CC_TEST_TEST_TEXTURE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include "base/containers/hash_tables.h" 11 #include <unordered_map>
12
12 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
14 #include "cc/resources/resource_format.h" 15 #include "cc/resources/resource_format.h"
15 #include "third_party/khronos/GLES2/gl2.h" 16 #include "third_party/khronos/GLES2/gl2.h"
16 #include "ui/gfx/geometry/size.h" 17 #include "ui/gfx/geometry/size.h"
17 18
18 namespace cc { 19 namespace cc {
19 20
20 size_t TextureSizeBytes(const gfx::Size& size, ResourceFormat format); 21 size_t TextureSizeBytes(const gfx::Size& size, ResourceFormat format);
21 22
22 struct TestTexture : public base::RefCounted<TestTexture> { 23 struct TestTexture : public base::RefCounted<TestTexture> {
23 TestTexture(); 24 TestTexture();
24 25
25 void Reallocate(const gfx::Size& size, ResourceFormat format); 26 void Reallocate(const gfx::Size& size, ResourceFormat format);
26 bool IsValidParameter(GLenum pname); 27 bool IsValidParameter(GLenum pname);
27 28
28 gfx::Size size; 29 gfx::Size size;
29 ResourceFormat format; 30 ResourceFormat format;
30 scoped_ptr<uint8_t[]> data; 31 scoped_ptr<uint8_t[]> data;
31 32
32 typedef base::hash_map<GLenum, GLint> 33 using TextureParametersMap = std::unordered_map<GLenum, GLint>;
33 TextureParametersMap;
34 TextureParametersMap params; 34 TextureParametersMap params;
35 35
36 private: 36 private:
37 friend class base::RefCounted<TestTexture>; 37 friend class base::RefCounted<TestTexture>;
38 ~TestTexture(); 38 ~TestTexture();
39 }; 39 };
40 40
41 } // namespace cc 41 } // namespace cc
42 42
43 #endif // CC_TEST_TEST_TEXTURE_H_ 43 #endif // CC_TEST_TEST_TEXTURE_H_
OLDNEW
« no previous file with comments | « cc/test/ordered_texture_map.h ('k') | cc/test/test_web_graphics_context_3d.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698