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

Side by Side Diff: cc/debug/test_web_graphics_context_3d.h

Issue 23653002: Move ScopedPtrHashMap from cc to base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: jam's comment Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « cc/cc.gyp ('k') | cc/debug/test_web_graphics_context_3d.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 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_DEBUG_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ 5 #ifndef CC_DEBUG_TEST_WEB_GRAPHICS_CONTEXT_3D_H_
6 #define CC_DEBUG_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ 6 #define CC_DEBUG_TEST_WEB_GRAPHICS_CONTEXT_3D_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/containers/hash_tables.h" 11 #include "base/containers/hash_tables.h"
12 #include "base/containers/scoped_ptr_hash_map.h"
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 "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
15 #include "base/stl_util.h" 16 #include "base/stl_util.h"
16 #include "base/synchronization/lock.h" 17 #include "base/synchronization/lock.h"
17 #include "cc/base/cc_export.h" 18 #include "cc/base/cc_export.h"
18 #include "cc/base/scoped_ptr_hash_map.h"
19 #include "cc/debug/fake_web_graphics_context_3d.h" 19 #include "cc/debug/fake_web_graphics_context_3d.h"
20 #include "third_party/khronos/GLES2/gl2.h" 20 #include "third_party/khronos/GLES2/gl2.h"
21 21
22 namespace cc { 22 namespace cc {
23 23
24 class CC_EXPORT TestWebGraphicsContext3D : public FakeWebGraphicsContext3D { 24 class CC_EXPORT TestWebGraphicsContext3D : public FakeWebGraphicsContext3D {
25 public: 25 public:
26 static scoped_ptr<TestWebGraphicsContext3D> Create(); 26 static scoped_ptr<TestWebGraphicsContext3D> Create();
27 27
28 virtual ~TestWebGraphicsContext3D(); 28 virtual ~TestWebGraphicsContext3D();
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 221
222 struct Namespace : public base::RefCountedThreadSafe<Namespace> { 222 struct Namespace : public base::RefCountedThreadSafe<Namespace> {
223 Namespace(); 223 Namespace();
224 224
225 // Protects all fields. 225 // Protects all fields.
226 base::Lock lock; 226 base::Lock lock;
227 unsigned next_buffer_id; 227 unsigned next_buffer_id;
228 unsigned next_image_id; 228 unsigned next_image_id;
229 unsigned next_texture_id; 229 unsigned next_texture_id;
230 std::vector<WebKit::WebGLId> textures; 230 std::vector<WebKit::WebGLId> textures;
231 ScopedPtrHashMap<unsigned, Buffer> buffers; 231 base::ScopedPtrHashMap<unsigned, Buffer> buffers;
232 ScopedPtrHashMap<unsigned, Image> images; 232 base::ScopedPtrHashMap<unsigned, Image> images;
233 233
234 private: 234 private:
235 friend class base::RefCountedThreadSafe<Namespace>; 235 friend class base::RefCountedThreadSafe<Namespace>;
236 ~Namespace(); 236 ~Namespace();
237 DISALLOW_COPY_AND_ASSIGN(Namespace); 237 DISALLOW_COPY_AND_ASSIGN(Namespace);
238 }; 238 };
239 239
240 TestWebGraphicsContext3D(); 240 TestWebGraphicsContext3D();
241 TestWebGraphicsContext3D( 241 TestWebGraphicsContext3D(
242 const WebKit::WebGraphicsContext3D::Attributes& attributes); 242 const WebKit::WebGraphicsContext3D::Attributes& attributes);
(...skipping 27 matching lines...) Expand all
270 270
271 scoped_refptr<Namespace> namespace_; 271 scoped_refptr<Namespace> namespace_;
272 static Namespace* shared_namespace_; 272 static Namespace* shared_namespace_;
273 273
274 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_; 274 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_;
275 }; 275 };
276 276
277 } // namespace cc 277 } // namespace cc
278 278
279 #endif // CC_DEBUG_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ 279 #endif // CC_DEBUG_TEST_WEB_GRAPHICS_CONTEXT_3D_H_
OLDNEW
« no previous file with comments | « cc/cc.gyp ('k') | cc/debug/test_web_graphics_context_3d.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698