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

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

Issue 635543002: cc: Make ResourceProvider use bindless Produce/ConsumeTextureCHROMIUM (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tests updated. Created 6 years, 2 months 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
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/callback.h" 10 #include "base/callback.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 const void* pixels) {} 180 const void* pixels) {}
181 181
182 virtual void genMailboxCHROMIUM(GLbyte* mailbox); 182 virtual void genMailboxCHROMIUM(GLbyte* mailbox);
183 virtual void produceTextureCHROMIUM(GLenum target, 183 virtual void produceTextureCHROMIUM(GLenum target,
184 const GLbyte* mailbox) { } 184 const GLbyte* mailbox) { }
185 virtual void produceTextureDirectCHROMIUM(GLuint texture, 185 virtual void produceTextureDirectCHROMIUM(GLuint texture,
186 GLenum target, 186 GLenum target,
187 const GLbyte* mailbox) {} 187 const GLbyte* mailbox) {}
188 virtual void consumeTextureCHROMIUM(GLenum target, 188 virtual void consumeTextureCHROMIUM(GLenum target,
189 const GLbyte* mailbox) { } 189 const GLbyte* mailbox) { }
190 virtual GLuint createAndConsumeTextureCHROMIUM(GLenum target, 190 GLuint createAndConsumeTextureCHROMIUM(GLenum target, const GLbyte* mailbox);
191 const GLbyte* mailbox);
192 191
193 virtual void loseContextCHROMIUM(GLenum current, GLenum other); 192 virtual void loseContextCHROMIUM(GLenum current, GLenum other);
194 193
195 virtual void bindTexImage2DCHROMIUM(GLenum target, GLint image_id) {} 194 virtual void bindTexImage2DCHROMIUM(GLenum target, GLint image_id) {}
196 195
197 virtual void drawArrays(GLenum mode, GLint first, GLsizei count) {} 196 virtual void drawArrays(GLenum mode, GLint first, GLsizei count) {}
198 virtual void drawElements(GLenum mode, 197 virtual void drawElements(GLenum mode,
199 GLsizei count, 198 GLsizei count,
200 GLenum type, 199 GLenum type,
201 GLintptr offset) {} 200 GLintptr offset) {}
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 friend class base::RefCountedThreadSafe<Namespace>; 428 friend class base::RefCountedThreadSafe<Namespace>;
430 ~Namespace(); 429 ~Namespace();
431 DISALLOW_COPY_AND_ASSIGN(Namespace); 430 DISALLOW_COPY_AND_ASSIGN(Namespace);
432 }; 431 };
433 432
434 TestWebGraphicsContext3D(); 433 TestWebGraphicsContext3D();
435 434
436 void CreateNamespace(); 435 void CreateNamespace();
437 GLuint BoundTextureId(GLenum target); 436 GLuint BoundTextureId(GLenum target);
438 scoped_refptr<TestTexture> BoundTexture(GLenum target); 437 scoped_refptr<TestTexture> BoundTexture(GLenum target);
438 scoped_refptr<TestTexture> UnboundTexture(GLuint texture);
439 void CheckTextureIsBound(GLenum target); 439 void CheckTextureIsBound(GLenum target);
440 440
441 unsigned context_id_; 441 unsigned context_id_;
442 ContextProvider::Capabilities test_capabilities_; 442 ContextProvider::Capabilities test_capabilities_;
443 int times_bind_texture_succeeds_; 443 int times_bind_texture_succeeds_;
444 int times_end_query_succeeds_; 444 int times_end_query_succeeds_;
445 bool context_lost_; 445 bool context_lost_;
446 int times_map_image_chromium_succeeds_; 446 int times_map_image_chromium_succeeds_;
447 int times_map_buffer_chromium_succeeds_; 447 int times_map_buffer_chromium_succeeds_;
448 int current_used_transfer_buffer_usage_bytes_; 448 int current_used_transfer_buffer_usage_bytes_;
(...skipping 21 matching lines...) Expand all
470 470
471 scoped_refptr<Namespace> namespace_; 471 scoped_refptr<Namespace> namespace_;
472 static Namespace* shared_namespace_; 472 static Namespace* shared_namespace_;
473 473
474 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_; 474 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_;
475 }; 475 };
476 476
477 } // namespace cc 477 } // namespace cc
478 478
479 #endif // CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ 479 #endif // CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698