| 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 <stddef.h> |
| 9 #include <stdint.h> |
| 10 |
| 8 #include <vector> | 11 #include <vector> |
| 9 | 12 |
| 10 #include "base/callback.h" | 13 #include "base/callback.h" |
| 11 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
| 12 #include "base/containers/hash_tables.h" | 15 #include "base/containers/hash_tables.h" |
| 13 #include "base/containers/scoped_ptr_hash_map.h" | 16 #include "base/containers/scoped_ptr_hash_map.h" |
| 17 #include "base/macros.h" |
| 14 #include "base/memory/ref_counted.h" | 18 #include "base/memory/ref_counted.h" |
| 15 #include "base/memory/scoped_ptr.h" | 19 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/memory/weak_ptr.h" | 20 #include "base/memory/weak_ptr.h" |
| 17 #include "base/stl_util.h" | 21 #include "base/stl_util.h" |
| 18 #include "base/synchronization/lock.h" | 22 #include "base/synchronization/lock.h" |
| 19 #include "cc/output/context_provider.h" | 23 #include "cc/output/context_provider.h" |
| 20 #include "cc/test/ordered_texture_map.h" | 24 #include "cc/test/ordered_texture_map.h" |
| 21 #include "cc/test/test_texture.h" | 25 #include "cc/test/test_texture.h" |
| 22 #include "gpu/command_buffer/common/sync_token.h" | 26 #include "gpu/command_buffer/common/sync_token.h" |
| 23 #include "third_party/khronos/GLES2/gl2.h" | 27 #include "third_party/khronos/GLES2/gl2.h" |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 private: | 404 private: |
| 401 typedef base::hash_map<GLenum, GLuint> TargetTextureMap; | 405 typedef base::hash_map<GLenum, GLuint> TargetTextureMap; |
| 402 TargetTextureMap bound_textures_; | 406 TargetTextureMap bound_textures_; |
| 403 }; | 407 }; |
| 404 | 408 |
| 405 struct Buffer { | 409 struct Buffer { |
| 406 Buffer(); | 410 Buffer(); |
| 407 ~Buffer(); | 411 ~Buffer(); |
| 408 | 412 |
| 409 GLenum target; | 413 GLenum target; |
| 410 scoped_ptr<uint8[]> pixels; | 414 scoped_ptr<uint8_t[]> pixels; |
| 411 size_t size; | 415 size_t size; |
| 412 | 416 |
| 413 private: | 417 private: |
| 414 DISALLOW_COPY_AND_ASSIGN(Buffer); | 418 DISALLOW_COPY_AND_ASSIGN(Buffer); |
| 415 }; | 419 }; |
| 416 | 420 |
| 417 struct Image { | 421 struct Image { |
| 418 Image(); | 422 Image(); |
| 419 ~Image(); | 423 ~Image(); |
| 420 | 424 |
| 421 scoped_ptr<uint8[]> pixels; | 425 scoped_ptr<uint8_t[]> pixels; |
| 422 | 426 |
| 423 private: | 427 private: |
| 424 DISALLOW_COPY_AND_ASSIGN(Image); | 428 DISALLOW_COPY_AND_ASSIGN(Image); |
| 425 }; | 429 }; |
| 426 | 430 |
| 427 struct Namespace : public base::RefCountedThreadSafe<Namespace> { | 431 struct Namespace : public base::RefCountedThreadSafe<Namespace> { |
| 428 Namespace(); | 432 Namespace(); |
| 429 | 433 |
| 430 // Protects all fields. | 434 // Protects all fields. |
| 431 base::Lock lock; | 435 base::Lock lock; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 | 491 |
| 488 scoped_refptr<Namespace> namespace_; | 492 scoped_refptr<Namespace> namespace_; |
| 489 static Namespace* shared_namespace_; | 493 static Namespace* shared_namespace_; |
| 490 | 494 |
| 491 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_; | 495 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_; |
| 492 }; | 496 }; |
| 493 | 497 |
| 494 } // namespace cc | 498 } // namespace cc |
| 495 | 499 |
| 496 #endif // CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ | 500 #endif // CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ |
| OLD | NEW |