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_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" |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 } | 183 } |
184 void set_have_extension_io_surface(bool have) { | 184 void set_have_extension_io_surface(bool have) { |
185 test_capabilities_.iosurface = have; | 185 test_capabilities_.iosurface = have; |
186 } | 186 } |
187 void set_have_extension_egl_image(bool have) { | 187 void set_have_extension_egl_image(bool have) { |
188 test_capabilities_.egl_image_external = have; | 188 test_capabilities_.egl_image_external = have; |
189 } | 189 } |
190 void set_have_post_sub_buffer(bool have) { | 190 void set_have_post_sub_buffer(bool have) { |
191 test_capabilities_.post_sub_buffer = have; | 191 test_capabilities_.post_sub_buffer = have; |
192 } | 192 } |
| 193 void set_have_discard_framebuffer(bool have) { |
| 194 test_capabilities_.discard_framebuffer = have; |
| 195 } |
193 | 196 |
194 // When this context is lost, all contexts in its share group are also lost. | 197 // When this context is lost, all contexts in its share group are also lost. |
195 void add_share_group_context(WebKit::WebGraphicsContext3D* context3d) { | 198 void add_share_group_context(WebKit::WebGraphicsContext3D* context3d) { |
196 shared_contexts_.push_back(context3d); | 199 shared_contexts_.push_back(context3d); |
197 } | 200 } |
198 | 201 |
199 void set_max_texture_size(int size) { max_texture_size_ = size; } | 202 void set_max_texture_size(int size) { max_texture_size_ = size; } |
200 | 203 |
201 static const WebKit::WebGLId kExternalTextureId; | 204 static const WebKit::WebGLId kExternalTextureId; |
202 virtual WebKit::WebGLId NextTextureId(); | 205 virtual WebKit::WebGLId NextTextureId(); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 | 283 |
281 scoped_refptr<Namespace> namespace_; | 284 scoped_refptr<Namespace> namespace_; |
282 static Namespace* shared_namespace_; | 285 static Namespace* shared_namespace_; |
283 | 286 |
284 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_; | 287 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_; |
285 }; | 288 }; |
286 | 289 |
287 } // namespace cc | 290 } // namespace cc |
288 | 291 |
289 #endif // CC_DEBUG_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ | 292 #endif // CC_DEBUG_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ |
OLD | NEW |