OLD | NEW |
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_WEB_GRAPHICS_CONTEXT_3D_H_ | 5 #ifndef CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ |
6 #define CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ | 6 #define CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 | 418 |
419 struct Namespace : public base::RefCountedThreadSafe<Namespace> { | 419 struct Namespace : public base::RefCountedThreadSafe<Namespace> { |
420 Namespace(); | 420 Namespace(); |
421 | 421 |
422 // Protects all fields. | 422 // Protects all fields. |
423 base::Lock lock; | 423 base::Lock lock; |
424 unsigned next_buffer_id; | 424 unsigned next_buffer_id; |
425 unsigned next_image_id; | 425 unsigned next_image_id; |
426 unsigned next_texture_id; | 426 unsigned next_texture_id; |
427 unsigned next_renderbuffer_id; | 427 unsigned next_renderbuffer_id; |
428 base::ScopedPtrHashMap<unsigned, Buffer> buffers; | 428 base::ScopedPtrHashMap<unsigned, scoped_ptr<Buffer>> buffers; |
429 base::hash_set<unsigned> images; | 429 base::hash_set<unsigned> images; |
430 OrderedTextureMap textures; | 430 OrderedTextureMap textures; |
431 base::hash_set<unsigned> renderbuffer_set; | 431 base::hash_set<unsigned> renderbuffer_set; |
432 | 432 |
433 private: | 433 private: |
434 friend class base::RefCountedThreadSafe<Namespace>; | 434 friend class base::RefCountedThreadSafe<Namespace>; |
435 ~Namespace(); | 435 ~Namespace(); |
436 DISALLOW_COPY_AND_ASSIGN(Namespace); | 436 DISALLOW_COPY_AND_ASSIGN(Namespace); |
437 }; | 437 }; |
438 | 438 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 | 479 |
480 scoped_refptr<Namespace> namespace_; | 480 scoped_refptr<Namespace> namespace_; |
481 static Namespace* shared_namespace_; | 481 static Namespace* shared_namespace_; |
482 | 482 |
483 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_; | 483 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_; |
484 }; | 484 }; |
485 | 485 |
486 } // namespace cc | 486 } // namespace cc |
487 | 487 |
488 #endif // CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ | 488 #endif // CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ |
OLD | NEW |