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

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

Issue 49163004: cc: Reduce command buffer flushes related to creating texture ids. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add LayerTreeSettings::texture_id_allocation_chunk_size 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 | Annotate | Revision Log
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_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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 214
215 // When this context is lost, all contexts in its share group are also lost. 215 // When this context is lost, all contexts in its share group are also lost.
216 void add_share_group_context(WebKit::WebGraphicsContext3D* context3d) { 216 void add_share_group_context(WebKit::WebGraphicsContext3D* context3d) {
217 shared_contexts_.push_back(context3d); 217 shared_contexts_.push_back(context3d);
218 } 218 }
219 219
220 void set_max_texture_size(int size) { max_texture_size_ = size; } 220 void set_max_texture_size(int size) { max_texture_size_ = size; }
221 221
222 static const WebKit::WebGLId kExternalTextureId; 222 static const WebKit::WebGLId kExternalTextureId;
223 virtual WebKit::WebGLId NextTextureId(); 223 virtual WebKit::WebGLId NextTextureId();
224 virtual void RetireTextureId(WebKit::WebGLId id);
224 225
225 virtual WebKit::WebGLId NextBufferId(); 226 virtual WebKit::WebGLId NextBufferId();
227 virtual void RetireBufferId(WebKit::WebGLId id);
226 228
227 virtual WebKit::WebGLId NextImageId(); 229 virtual WebKit::WebGLId NextImageId();
230 virtual void RetireImageId(WebKit::WebGLId id);
228 231
229 size_t GetTransferBufferMemoryUsedBytes() const; 232 size_t GetTransferBufferMemoryUsedBytes() const;
230 void SetMaxTransferBufferUsageBytes(size_t max_transfer_buffer_usage_bytes); 233 void SetMaxTransferBufferUsageBytes(size_t max_transfer_buffer_usage_bytes);
231 234
232 void set_test_support(TestContextSupport* test_support) { 235 void set_test_support(TestContextSupport* test_support) {
233 test_support_ = test_support; 236 test_support_ = test_support;
234 } 237 }
235 238
236 protected: 239 protected:
237 struct TextureTargets { 240 struct TextureTargets {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 323
321 scoped_refptr<Namespace> namespace_; 324 scoped_refptr<Namespace> namespace_;
322 static Namespace* shared_namespace_; 325 static Namespace* shared_namespace_;
323 326
324 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_; 327 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_;
325 }; 328 };
326 329
327 } // namespace cc 330 } // namespace cc
328 331
329 #endif // CC_DEBUG_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ 332 #endif // CC_DEBUG_TEST_WEB_GRAPHICS_CONTEXT_3D_H_
OLDNEW
« no previous file with comments | « no previous file | cc/debug/test_web_graphics_context_3d.cc » ('j') | cc/resources/resource_provider.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698