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

Side by Side Diff: cc/trees/layer_tree_host_unittest_context.cc

Issue 1513643010: cc:: Add remote mode to the compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed vmpstr's comments. Created 4 years, 10 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/trees/layer_tree_host_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_copyrequest.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 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/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "cc/layers/delegated_frame_provider.h" 10 #include "cc/layers/delegated_frame_provider.h"
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 bool lose_after_evict_; 780 bool lose_after_evict_;
781 FakeContentLayerClient client_; 781 FakeContentLayerClient client_;
782 LayerTreeHostImpl* impl_host_; 782 LayerTreeHostImpl* impl_host_;
783 int num_commits_; 783 int num_commits_;
784 bool lost_context_; 784 bool lost_context_;
785 }; 785 };
786 786
787 TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures, 787 TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
788 LoseAfterEvict_SingleThread_DirectRenderer) { 788 LoseAfterEvict_SingleThread_DirectRenderer) {
789 lose_after_evict_ = true; 789 lose_after_evict_ = true;
790 RunTest(CompositorMode::SingleThreaded, false); 790 RunTest(CompositorMode::SINGLE_THREADED, false);
791 } 791 }
792 792
793 TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures, 793 TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
794 LoseAfterEvict_SingleThread_DelegatingRenderer) { 794 LoseAfterEvict_SingleThread_DelegatingRenderer) {
795 lose_after_evict_ = true; 795 lose_after_evict_ = true;
796 RunTest(CompositorMode::SingleThreaded, true); 796 RunTest(CompositorMode::SINGLE_THREADED, true);
797 } 797 }
798 798
799 TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures, 799 TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
800 LoseAfterEvict_MultiThread_DirectRenderer) { 800 LoseAfterEvict_MultiThread_DirectRenderer) {
801 lose_after_evict_ = true; 801 lose_after_evict_ = true;
802 RunTest(CompositorMode::Threaded, false); 802 RunTest(CompositorMode::THREADED, false);
803 } 803 }
804 804
805 TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures, 805 TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
806 LoseAfterEvict_MultiThread_DelegatingRenderer) { 806 LoseAfterEvict_MultiThread_DelegatingRenderer) {
807 lose_after_evict_ = true; 807 lose_after_evict_ = true;
808 RunTest(CompositorMode::Threaded, true); 808 RunTest(CompositorMode::THREADED, true);
809 } 809 }
810 810
811 TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures, 811 TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
812 LoseBeforeEvict_SingleThread_DirectRenderer) { 812 LoseBeforeEvict_SingleThread_DirectRenderer) {
813 lose_after_evict_ = false; 813 lose_after_evict_ = false;
814 RunTest(CompositorMode::SingleThreaded, false); 814 RunTest(CompositorMode::SINGLE_THREADED, false);
815 } 815 }
816 816
817 TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures, 817 TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
818 LoseBeforeEvict_SingleThread_DelegatingRenderer) { 818 LoseBeforeEvict_SingleThread_DelegatingRenderer) {
819 lose_after_evict_ = false; 819 lose_after_evict_ = false;
820 RunTest(CompositorMode::SingleThreaded, true); 820 RunTest(CompositorMode::SINGLE_THREADED, true);
821 } 821 }
822 822
823 TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures, 823 TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
824 LoseBeforeEvict_MultiThread_DirectRenderer) { 824 LoseBeforeEvict_MultiThread_DirectRenderer) {
825 lose_after_evict_ = false; 825 lose_after_evict_ = false;
826 RunTest(CompositorMode::Threaded, false); 826 RunTest(CompositorMode::THREADED, false);
827 } 827 }
828 828
829 TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures, 829 TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
830 LoseBeforeEvict_MultiThread_DelegatingRenderer) { 830 LoseBeforeEvict_MultiThread_DelegatingRenderer) {
831 lose_after_evict_ = false; 831 lose_after_evict_ = false;
832 RunTest(CompositorMode::Threaded, true); 832 RunTest(CompositorMode::THREADED, true);
833 } 833 }
834 834
835 class LayerTreeHostContextTestLayersNotified : public LayerTreeHostContextTest { 835 class LayerTreeHostContextTestLayersNotified : public LayerTreeHostContextTest {
836 public: 836 public:
837 LayerTreeHostContextTestLayersNotified() 837 LayerTreeHostContextTestLayersNotified()
838 : LayerTreeHostContextTest(), num_commits_(0) {} 838 : LayerTreeHostContextTest(), num_commits_(0) {}
839 839
840 void SetupTree() override { 840 void SetupTree() override {
841 root_ = FakePictureLayer::Create(layer_settings(), &client_); 841 root_ = FakePictureLayer::Create(layer_settings(), &client_);
842 child_ = FakePictureLayer::Create(layer_settings(), &client_); 842 child_ = FakePictureLayer::Create(layer_settings(), &client_);
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
1637 void AfterTest() override {} 1637 void AfterTest() override {}
1638 1638
1639 bool deferred_; 1639 bool deferred_;
1640 }; 1640 };
1641 1641
1642 SINGLE_AND_MULTI_THREAD_TEST_F( 1642 SINGLE_AND_MULTI_THREAD_TEST_F(
1643 LayerTreeHostContextTestLoseAfterSendingBeginMainFrame); 1643 LayerTreeHostContextTestLoseAfterSendingBeginMainFrame);
1644 1644
1645 } // namespace 1645 } // namespace
1646 } // namespace cc 1646 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_copyrequest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698