| 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/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 } | 186 } |
| 187 | 187 |
| 188 size_t NumTextures() const; | 188 size_t NumTextures() const; |
| 189 blink::WebGLId TextureAt(int i) const; | 189 blink::WebGLId TextureAt(int i) const; |
| 190 | 190 |
| 191 size_t NumUsedTextures() const { return used_textures_.size(); } | 191 size_t NumUsedTextures() const { return used_textures_.size(); } |
| 192 bool UsedTexture(int texture) const { | 192 bool UsedTexture(int texture) const { |
| 193 return ContainsKey(used_textures_, texture); | 193 return ContainsKey(used_textures_, texture); |
| 194 } | 194 } |
| 195 void ResetUsedTextures() { used_textures_.clear(); } | 195 void ResetUsedTextures() { used_textures_.clear(); } |
| 196 unsigned AllocateTestTextureForExternalUse(); | |
| 197 | 196 |
| 198 void set_support_swapbuffers_complete_callback(bool support) { | 197 void set_support_swapbuffers_complete_callback(bool support) { |
| 199 test_capabilities_.swapbuffers_complete_callback = support; | 198 test_capabilities_.swapbuffers_complete_callback = support; |
| 200 } | 199 } |
| 201 void set_have_extension_io_surface(bool have) { | 200 void set_have_extension_io_surface(bool have) { |
| 202 test_capabilities_.iosurface = have; | 201 test_capabilities_.iosurface = have; |
| 203 test_capabilities_.texture_rectangle = have; | 202 test_capabilities_.texture_rectangle = have; |
| 204 } | 203 } |
| 205 void set_have_extension_egl_image(bool have) { | 204 void set_have_extension_egl_image(bool have) { |
| 206 test_capabilities_.egl_image_external = have; | 205 test_capabilities_.egl_image_external = have; |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 | 360 |
| 362 scoped_refptr<Namespace> namespace_; | 361 scoped_refptr<Namespace> namespace_; |
| 363 static Namespace* shared_namespace_; | 362 static Namespace* shared_namespace_; |
| 364 | 363 |
| 365 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_; | 364 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_; |
| 366 }; | 365 }; |
| 367 | 366 |
| 368 } // namespace cc | 367 } // namespace cc |
| 369 | 368 |
| 370 #endif // CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ | 369 #endif // CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ |
| OLD | NEW |