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

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: fix test fails in LTH unittest. Created 6 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
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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 const void* pixels) {} 182 const void* pixels) {}
183 183
184 virtual void genMailboxCHROMIUM(GLbyte* mailbox); 184 virtual void genMailboxCHROMIUM(GLbyte* mailbox);
185 virtual void produceTextureCHROMIUM(GLenum target, 185 virtual void produceTextureCHROMIUM(GLenum target,
186 const GLbyte* mailbox) { } 186 const GLbyte* mailbox) { }
187 virtual void produceTextureDirectCHROMIUM(GLuint texture, 187 virtual void produceTextureDirectCHROMIUM(GLuint texture,
188 GLenum target, 188 GLenum target,
189 const GLbyte* mailbox) {} 189 const GLbyte* mailbox) {}
190 virtual void consumeTextureCHROMIUM(GLenum target, 190 virtual void consumeTextureCHROMIUM(GLenum target,
191 const GLbyte* mailbox) { } 191 const GLbyte* mailbox) { }
192 virtual GLuint createAndConsumeTextureCHROMIUM(GLenum target, 192 GLuint createAndConsumeTextureCHROMIUM(GLenum target, const GLbyte* mailbox);
193 const GLbyte* mailbox);
194 193
195 virtual void loseContextCHROMIUM(GLenum current, GLenum other); 194 virtual void loseContextCHROMIUM(GLenum current, GLenum other);
196 195
197 virtual void bindTexImage2DCHROMIUM(GLenum target, GLint image_id) {} 196 virtual void bindTexImage2DCHROMIUM(GLenum target, GLint image_id) {}
198 197
199 virtual void drawArrays(GLenum mode, GLint first, GLsizei count) {} 198 virtual void drawArrays(GLenum mode, GLint first, GLsizei count) {}
200 virtual void drawElements(GLenum mode, 199 virtual void drawElements(GLenum mode,
201 GLsizei count, 200 GLsizei count,
202 GLenum type, 201 GLenum type,
203 GLintptr offset) {} 202 GLintptr offset) {}
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 friend class base::RefCountedThreadSafe<Namespace>; 422 friend class base::RefCountedThreadSafe<Namespace>;
424 ~Namespace(); 423 ~Namespace();
425 DISALLOW_COPY_AND_ASSIGN(Namespace); 424 DISALLOW_COPY_AND_ASSIGN(Namespace);
426 }; 425 };
427 426
428 TestWebGraphicsContext3D(); 427 TestWebGraphicsContext3D();
429 428
430 void CreateNamespace(); 429 void CreateNamespace();
431 GLuint BoundTextureId(GLenum target); 430 GLuint BoundTextureId(GLenum target);
432 scoped_refptr<TestTexture> BoundTexture(GLenum target); 431 scoped_refptr<TestTexture> BoundTexture(GLenum target);
432 scoped_refptr<TestTexture> UnboundTexture(GLuint texture);
433 void CheckTextureIsBound(GLenum target); 433 void CheckTextureIsBound(GLenum target);
434 434
435 unsigned context_id_; 435 unsigned context_id_;
436 ContextProvider::Capabilities test_capabilities_; 436 ContextProvider::Capabilities test_capabilities_;
437 int times_bind_texture_succeeds_; 437 int times_bind_texture_succeeds_;
438 int times_end_query_succeeds_; 438 int times_end_query_succeeds_;
439 bool context_lost_; 439 bool context_lost_;
440 int times_map_buffer_chromium_succeeds_; 440 int times_map_buffer_chromium_succeeds_;
441 int current_used_transfer_buffer_usage_bytes_; 441 int current_used_transfer_buffer_usage_bytes_;
442 int max_used_transfer_buffer_usage_bytes_; 442 int max_used_transfer_buffer_usage_bytes_;
(...skipping 20 matching lines...) Expand all
463 463
464 scoped_refptr<Namespace> namespace_; 464 scoped_refptr<Namespace> namespace_;
465 static Namespace* shared_namespace_; 465 static Namespace* shared_namespace_;
466 466
467 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_; 467 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_;
468 }; 468 };
469 469
470 } // namespace cc 470 } // namespace cc
471 471
472 #endif // CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ 472 #endif // CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698