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

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

Issue 635543002: cc: Make ResourceProvider use bindless Produce/ConsumeTextureCHROMIUM (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove redundant func. Created 5 years, 9 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
« no previous file with comments | « cc/test/test_web_graphics_context_3d.h ('k') | cc/trees/layer_tree_host_unittest.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 #include "cc/test/test_web_graphics_context_3d.h" 5 #include "cc/test/test_web_graphics_context_3d.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 return texture_targets_.BoundTexture(target); 349 return texture_targets_.BoundTexture(target);
350 } 350 }
351 351
352 scoped_refptr<TestTexture> TestWebGraphicsContext3D::BoundTexture( 352 scoped_refptr<TestTexture> TestWebGraphicsContext3D::BoundTexture(
353 GLenum target) { 353 GLenum target) {
354 // The caller is expected to lock the namespace for texture access. 354 // The caller is expected to lock the namespace for texture access.
355 namespace_->lock.AssertAcquired(); 355 namespace_->lock.AssertAcquired();
356 return namespace_->textures.TextureForId(BoundTextureId(target)); 356 return namespace_->textures.TextureForId(BoundTextureId(target));
357 } 357 }
358 358
359 scoped_refptr<TestTexture> TestWebGraphicsContext3D::UnboundTexture(
360 GLuint texture) {
361 // The caller is expected to lock the namespace for texture access.
362 namespace_->lock.AssertAcquired();
363 return namespace_->textures.TextureForId(texture);
364 }
365
359 void TestWebGraphicsContext3D::CheckTextureIsBound(GLenum target) { 366 void TestWebGraphicsContext3D::CheckTextureIsBound(GLenum target) {
360 DCHECK(BoundTextureId(target)); 367 DCHECK(BoundTextureId(target));
361 } 368 }
362 369
363 GLuint TestWebGraphicsContext3D::createQueryEXT() { return 1u; } 370 GLuint TestWebGraphicsContext3D::createQueryEXT() { return 1u; }
364 371
365 void TestWebGraphicsContext3D::endQueryEXT(GLenum target) { 372 void TestWebGraphicsContext3D::endQueryEXT(GLenum target) {
366 if (times_end_query_succeeds_ >= 0) { 373 if (times_end_query_succeeds_ >= 0) {
367 if (!times_end_query_succeeds_) { 374 if (!times_end_query_succeeds_) {
368 loseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_ARB, 375 loseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_ARB,
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 mailbox[2] = '\0'; 466 mailbox[2] = '\0';
460 if (++mailbox_name1 == 0) { 467 if (++mailbox_name1 == 0) {
461 mailbox_name1 = '1'; 468 mailbox_name1 = '1';
462 ++mailbox_name2; 469 ++mailbox_name2;
463 } 470 }
464 } 471 }
465 472
466 GLuint TestWebGraphicsContext3D::createAndConsumeTextureCHROMIUM( 473 GLuint TestWebGraphicsContext3D::createAndConsumeTextureCHROMIUM(
467 GLenum target, 474 GLenum target,
468 const GLbyte* mailbox) { 475 const GLbyte* mailbox) {
469 return createTexture(); 476 GLuint texture_id = createTexture();
477 consumeTextureCHROMIUM(target, mailbox);
478 return texture_id;
470 } 479 }
471 480
472 void TestWebGraphicsContext3D::loseContextCHROMIUM(GLenum current, 481 void TestWebGraphicsContext3D::loseContextCHROMIUM(GLenum current,
473 GLenum other) { 482 GLenum other) {
474 if (context_lost_) 483 if (context_lost_)
475 return; 484 return;
476 context_lost_ = true; 485 context_lost_ = true;
477 if (!context_lost_callback_.is_null()) 486 if (!context_lost_callback_.is_null())
478 context_lost_callback_.Run(); 487 context_lost_callback_.Run();
479 488
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 800
792 TestWebGraphicsContext3D::Buffer::Buffer() : target(0), size(0) {} 801 TestWebGraphicsContext3D::Buffer::Buffer() : target(0), size(0) {}
793 802
794 TestWebGraphicsContext3D::Buffer::~Buffer() {} 803 TestWebGraphicsContext3D::Buffer::~Buffer() {}
795 804
796 TestWebGraphicsContext3D::Image::Image() {} 805 TestWebGraphicsContext3D::Image::Image() {}
797 806
798 TestWebGraphicsContext3D::Image::~Image() {} 807 TestWebGraphicsContext3D::Image::~Image() {}
799 808
800 } // namespace cc 809 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/test_web_graphics_context_3d.h ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698