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

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

Issue 79603002: ResourceProvider should be able to avoid allocating immutable textures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 7 years, 1 month 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
« no previous file with comments | « cc/resources/resource_provider_unittest.cc ('k') | no next file » | 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_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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 } 199 }
200 void set_have_post_sub_buffer(bool have) { 200 void set_have_post_sub_buffer(bool have) {
201 test_capabilities_.post_sub_buffer = have; 201 test_capabilities_.post_sub_buffer = have;
202 } 202 }
203 void set_have_discard_framebuffer(bool have) { 203 void set_have_discard_framebuffer(bool have) {
204 test_capabilities_.discard_framebuffer = have; 204 test_capabilities_.discard_framebuffer = have;
205 } 205 }
206 void set_support_compressed_texture_etc1(bool support) { 206 void set_support_compressed_texture_etc1(bool support) {
207 test_capabilities_.texture_format_etc1 = support; 207 test_capabilities_.texture_format_etc1 = support;
208 } 208 }
209 void set_support_texture_storage(bool support) {
210 test_capabilities_.texture_storage = support;
211 }
209 212
210 // When this context is lost, all contexts in its share group are also lost. 213 // When this context is lost, all contexts in its share group are also lost.
211 void add_share_group_context(blink::WebGraphicsContext3D* context3d) { 214 void add_share_group_context(blink::WebGraphicsContext3D* context3d) {
212 shared_contexts_.push_back(context3d); 215 shared_contexts_.push_back(context3d);
213 } 216 }
214 217
215 void set_max_texture_size(int size) { max_texture_size_ = size; } 218 void set_max_texture_size(int size) { max_texture_size_ = size; }
216 219
217 static const blink::WebGLId kExternalTextureId; 220 static const blink::WebGLId kExternalTextureId;
218 virtual blink::WebGLId NextTextureId(); 221 virtual blink::WebGLId NextTextureId();
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 351
349 scoped_refptr<Namespace> namespace_; 352 scoped_refptr<Namespace> namespace_;
350 static Namespace* shared_namespace_; 353 static Namespace* shared_namespace_;
351 354
352 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_; 355 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_;
353 }; 356 };
354 357
355 } // namespace cc 358 } // namespace cc
356 359
357 #endif // CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ 360 #endif // CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_
OLDNEW
« no previous file with comments | « cc/resources/resource_provider_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698