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

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

Issue 2854953006: Move disable_display_vsync out of RendererSettings (Closed)
Patch Set: Correct typo Created 3 years, 7 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 | « no previous file | cc/output/renderer_settings.h » ('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 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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_); 631 Mock::VerifyAndClearExpectations(&test_data_.mock_callback_);
632 } 632 }
633 633
634 class TextureLayerImplWithMailboxThreadedCallback : public LayerTreeTest { 634 class TextureLayerImplWithMailboxThreadedCallback : public LayerTreeTest {
635 public: 635 public:
636 TextureLayerImplWithMailboxThreadedCallback() = default; 636 TextureLayerImplWithMailboxThreadedCallback() = default;
637 637
638 std::unique_ptr<TestCompositorFrameSink> CreateCompositorFrameSink( 638 std::unique_ptr<TestCompositorFrameSink> CreateCompositorFrameSink(
639 scoped_refptr<ContextProvider> compositor_context_provider, 639 scoped_refptr<ContextProvider> compositor_context_provider,
640 scoped_refptr<ContextProvider> worker_context_provider) override { 640 scoped_refptr<ContextProvider> worker_context_provider) override {
641 constexpr bool kDisableDisplayVsync = false;
641 bool synchronous_composite = 642 bool synchronous_composite =
642 !HasImplThread() && 643 !HasImplThread() &&
643 !layer_tree_host()->GetSettings().single_thread_proxy_scheduler; 644 !layer_tree_host()->GetSettings().single_thread_proxy_scheduler;
644 return base::MakeUnique<TestCompositorFrameSink>( 645 return base::MakeUnique<TestCompositorFrameSink>(
645 compositor_context_provider, std::move(worker_context_provider), 646 compositor_context_provider, std::move(worker_context_provider),
646 shared_bitmap_manager(), gpu_memory_buffer_manager(), 647 shared_bitmap_manager(), gpu_memory_buffer_manager(),
647 layer_tree_host()->GetSettings().renderer_settings, 648 layer_tree_host()->GetSettings().renderer_settings,
648 ImplThreadTaskRunner(), synchronous_composite); 649 ImplThreadTaskRunner(), synchronous_composite, kDisableDisplayVsync);
649 } 650 }
650 651
651 void AdvanceTestCase() { 652 void AdvanceTestCase() {
652 ++test_case_; 653 ++test_case_;
653 switch (test_case_) { 654 switch (test_case_) {
654 case 1: 655 case 1:
655 // Case #1: change mailbox before the commit. The old mailbox should be 656 // Case #1: change mailbox before the commit. The old mailbox should be
656 // released immediately. 657 // released immediately.
657 SetMailbox('2'); 658 SetMailbox('2');
658 EXPECT_EQ(1, callback_count_); 659 EXPECT_EQ(1, callback_count_);
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after
1484 base::ThreadChecker main_thread_; 1485 base::ThreadChecker main_thread_;
1485 int callback_count_; 1486 int callback_count_;
1486 scoped_refptr<Layer> root_; 1487 scoped_refptr<Layer> root_;
1487 scoped_refptr<TextureLayer> layer_; 1488 scoped_refptr<TextureLayer> layer_;
1488 }; 1489 };
1489 1490
1490 SINGLE_AND_MULTI_THREAD_TEST_F(TextureLayerWithMailboxImplThreadDeleted); 1491 SINGLE_AND_MULTI_THREAD_TEST_F(TextureLayerWithMailboxImplThreadDeleted);
1491 1492
1492 } // namespace 1493 } // namespace
1493 } // namespace cc 1494 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/output/renderer_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698