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

Side by Side Diff: cc/layers/texture_layer_unittest.cc

Issue 485043003: cc: Use correct message loop proxy in BlockingTaskRunner (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Help gn deal with it. Created 6 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/layers/texture_layer.h" 5 #include "cc/layers/texture_layer.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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 class MockMailboxCallback { 95 class MockMailboxCallback {
96 public: 96 public:
97 MOCK_METHOD3(Release, 97 MOCK_METHOD3(Release,
98 void(const gpu::Mailbox& mailbox, 98 void(const gpu::Mailbox& mailbox,
99 uint32 sync_point, 99 uint32 sync_point,
100 bool lost_resource)); 100 bool lost_resource));
101 MOCK_METHOD3(Release2, 101 MOCK_METHOD3(Release2,
102 void(base::SharedMemory* shared_memory, 102 void(base::SharedMemory* shared_memory,
103 uint32 sync_point, 103 uint32 sync_point,
104 bool lost_resource)); 104 bool lost_resource));
105 MOCK_METHOD4(ReleaseImpl,
106 void(const gpu::Mailbox& mailbox,
107 uint32 sync_point,
108 bool lost_resource,
109 scoped_refptr<BlockingTaskRunner> main_thread_task_runner));
110 MOCK_METHOD4(ReleaseImpl2,
111 void(base::SharedMemory* shared_memory,
112 uint32 sync_point,
113 bool lost_resource,
114 scoped_refptr<BlockingTaskRunner> main_thread_task_runner));
105 }; 115 };
106 116
107 struct CommonMailboxObjects { 117 struct CommonMailboxObjects {
108 CommonMailboxObjects() 118 CommonMailboxObjects()
109 : mailbox_name1_(MailboxFromChar('1')), 119 : mailbox_name1_(MailboxFromChar('1')),
110 mailbox_name2_(MailboxFromChar('2')), 120 mailbox_name2_(MailboxFromChar('2')),
111 sync_point1_(1), 121 sync_point1_(1),
112 sync_point2_(2), 122 sync_point2_(2),
113 shared_memory_(new base::SharedMemory) { 123 shared_memory_(new base::SharedMemory) {
114 release_mailbox1_ = base::Bind(&MockMailboxCallback::Release, 124 release_mailbox1_ = base::Bind(&MockMailboxCallback::Release,
115 base::Unretained(&mock_callback_), 125 base::Unretained(&mock_callback_),
116 mailbox_name1_); 126 mailbox_name1_);
117 release_mailbox2_ = base::Bind(&MockMailboxCallback::Release, 127 release_mailbox2_ = base::Bind(&MockMailboxCallback::Release,
118 base::Unretained(&mock_callback_), 128 base::Unretained(&mock_callback_),
119 mailbox_name2_); 129 mailbox_name2_);
130 release_mailbox1_impl_ = base::Bind(&MockMailboxCallback::ReleaseImpl,
131 base::Unretained(&mock_callback_),
132 mailbox_name1_);
133 release_mailbox2_impl_ = base::Bind(&MockMailboxCallback::ReleaseImpl,
134 base::Unretained(&mock_callback_),
135 mailbox_name2_);
120 const uint32 arbitrary_target1 = GL_TEXTURE_2D; 136 const uint32 arbitrary_target1 = GL_TEXTURE_2D;
121 const uint32 arbitrary_target2 = GL_TEXTURE_EXTERNAL_OES; 137 const uint32 arbitrary_target2 = GL_TEXTURE_EXTERNAL_OES;
122 mailbox1_ = TextureMailbox(mailbox_name1_, arbitrary_target1, sync_point1_); 138 mailbox1_ = TextureMailbox(mailbox_name1_, arbitrary_target1, sync_point1_);
123 mailbox2_ = TextureMailbox(mailbox_name2_, arbitrary_target2, sync_point2_); 139 mailbox2_ = TextureMailbox(mailbox_name2_, arbitrary_target2, sync_point2_);
124 gfx::Size size(128, 128); 140 gfx::Size size(128, 128);
125 EXPECT_TRUE(shared_memory_->CreateAndMapAnonymous(4 * size.GetArea())); 141 EXPECT_TRUE(shared_memory_->CreateAndMapAnonymous(4 * size.GetArea()));
126 release_mailbox3_ = base::Bind(&MockMailboxCallback::Release2, 142 release_mailbox3_ = base::Bind(&MockMailboxCallback::Release2,
127 base::Unretained(&mock_callback_), 143 base::Unretained(&mock_callback_),
128 shared_memory_.get()); 144 shared_memory_.get());
145 release_mailbox3_impl_ = base::Bind(&MockMailboxCallback::ReleaseImpl2,
146 base::Unretained(&mock_callback_),
147 shared_memory_.get());
129 mailbox3_ = TextureMailbox(shared_memory_.get(), size); 148 mailbox3_ = TextureMailbox(shared_memory_.get(), size);
130 } 149 }
131 150
132 gpu::Mailbox mailbox_name1_; 151 gpu::Mailbox mailbox_name1_;
133 gpu::Mailbox mailbox_name2_; 152 gpu::Mailbox mailbox_name2_;
134 MockMailboxCallback mock_callback_; 153 MockMailboxCallback mock_callback_;
135 ReleaseCallback release_mailbox1_; 154 ReleaseCallback release_mailbox1_;
136 ReleaseCallback release_mailbox2_; 155 ReleaseCallback release_mailbox2_;
137 ReleaseCallback release_mailbox3_; 156 ReleaseCallback release_mailbox3_;
157 ReleaseCallbackImpl release_mailbox1_impl_;
158 ReleaseCallbackImpl release_mailbox2_impl_;
159 ReleaseCallbackImpl release_mailbox3_impl_;
138 TextureMailbox mailbox1_; 160 TextureMailbox mailbox1_;
139 TextureMailbox mailbox2_; 161 TextureMailbox mailbox2_;
140 TextureMailbox mailbox3_; 162 TextureMailbox mailbox3_;
141 uint32 sync_point1_; 163 uint32 sync_point1_;
142 uint32 sync_point2_; 164 uint32 sync_point2_;
143 scoped_ptr<base::SharedMemory> shared_memory_; 165 scoped_ptr<base::SharedMemory> shared_memory_;
144 }; 166 };
145 167
146 class TextureLayerTest : public testing::Test { 168 class TextureLayerTest : public testing::Test {
147 public: 169 public:
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(AtLeast(1)); 392 EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(AtLeast(1));
371 test_layer->SetTextureMailboxWithoutReleaseCallback(mailbox2); 393 test_layer->SetTextureMailboxWithoutReleaseCallback(mailbox2);
372 Mock::VerifyAndClearExpectations(layer_tree_host_.get()); 394 Mock::VerifyAndClearExpectations(layer_tree_host_.get());
373 } 395 }
374 396
375 class TextureLayerMailboxHolderTest : public TextureLayerTest { 397 class TextureLayerMailboxHolderTest : public TextureLayerTest {
376 public: 398 public:
377 TextureLayerMailboxHolderTest() 399 TextureLayerMailboxHolderTest()
378 : main_thread_("MAIN") { 400 : main_thread_("MAIN") {
379 main_thread_.Start(); 401 main_thread_.Start();
402 main_thread_task_runner_ =
403 BlockingTaskRunner::Create(main_thread_.message_loop_proxy());
380 } 404 }
381 405
382 void Wait(const base::Thread& thread) { 406 void Wait(const base::Thread& thread) {
383 bool manual_reset = false; 407 bool manual_reset = false;
384 bool initially_signaled = false; 408 bool initially_signaled = false;
385 base::WaitableEvent event(manual_reset, initially_signaled); 409 base::WaitableEvent event(manual_reset, initially_signaled);
386 thread.message_loop()->PostTask( 410 thread.message_loop()->PostTask(
387 FROM_HERE, 411 FROM_HERE,
388 base::Bind(&base::WaitableEvent::Signal, base::Unretained(&event))); 412 base::Bind(&base::WaitableEvent::Signal, base::Unretained(&event)));
389 event.Wait(); 413 event.Wait();
390 } 414 }
391 415
392 void CreateMainRef() { 416 void CreateMainRef() {
393 main_ref_ = TestMailboxHolder::Create( 417 main_ref_ = TestMailboxHolder::Create(
394 test_data_.mailbox1_, 418 test_data_.mailbox1_,
395 SingleReleaseCallback::Create(test_data_.release_mailbox1_)).Pass(); 419 SingleReleaseCallback::Create(test_data_.release_mailbox1_)).Pass();
396 } 420 }
397 421
398 void ReleaseMainRef() { 422 void ReleaseMainRef() {
399 main_ref_.reset(); 423 main_ref_.reset();
400 } 424 }
401 425
402 void CreateImplRef(scoped_ptr<SingleReleaseCallback>* impl_ref) { 426 void CreateImplRef(scoped_ptr<SingleReleaseCallbackImpl>* impl_ref) {
403 *impl_ref = main_ref_->holder()->GetCallbackForImplThread(); 427 *impl_ref = main_ref_->holder()->GetCallbackForImplThread();
404 } 428 }
405 429
406 void CapturePostTasksAndWait(base::WaitableEvent* begin_capture, 430 void CapturePostTasksAndWait(base::WaitableEvent* begin_capture,
407 base::WaitableEvent* wait_for_capture, 431 base::WaitableEvent* wait_for_capture,
408 base::WaitableEvent* stop_capture) { 432 base::WaitableEvent* stop_capture) {
409 begin_capture->Wait(); 433 begin_capture->Wait();
410 BlockingTaskRunner::CapturePostTasks capture; 434 BlockingTaskRunner::CapturePostTasks capture(main_thread_task_runner_);
411 wait_for_capture->Signal(); 435 wait_for_capture->Signal();
412 stop_capture->Wait(); 436 stop_capture->Wait();
413 } 437 }
414 438
415 protected: 439 protected:
416 scoped_ptr<TestMailboxHolder::MainThreadReference> 440 scoped_ptr<TestMailboxHolder::MainThreadReference>
417 main_ref_; 441 main_ref_;
418 base::Thread main_thread_; 442 base::Thread main_thread_;
443 scoped_refptr<BlockingTaskRunner> main_thread_task_runner_;
419 CommonMailboxObjects test_data_; 444 CommonMailboxObjects test_data_;
420 }; 445 };
421 446
422 TEST_F(TextureLayerMailboxHolderTest, TwoCompositors_BothReleaseThenMain) { 447 TEST_F(TextureLayerMailboxHolderTest, TwoCompositors_BothReleaseThenMain) {
423 scoped_refptr<TextureLayer> test_layer = TextureLayer::CreateForMailbox(NULL); 448 scoped_refptr<TextureLayer> test_layer = TextureLayer::CreateForMailbox(NULL);
424 ASSERT_TRUE(test_layer.get()); 449 ASSERT_TRUE(test_layer.get());
425 450
426 main_thread_.message_loop()->PostTask( 451 main_thread_.message_loop()->PostTask(
427 FROM_HERE, 452 FROM_HERE,
428 base::Bind(&TextureLayerMailboxHolderTest::CreateMainRef, 453 base::Bind(&TextureLayerMailboxHolderTest::CreateMainRef,
429 base::Unretained(this))); 454 base::Unretained(this)));
430 455
431 Wait(main_thread_); 456 Wait(main_thread_);
432 457
433 // The texture layer is attached to compositor1, and passes a reference to its 458 // The texture layer is attached to compositor1, and passes a reference to its
434 // impl tree. 459 // impl tree.
435 scoped_ptr<SingleReleaseCallback> compositor1; 460 scoped_ptr<SingleReleaseCallbackImpl> compositor1;
436 main_thread_.message_loop()->PostTask( 461 main_thread_.message_loop()->PostTask(
437 FROM_HERE, 462 FROM_HERE,
438 base::Bind(&TextureLayerMailboxHolderTest::CreateImplRef, 463 base::Bind(&TextureLayerMailboxHolderTest::CreateImplRef,
439 base::Unretained(this), 464 base::Unretained(this),
440 &compositor1)); 465 &compositor1));
441 466
442 // Then the texture layer is removed and attached to compositor2, and passes a 467 // Then the texture layer is removed and attached to compositor2, and passes a
443 // reference to its impl tree. 468 // reference to its impl tree.
444 scoped_ptr<SingleReleaseCallback> compositor2; 469 scoped_ptr<SingleReleaseCallbackImpl> compositor2;
445 main_thread_.message_loop()->PostTask( 470 main_thread_.message_loop()->PostTask(
446 FROM_HERE, 471 FROM_HERE,
447 base::Bind(&TextureLayerMailboxHolderTest::CreateImplRef, 472 base::Bind(&TextureLayerMailboxHolderTest::CreateImplRef,
448 base::Unretained(this), 473 base::Unretained(this),
449 &compositor2)); 474 &compositor2));
450 475
451 Wait(main_thread_); 476 Wait(main_thread_);
452 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_); 477 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_);
453 478
454 // The compositors both destroy their impl trees before the main thread layer 479 // The compositors both destroy their impl trees before the main thread layer
455 // is destroyed. 480 // is destroyed.
456 compositor1->Run(100, false); 481 compositor1->Run(100, false, main_thread_task_runner_);
457 compositor2->Run(200, false); 482 compositor2->Run(200, false, main_thread_task_runner_);
458 483
459 Wait(main_thread_); 484 Wait(main_thread_);
460 485
461 EXPECT_CALL(test_data_.mock_callback_, Release(_, _, _)).Times(0); 486 EXPECT_CALL(test_data_.mock_callback_, Release(_, _, _)).Times(0);
462 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_); 487 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_);
463 488
464 // The main thread ref is the last one, so the mailbox is released back to the 489 // The main thread ref is the last one, so the mailbox is released back to the
465 // embedder, with the last sync point provided by the impl trees. 490 // embedder, with the last sync point provided by the impl trees.
466 EXPECT_CALL(test_data_.mock_callback_, 491 EXPECT_CALL(test_data_.mock_callback_,
467 Release(test_data_.mailbox_name1_, 200, false)).Times(1); 492 Release(test_data_.mailbox_name1_, 200, false)).Times(1);
(...skipping 12 matching lines...) Expand all
480 505
481 main_thread_.message_loop()->PostTask( 506 main_thread_.message_loop()->PostTask(
482 FROM_HERE, 507 FROM_HERE,
483 base::Bind(&TextureLayerMailboxHolderTest::CreateMainRef, 508 base::Bind(&TextureLayerMailboxHolderTest::CreateMainRef,
484 base::Unretained(this))); 509 base::Unretained(this)));
485 510
486 Wait(main_thread_); 511 Wait(main_thread_);
487 512
488 // The texture layer is attached to compositor1, and passes a reference to its 513 // The texture layer is attached to compositor1, and passes a reference to its
489 // impl tree. 514 // impl tree.
490 scoped_ptr<SingleReleaseCallback> compositor1; 515 scoped_ptr<SingleReleaseCallbackImpl> compositor1;
491 main_thread_.message_loop()->PostTask( 516 main_thread_.message_loop()->PostTask(
492 FROM_HERE, 517 FROM_HERE,
493 base::Bind(&TextureLayerMailboxHolderTest::CreateImplRef, 518 base::Bind(&TextureLayerMailboxHolderTest::CreateImplRef,
494 base::Unretained(this), 519 base::Unretained(this),
495 &compositor1)); 520 &compositor1));
496 521
497 // Then the texture layer is removed and attached to compositor2, and passes a 522 // Then the texture layer is removed and attached to compositor2, and passes a
498 // reference to its impl tree. 523 // reference to its impl tree.
499 scoped_ptr<SingleReleaseCallback> compositor2; 524 scoped_ptr<SingleReleaseCallbackImpl> compositor2;
500 main_thread_.message_loop()->PostTask( 525 main_thread_.message_loop()->PostTask(
501 FROM_HERE, 526 FROM_HERE,
502 base::Bind(&TextureLayerMailboxHolderTest::CreateImplRef, 527 base::Bind(&TextureLayerMailboxHolderTest::CreateImplRef,
503 base::Unretained(this), 528 base::Unretained(this),
504 &compositor2)); 529 &compositor2));
505 530
506 Wait(main_thread_); 531 Wait(main_thread_);
507 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_); 532 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_);
508 533
509 // One compositor destroys their impl tree. 534 // One compositor destroys their impl tree.
510 compositor1->Run(100, false); 535 compositor1->Run(100, false, main_thread_task_runner_);
511 536
512 // Then the main thread reference is destroyed. 537 // Then the main thread reference is destroyed.
513 main_thread_.message_loop()->PostTask( 538 main_thread_.message_loop()->PostTask(
514 FROM_HERE, 539 FROM_HERE,
515 base::Bind(&TextureLayerMailboxHolderTest::ReleaseMainRef, 540 base::Bind(&TextureLayerMailboxHolderTest::ReleaseMainRef,
516 base::Unretained(this))); 541 base::Unretained(this)));
517 542
518 Wait(main_thread_); 543 Wait(main_thread_);
519 544
520 EXPECT_CALL(test_data_.mock_callback_, Release(_, _, _)).Times(0); 545 EXPECT_CALL(test_data_.mock_callback_, Release(_, _, _)).Times(0);
521 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_); 546 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_);
522 547
523 // The second impl reference is destroyed last, causing the mailbox to be 548 // The second impl reference is destroyed last, causing the mailbox to be
524 // released back to the embedder with the last sync point from the impl tree. 549 // released back to the embedder with the last sync point from the impl tree.
525 EXPECT_CALL(test_data_.mock_callback_, 550 EXPECT_CALL(test_data_.mock_callback_,
526 Release(test_data_.mailbox_name1_, 200, true)).Times(1); 551 Release(test_data_.mailbox_name1_, 200, true)).Times(1);
527 552
528 compositor2->Run(200, true); 553 compositor2->Run(200, true, main_thread_task_runner_);
529 Wait(main_thread_); 554 Wait(main_thread_);
530 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_); 555 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_);
531 } 556 }
532 557
533 TEST_F(TextureLayerMailboxHolderTest, TwoCompositors_MainReleasedFirst) { 558 TEST_F(TextureLayerMailboxHolderTest, TwoCompositors_MainReleasedFirst) {
534 scoped_refptr<TextureLayer> test_layer = TextureLayer::CreateForMailbox(NULL); 559 scoped_refptr<TextureLayer> test_layer = TextureLayer::CreateForMailbox(NULL);
535 ASSERT_TRUE(test_layer.get()); 560 ASSERT_TRUE(test_layer.get());
536 561
537 main_thread_.message_loop()->PostTask( 562 main_thread_.message_loop()->PostTask(
538 FROM_HERE, 563 FROM_HERE,
539 base::Bind(&TextureLayerMailboxHolderTest::CreateMainRef, 564 base::Bind(&TextureLayerMailboxHolderTest::CreateMainRef,
540 base::Unretained(this))); 565 base::Unretained(this)));
541 566
542 Wait(main_thread_); 567 Wait(main_thread_);
543 568
544 // The texture layer is attached to compositor1, and passes a reference to its 569 // The texture layer is attached to compositor1, and passes a reference to its
545 // impl tree. 570 // impl tree.
546 scoped_ptr<SingleReleaseCallback> compositor1; 571 scoped_ptr<SingleReleaseCallbackImpl> compositor1;
547 main_thread_.message_loop()->PostTask( 572 main_thread_.message_loop()->PostTask(
548 FROM_HERE, 573 FROM_HERE,
549 base::Bind(&TextureLayerMailboxHolderTest::CreateImplRef, 574 base::Bind(&TextureLayerMailboxHolderTest::CreateImplRef,
550 base::Unretained(this), 575 base::Unretained(this),
551 &compositor1)); 576 &compositor1));
552 577
553 // Then the texture layer is removed and attached to compositor2, and passes a 578 // Then the texture layer is removed and attached to compositor2, and passes a
554 // reference to its impl tree. 579 // reference to its impl tree.
555 scoped_ptr<SingleReleaseCallback> compositor2; 580 scoped_ptr<SingleReleaseCallbackImpl> compositor2;
556 main_thread_.message_loop()->PostTask( 581 main_thread_.message_loop()->PostTask(
557 FROM_HERE, 582 FROM_HERE,
558 base::Bind(&TextureLayerMailboxHolderTest::CreateImplRef, 583 base::Bind(&TextureLayerMailboxHolderTest::CreateImplRef,
559 base::Unretained(this), 584 base::Unretained(this),
560 &compositor2)); 585 &compositor2));
561 586
562 Wait(main_thread_); 587 Wait(main_thread_);
563 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_); 588 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_);
564 589
565 // The main thread reference is destroyed first. 590 // The main thread reference is destroyed first.
566 main_thread_.message_loop()->PostTask( 591 main_thread_.message_loop()->PostTask(
567 FROM_HERE, 592 FROM_HERE,
568 base::Bind(&TextureLayerMailboxHolderTest::ReleaseMainRef, 593 base::Bind(&TextureLayerMailboxHolderTest::ReleaseMainRef,
569 base::Unretained(this))); 594 base::Unretained(this)));
570 595
571 // One compositor destroys their impl tree. 596 // One compositor destroys their impl tree.
572 compositor2->Run(200, false); 597 compositor2->Run(200, false, main_thread_task_runner_);
573 598
574 Wait(main_thread_); 599 Wait(main_thread_);
575 600
576 EXPECT_CALL(test_data_.mock_callback_, Release(_, _, _)).Times(0); 601 EXPECT_CALL(test_data_.mock_callback_, Release(_, _, _)).Times(0);
577 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_); 602 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_);
578 603
579 // The second impl reference is destroyed last, causing the mailbox to be 604 // The second impl reference is destroyed last, causing the mailbox to be
580 // released back to the embedder with the last sync point from the impl tree. 605 // released back to the embedder with the last sync point from the impl tree.
581 EXPECT_CALL(test_data_.mock_callback_, 606 EXPECT_CALL(test_data_.mock_callback_,
582 Release(test_data_.mailbox_name1_, 100, true)).Times(1); 607 Release(test_data_.mailbox_name1_, 100, true)).Times(1);
583 608
584 compositor1->Run(100, true); 609 compositor1->Run(100, true, main_thread_task_runner_);
585 Wait(main_thread_); 610 Wait(main_thread_);
586 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_); 611 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_);
587 } 612 }
588 613
589 TEST_F(TextureLayerMailboxHolderTest, TwoCompositors_SecondImplRefShortcut) { 614 TEST_F(TextureLayerMailboxHolderTest, TwoCompositors_SecondImplRefShortcut) {
590 scoped_refptr<TextureLayer> test_layer = TextureLayer::CreateForMailbox(NULL); 615 scoped_refptr<TextureLayer> test_layer = TextureLayer::CreateForMailbox(NULL);
591 ASSERT_TRUE(test_layer.get()); 616 ASSERT_TRUE(test_layer.get());
592 617
593 main_thread_.message_loop()->PostTask( 618 main_thread_.message_loop()->PostTask(
594 FROM_HERE, 619 FROM_HERE,
595 base::Bind(&TextureLayerMailboxHolderTest::CreateMainRef, 620 base::Bind(&TextureLayerMailboxHolderTest::CreateMainRef,
596 base::Unretained(this))); 621 base::Unretained(this)));
597 622
598 Wait(main_thread_); 623 Wait(main_thread_);
599 624
600 // The texture layer is attached to compositor1, and passes a reference to its 625 // The texture layer is attached to compositor1, and passes a reference to its
601 // impl tree. 626 // impl tree.
602 scoped_ptr<SingleReleaseCallback> compositor1; 627 scoped_ptr<SingleReleaseCallbackImpl> compositor1;
603 main_thread_.message_loop()->PostTask( 628 main_thread_.message_loop()->PostTask(
604 FROM_HERE, 629 FROM_HERE,
605 base::Bind(&TextureLayerMailboxHolderTest::CreateImplRef, 630 base::Bind(&TextureLayerMailboxHolderTest::CreateImplRef,
606 base::Unretained(this), 631 base::Unretained(this),
607 &compositor1)); 632 &compositor1));
608 633
609 // Then the texture layer is removed and attached to compositor2, and passes a 634 // Then the texture layer is removed and attached to compositor2, and passes a
610 // reference to its impl tree. 635 // reference to its impl tree.
611 scoped_ptr<SingleReleaseCallback> compositor2; 636 scoped_ptr<SingleReleaseCallbackImpl> compositor2;
612 main_thread_.message_loop()->PostTask( 637 main_thread_.message_loop()->PostTask(
613 FROM_HERE, 638 FROM_HERE,
614 base::Bind(&TextureLayerMailboxHolderTest::CreateImplRef, 639 base::Bind(&TextureLayerMailboxHolderTest::CreateImplRef,
615 base::Unretained(this), 640 base::Unretained(this),
616 &compositor2)); 641 &compositor2));
617 642
618 Wait(main_thread_); 643 Wait(main_thread_);
619 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_); 644 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_);
620 645
621 // The main thread reference is destroyed first. 646 // The main thread reference is destroyed first.
(...skipping 17 matching lines...) Expand all
639 FROM_HERE, 664 FROM_HERE,
640 base::Bind(&TextureLayerMailboxHolderTest::CapturePostTasksAndWait, 665 base::Bind(&TextureLayerMailboxHolderTest::CapturePostTasksAndWait,
641 base::Unretained(this), 666 base::Unretained(this),
642 &begin_capture, 667 &begin_capture,
643 &wait_for_capture, 668 &wait_for_capture,
644 &stop_capture)); 669 &stop_capture));
645 670
646 // Before the main thread capturing starts, one compositor destroys their 671 // Before the main thread capturing starts, one compositor destroys their
647 // impl reference. Since capturing did not start, this gets post-tasked to 672 // impl reference. Since capturing did not start, this gets post-tasked to
648 // the main thread. 673 // the main thread.
649 compositor1->Run(100, false); 674 compositor1->Run(100, false, main_thread_task_runner_);
650 675
651 // Start capturing on the main thread. 676 // Start capturing on the main thread.
652 begin_capture.Signal(); 677 begin_capture.Signal();
653 wait_for_capture.Wait(); 678 wait_for_capture.Wait();
654 679
655 // Meanwhile, the second compositor released its impl reference, but this task 680 // Meanwhile, the second compositor released its impl reference, but this task
656 // gets shortcutted directly to the main thread. This means the reference is 681 // gets shortcutted directly to the main thread. This means the reference is
657 // released before compositor1, whose reference will be released later when 682 // released before compositor1, whose reference will be released later when
658 // the post-task is serviced. But since it was destroyed _on the impl thread_ 683 // the post-task is serviced. But since it was destroyed _on the impl thread_
659 // last, its sync point values should be used. 684 // last, its sync point values should be used.
660 compositor2->Run(200, true); 685 compositor2->Run(200, true, main_thread_task_runner_);
661 686
662 stop_capture.Signal(); 687 stop_capture.Signal();
663 Wait(main_thread_); 688 Wait(main_thread_);
664 689
665 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_); 690 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_);
666 } 691 }
667 692
668 class TextureLayerImplWithMailboxThreadedCallback : public LayerTreeTest { 693 class TextureLayerImplWithMailboxThreadedCallback : public LayerTreeTest {
669 public: 694 public:
670 TextureLayerImplWithMailboxThreadedCallback() 695 TextureLayerImplWithMailboxThreadedCallback()
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 return will_draw; 935 return will_draw;
911 } 936 }
912 937
913 CommonMailboxObjects test_data_; 938 CommonMailboxObjects test_data_;
914 FakeLayerTreeHostClient fake_client_; 939 FakeLayerTreeHostClient fake_client_;
915 }; 940 };
916 941
917 // Test conditions for results of TextureLayerImpl::WillDraw under 942 // Test conditions for results of TextureLayerImpl::WillDraw under
918 // different configurations of different mailbox, texture_id, and draw_mode. 943 // different configurations of different mailbox, texture_id, and draw_mode.
919 TEST_F(TextureLayerImplWithMailboxTest, TestWillDraw) { 944 TEST_F(TextureLayerImplWithMailboxTest, TestWillDraw) {
920 EXPECT_CALL(test_data_.mock_callback_, 945 EXPECT_CALL(
921 Release(test_data_.mailbox_name1_, 946 test_data_.mock_callback_,
922 test_data_.sync_point1_, 947 ReleaseImpl(test_data_.mailbox_name1_, test_data_.sync_point1_, false, _))
923 false))
924 .Times(AnyNumber()); 948 .Times(AnyNumber());
925 EXPECT_CALL(test_data_.mock_callback_, 949 EXPECT_CALL(test_data_.mock_callback_,
926 Release2(test_data_.shared_memory_.get(), 0, false)) 950 ReleaseImpl2(test_data_.shared_memory_.get(), 0, false, _))
927 .Times(AnyNumber()); 951 .Times(AnyNumber());
928 // Hardware mode. 952 // Hardware mode.
929 { 953 {
930 scoped_ptr<TextureLayerImpl> impl_layer = 954 scoped_ptr<TextureLayerImpl> impl_layer =
931 TextureLayerImpl::Create(host_impl_.active_tree(), 1); 955 TextureLayerImpl::Create(host_impl_.active_tree(), 1);
932 impl_layer->SetTextureMailbox( 956 impl_layer->SetTextureMailbox(
933 test_data_.mailbox1_, 957 test_data_.mailbox1_,
934 SingleReleaseCallback::Create(test_data_.release_mailbox1_)); 958 SingleReleaseCallbackImpl::Create(test_data_.release_mailbox1_impl_));
935 EXPECT_TRUE(WillDraw(impl_layer.get(), DRAW_MODE_HARDWARE)); 959 EXPECT_TRUE(WillDraw(impl_layer.get(), DRAW_MODE_HARDWARE));
936 } 960 }
937 961
938 { 962 {
939 scoped_ptr<TextureLayerImpl> impl_layer = 963 scoped_ptr<TextureLayerImpl> impl_layer =
940 TextureLayerImpl::Create(host_impl_.active_tree(), 1); 964 TextureLayerImpl::Create(host_impl_.active_tree(), 1);
941 impl_layer->SetTextureMailbox(TextureMailbox(), 965 impl_layer->SetTextureMailbox(TextureMailbox(),
942 scoped_ptr<SingleReleaseCallback>()); 966 scoped_ptr<SingleReleaseCallbackImpl>());
943 EXPECT_FALSE(WillDraw(impl_layer.get(), DRAW_MODE_HARDWARE)); 967 EXPECT_FALSE(WillDraw(impl_layer.get(), DRAW_MODE_HARDWARE));
944 } 968 }
945 969
946 { 970 {
947 // Software resource. 971 // Software resource.
948 scoped_ptr<TextureLayerImpl> impl_layer = 972 scoped_ptr<TextureLayerImpl> impl_layer =
949 TextureLayerImpl::Create(host_impl_.active_tree(), 1); 973 TextureLayerImpl::Create(host_impl_.active_tree(), 1);
950 impl_layer->SetTextureMailbox( 974 impl_layer->SetTextureMailbox(
951 test_data_.mailbox3_, 975 test_data_.mailbox3_,
952 SingleReleaseCallback::Create(test_data_.release_mailbox3_)); 976 SingleReleaseCallbackImpl::Create(test_data_.release_mailbox3_impl_));
953 EXPECT_TRUE(WillDraw(impl_layer.get(), DRAW_MODE_HARDWARE)); 977 EXPECT_TRUE(WillDraw(impl_layer.get(), DRAW_MODE_HARDWARE));
954 } 978 }
955 979
956 // Software mode. 980 // Software mode.
957 { 981 {
958 scoped_ptr<TextureLayerImpl> impl_layer = 982 scoped_ptr<TextureLayerImpl> impl_layer =
959 TextureLayerImpl::Create(host_impl_.active_tree(), 1); 983 TextureLayerImpl::Create(host_impl_.active_tree(), 1);
960 impl_layer->SetTextureMailbox( 984 impl_layer->SetTextureMailbox(
961 test_data_.mailbox1_, 985 test_data_.mailbox1_,
962 SingleReleaseCallback::Create(test_data_.release_mailbox1_)); 986 SingleReleaseCallbackImpl::Create(test_data_.release_mailbox1_impl_));
963 EXPECT_FALSE(WillDraw(impl_layer.get(), DRAW_MODE_SOFTWARE)); 987 EXPECT_FALSE(WillDraw(impl_layer.get(), DRAW_MODE_SOFTWARE));
964 } 988 }
965 989
966 { 990 {
967 scoped_ptr<TextureLayerImpl> impl_layer = 991 scoped_ptr<TextureLayerImpl> impl_layer =
968 TextureLayerImpl::Create(host_impl_.active_tree(), 1); 992 TextureLayerImpl::Create(host_impl_.active_tree(), 1);
969 impl_layer->SetTextureMailbox(TextureMailbox(), 993 impl_layer->SetTextureMailbox(TextureMailbox(),
970 scoped_ptr<SingleReleaseCallback>()); 994 scoped_ptr<SingleReleaseCallbackImpl>());
971 EXPECT_FALSE(WillDraw(impl_layer.get(), DRAW_MODE_SOFTWARE)); 995 EXPECT_FALSE(WillDraw(impl_layer.get(), DRAW_MODE_SOFTWARE));
972 } 996 }
973 997
974 { 998 {
975 // Software resource. 999 // Software resource.
976 scoped_ptr<TextureLayerImpl> impl_layer = 1000 scoped_ptr<TextureLayerImpl> impl_layer =
977 TextureLayerImpl::Create(host_impl_.active_tree(), 1); 1001 TextureLayerImpl::Create(host_impl_.active_tree(), 1);
978 impl_layer->SetTextureMailbox( 1002 impl_layer->SetTextureMailbox(
979 test_data_.mailbox3_, 1003 test_data_.mailbox3_,
980 SingleReleaseCallback::Create(test_data_.release_mailbox3_)); 1004 SingleReleaseCallbackImpl::Create(test_data_.release_mailbox3_impl_));
981 EXPECT_TRUE(WillDraw(impl_layer.get(), DRAW_MODE_SOFTWARE)); 1005 EXPECT_TRUE(WillDraw(impl_layer.get(), DRAW_MODE_SOFTWARE));
982 } 1006 }
983 1007
984 // Resourceless software mode. 1008 // Resourceless software mode.
985 { 1009 {
986 scoped_ptr<TextureLayerImpl> impl_layer = 1010 scoped_ptr<TextureLayerImpl> impl_layer =
987 TextureLayerImpl::Create(host_impl_.active_tree(), 1); 1011 TextureLayerImpl::Create(host_impl_.active_tree(), 1);
988 impl_layer->SetTextureMailbox( 1012 impl_layer->SetTextureMailbox(
989 test_data_.mailbox1_, 1013 test_data_.mailbox1_,
990 SingleReleaseCallback::Create(test_data_.release_mailbox1_)); 1014 SingleReleaseCallbackImpl::Create(test_data_.release_mailbox1_impl_));
991 EXPECT_FALSE(WillDraw(impl_layer.get(), DRAW_MODE_RESOURCELESS_SOFTWARE)); 1015 EXPECT_FALSE(WillDraw(impl_layer.get(), DRAW_MODE_RESOURCELESS_SOFTWARE));
992 } 1016 }
993 } 1017 }
994 1018
995 TEST_F(TextureLayerImplWithMailboxTest, TestImplLayerCallbacks) { 1019 TEST_F(TextureLayerImplWithMailboxTest, TestImplLayerCallbacks) {
996 host_impl_.CreatePendingTree(); 1020 host_impl_.CreatePendingTree();
997 scoped_ptr<TextureLayerImpl> pending_layer; 1021 scoped_ptr<TextureLayerImpl> pending_layer;
998 pending_layer = TextureLayerImpl::Create(host_impl_.pending_tree(), 1); 1022 pending_layer = TextureLayerImpl::Create(host_impl_.pending_tree(), 1);
999 ASSERT_TRUE(pending_layer); 1023 ASSERT_TRUE(pending_layer);
1000 1024
1001 scoped_ptr<LayerImpl> active_layer( 1025 scoped_ptr<LayerImpl> active_layer(
1002 pending_layer->CreateLayerImpl(host_impl_.active_tree())); 1026 pending_layer->CreateLayerImpl(host_impl_.active_tree()));
1003 ASSERT_TRUE(active_layer); 1027 ASSERT_TRUE(active_layer);
1004 1028
1005 pending_layer->SetTextureMailbox( 1029 pending_layer->SetTextureMailbox(
1006 test_data_.mailbox1_, 1030 test_data_.mailbox1_,
1007 SingleReleaseCallback::Create(test_data_.release_mailbox1_)); 1031 SingleReleaseCallbackImpl::Create(test_data_.release_mailbox1_impl_));
1008 1032
1009 // Test multiple commits without an activation. 1033 // Test multiple commits without an activation.
1010 EXPECT_CALL(test_data_.mock_callback_, 1034 EXPECT_CALL(
1011 Release(test_data_.mailbox_name1_, 1035 test_data_.mock_callback_,
1012 test_data_.sync_point1_, 1036 ReleaseImpl(test_data_.mailbox_name1_, test_data_.sync_point1_, false, _))
1013 false))
1014 .Times(1); 1037 .Times(1);
1015 pending_layer->SetTextureMailbox( 1038 pending_layer->SetTextureMailbox(
1016 test_data_.mailbox2_, 1039 test_data_.mailbox2_,
1017 SingleReleaseCallback::Create(test_data_.release_mailbox2_)); 1040 SingleReleaseCallbackImpl::Create(test_data_.release_mailbox2_impl_));
1018 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_); 1041 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_);
1019 1042
1020 // Test callback after activation. 1043 // Test callback after activation.
1021 pending_layer->PushPropertiesTo(active_layer.get()); 1044 pending_layer->PushPropertiesTo(active_layer.get());
1022 active_layer->DidBecomeActive(); 1045 active_layer->DidBecomeActive();
1023 1046
1024 EXPECT_CALL(test_data_.mock_callback_, Release(_, _, _)).Times(0); 1047 EXPECT_CALL(test_data_.mock_callback_, ReleaseImpl(_, _, _, _)).Times(0);
1025 pending_layer->SetTextureMailbox( 1048 pending_layer->SetTextureMailbox(
1026 test_data_.mailbox1_, 1049 test_data_.mailbox1_,
1027 SingleReleaseCallback::Create(test_data_.release_mailbox1_)); 1050 SingleReleaseCallbackImpl::Create(test_data_.release_mailbox1_impl_));
1028 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_); 1051 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_);
1029 1052
1030 EXPECT_CALL(test_data_.mock_callback_, 1053 EXPECT_CALL(test_data_.mock_callback_,
1031 Release(test_data_.mailbox_name2_, _, false)) 1054 ReleaseImpl(test_data_.mailbox_name2_, _, false, _)).Times(1);
1032 .Times(1);
1033 pending_layer->PushPropertiesTo(active_layer.get()); 1055 pending_layer->PushPropertiesTo(active_layer.get());
1034 active_layer->DidBecomeActive(); 1056 active_layer->DidBecomeActive();
1035 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_); 1057 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_);
1036 1058
1037 // Test resetting the mailbox. 1059 // Test resetting the mailbox.
1038 EXPECT_CALL(test_data_.mock_callback_, 1060 EXPECT_CALL(test_data_.mock_callback_,
1039 Release(test_data_.mailbox_name1_, _, false)) 1061 ReleaseImpl(test_data_.mailbox_name1_, _, false, _)).Times(1);
1040 .Times(1);
1041 pending_layer->SetTextureMailbox(TextureMailbox(), 1062 pending_layer->SetTextureMailbox(TextureMailbox(),
1042 scoped_ptr<SingleReleaseCallback>()); 1063 scoped_ptr<SingleReleaseCallbackImpl>());
1043 pending_layer->PushPropertiesTo(active_layer.get()); 1064 pending_layer->PushPropertiesTo(active_layer.get());
1044 active_layer->DidBecomeActive(); 1065 active_layer->DidBecomeActive();
1045 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_); 1066 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_);
1046 1067
1047 // Test destructor. 1068 // Test destructor.
1048 EXPECT_CALL(test_data_.mock_callback_, 1069 EXPECT_CALL(
1049 Release(test_data_.mailbox_name1_, 1070 test_data_.mock_callback_,
1050 test_data_.sync_point1_, 1071 ReleaseImpl(test_data_.mailbox_name1_, test_data_.sync_point1_, false, _))
1051 false))
1052 .Times(1); 1072 .Times(1);
1053 pending_layer->SetTextureMailbox( 1073 pending_layer->SetTextureMailbox(
1054 test_data_.mailbox1_, 1074 test_data_.mailbox1_,
1055 SingleReleaseCallback::Create(test_data_.release_mailbox1_)); 1075 SingleReleaseCallbackImpl::Create(test_data_.release_mailbox1_impl_));
1056 } 1076 }
1057 1077
1058 TEST_F(TextureLayerImplWithMailboxTest, 1078 TEST_F(TextureLayerImplWithMailboxTest,
1059 TestDestructorCallbackOnCreatedResource) { 1079 TestDestructorCallbackOnCreatedResource) {
1060 scoped_ptr<TextureLayerImpl> impl_layer; 1080 scoped_ptr<TextureLayerImpl> impl_layer;
1061 impl_layer = TextureLayerImpl::Create(host_impl_.active_tree(), 1); 1081 impl_layer = TextureLayerImpl::Create(host_impl_.active_tree(), 1);
1062 ASSERT_TRUE(impl_layer); 1082 ASSERT_TRUE(impl_layer);
1063 1083
1064 EXPECT_CALL(test_data_.mock_callback_, 1084 EXPECT_CALL(test_data_.mock_callback_,
1065 Release(test_data_.mailbox_name1_, _, false)) 1085 ReleaseImpl(test_data_.mailbox_name1_, _, false, _)).Times(1);
1066 .Times(1);
1067 impl_layer->SetTextureMailbox( 1086 impl_layer->SetTextureMailbox(
1068 test_data_.mailbox1_, 1087 test_data_.mailbox1_,
1069 SingleReleaseCallback::Create(test_data_.release_mailbox1_)); 1088 SingleReleaseCallbackImpl::Create(test_data_.release_mailbox1_impl_));
1070 impl_layer->DidBecomeActive(); 1089 impl_layer->DidBecomeActive();
1071 EXPECT_TRUE(impl_layer->WillDraw( 1090 EXPECT_TRUE(impl_layer->WillDraw(
1072 DRAW_MODE_HARDWARE, host_impl_.active_tree()->resource_provider())); 1091 DRAW_MODE_HARDWARE, host_impl_.active_tree()->resource_provider()));
1073 impl_layer->DidDraw(host_impl_.active_tree()->resource_provider()); 1092 impl_layer->DidDraw(host_impl_.active_tree()->resource_provider());
1074 impl_layer->SetTextureMailbox(TextureMailbox(), 1093 impl_layer->SetTextureMailbox(TextureMailbox(),
1075 scoped_ptr<SingleReleaseCallback>()); 1094 scoped_ptr<SingleReleaseCallbackImpl>());
1076 } 1095 }
1077 1096
1078 TEST_F(TextureLayerImplWithMailboxTest, TestCallbackOnInUseResource) { 1097 TEST_F(TextureLayerImplWithMailboxTest, TestCallbackOnInUseResource) {
1079 ResourceProvider* provider = host_impl_.active_tree()->resource_provider(); 1098 ResourceProvider* provider = host_impl_.active_tree()->resource_provider();
1080 ResourceProvider::ResourceId id = 1099 ResourceProvider::ResourceId id = provider->CreateResourceFromTextureMailbox(
1081 provider->CreateResourceFromTextureMailbox( 1100 test_data_.mailbox1_,
1082 test_data_.mailbox1_, 1101 SingleReleaseCallbackImpl::Create(test_data_.release_mailbox1_impl_));
1083 SingleReleaseCallback::Create(test_data_.release_mailbox1_));
1084 provider->AllocateForTesting(id); 1102 provider->AllocateForTesting(id);
1085 1103
1086 // Transfer some resources to the parent. 1104 // Transfer some resources to the parent.
1087 ResourceProvider::ResourceIdArray resource_ids_to_transfer; 1105 ResourceProvider::ResourceIdArray resource_ids_to_transfer;
1088 resource_ids_to_transfer.push_back(id); 1106 resource_ids_to_transfer.push_back(id);
1089 TransferableResourceArray list; 1107 TransferableResourceArray list;
1090 provider->PrepareSendToParent(resource_ids_to_transfer, &list); 1108 provider->PrepareSendToParent(resource_ids_to_transfer, &list);
1091 EXPECT_TRUE(provider->InUseByConsumer(id)); 1109 EXPECT_TRUE(provider->InUseByConsumer(id));
1092 EXPECT_CALL(test_data_.mock_callback_, Release(_, _, _)).Times(0); 1110 EXPECT_CALL(test_data_.mock_callback_, ReleaseImpl(_, _, _, _)).Times(0);
1093 provider->DeleteResource(id); 1111 provider->DeleteResource(id);
1094 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_); 1112 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_);
1095 EXPECT_CALL(test_data_.mock_callback_, 1113 EXPECT_CALL(test_data_.mock_callback_,
1096 Release(test_data_.mailbox_name1_, _, false)) 1114 ReleaseImpl(test_data_.mailbox_name1_, _, false, _)).Times(1);
1097 .Times(1);
1098 ReturnedResourceArray returned; 1115 ReturnedResourceArray returned;
1099 TransferableResource::ReturnResources(list, &returned); 1116 TransferableResource::ReturnResources(list, &returned);
1100 provider->ReceiveReturnsFromParent(returned); 1117 provider->ReceiveReturnsFromParent(returned);
1101 } 1118 }
1102 1119
1103 // Checks that TextureLayer::Update does not cause an extra commit when setting 1120 // Checks that TextureLayer::Update does not cause an extra commit when setting
1104 // the texture mailbox. 1121 // the texture mailbox.
1105 class TextureLayerNoExtraCommitForMailboxTest 1122 class TextureLayerNoExtraCommitForMailboxTest
1106 : public LayerTreeTest, 1123 : public LayerTreeTest,
1107 public TextureLayerClient { 1124 public TextureLayerClient {
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
1552 int callback_count_; 1569 int callback_count_;
1553 scoped_refptr<Layer> root_; 1570 scoped_refptr<Layer> root_;
1554 scoped_refptr<TextureLayer> layer_; 1571 scoped_refptr<TextureLayer> layer_;
1555 }; 1572 };
1556 1573
1557 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( 1574 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(
1558 TextureLayerWithMailboxImplThreadDeleted); 1575 TextureLayerWithMailboxImplThreadDeleted);
1559 1576
1560 } // namespace 1577 } // namespace
1561 } // namespace cc 1578 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698