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

Side by Side Diff: cc/test/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: rebase 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
« no previous file with comments | « cc/test/pixel_test.cc ('k') | cc/test/test_web_graphics_context_3d.cc » ('j') | 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 208
209 // When this context is lost, all contexts in its share group are also lost. 209 // When this context is lost, all contexts in its share group are also lost.
210 void add_share_group_context(WebKit::WebGraphicsContext3D* context3d) { 210 void add_share_group_context(WebKit::WebGraphicsContext3D* context3d) {
211 shared_contexts_.push_back(context3d); 211 shared_contexts_.push_back(context3d);
212 } 212 }
213 213
214 void set_max_texture_size(int size) { max_texture_size_ = size; } 214 void set_max_texture_size(int size) { max_texture_size_ = size; }
215 215
216 static const WebKit::WebGLId kExternalTextureId; 216 static const WebKit::WebGLId kExternalTextureId;
217 virtual WebKit::WebGLId NextTextureId(); 217 virtual WebKit::WebGLId NextTextureId();
218 virtual void RetireTextureId(WebKit::WebGLId id);
218 219
219 virtual WebKit::WebGLId NextBufferId(); 220 virtual WebKit::WebGLId NextBufferId();
221 virtual void RetireBufferId(WebKit::WebGLId id);
220 222
221 virtual WebKit::WebGLId NextImageId(); 223 virtual WebKit::WebGLId NextImageId();
224 virtual void RetireImageId(WebKit::WebGLId id);
222 225
223 size_t GetTransferBufferMemoryUsedBytes() const; 226 size_t GetTransferBufferMemoryUsedBytes() const;
224 void SetMaxTransferBufferUsageBytes(size_t max_transfer_buffer_usage_bytes); 227 void SetMaxTransferBufferUsageBytes(size_t max_transfer_buffer_usage_bytes);
225 228
226 void set_test_support(TestContextSupport* test_support) { 229 void set_test_support(TestContextSupport* test_support) {
227 test_support_ = test_support; 230 test_support_ = test_support;
228 } 231 }
229 232
230 protected: 233 protected:
231 struct TextureTargets { 234 struct TextureTargets {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 316
314 scoped_refptr<Namespace> namespace_; 317 scoped_refptr<Namespace> namespace_;
315 static Namespace* shared_namespace_; 318 static Namespace* shared_namespace_;
316 319
317 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_; 320 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_;
318 }; 321 };
319 322
320 } // namespace cc 323 } // namespace cc
321 324
322 #endif // CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ 325 #endif // CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_
OLDNEW
« no previous file with comments | « cc/test/pixel_test.cc ('k') | cc/test/test_web_graphics_context_3d.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698