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

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

Issue 816543004: Update from https://crrev.com/308996 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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_impl.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/message_loop/message_loop_proxy.h" 5 #include "base/message_loop/message_loop_proxy.h"
6 #include "base/threading/simple_thread.h" 6 #include "base/threading/simple_thread.h"
7 #include "cc/layers/delegated_frame_provider.h" 7 #include "cc/layers/delegated_frame_provider.h"
8 #include "cc/layers/delegated_frame_resource_collection.h" 8 #include "cc/layers/delegated_frame_resource_collection.h"
9 #include "cc/layers/delegated_renderer_layer.h" 9 #include "cc/layers/delegated_renderer_layer.h"
10 #include "cc/layers/layer.h" 10 #include "cc/layers/layer.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 RunTestWithoutMessageLoop(); 94 RunTestWithoutMessageLoop();
95 EXPECT_FALSE(base::MessageLoopProxy::current().get()); 95 EXPECT_FALSE(base::MessageLoopProxy::current().get());
96 } 96 }
97 97
98 protected: 98 protected:
99 virtual void RunTestWithoutMessageLoop() = 0; 99 virtual void RunTestWithoutMessageLoop() = 0;
100 100
101 void SetupLayerTreeHost() { 101 void SetupLayerTreeHost() {
102 LayerTreeSettings settings; 102 LayerTreeSettings settings;
103 settings.single_thread_proxy_scheduler = false; 103 settings.single_thread_proxy_scheduler = false;
104 settings.verify_property_trees = true;
104 layer_tree_host_ = LayerTreeHost::CreateSingleThreaded( 105 layer_tree_host_ = LayerTreeHost::CreateSingleThreaded(
105 this, this, nullptr, nullptr, settings, nullptr, nullptr); 106 this, this, nullptr, nullptr, settings, nullptr, nullptr);
106 layer_tree_host_->SetViewportSize(size_); 107 layer_tree_host_->SetViewportSize(size_);
107 layer_tree_host_->SetRootLayer(root_layer_); 108 layer_tree_host_->SetRootLayer(root_layer_);
108 } 109 }
109 110
110 void Composite() { 111 void Composite() {
111 did_commit_ = false; 112 did_commit_ = false;
112 did_commit_and_draw_frame_ = false; 113 did_commit_and_draw_frame_ = false;
113 layer_tree_host_->Composite(gfx::FrameTime::Now()); 114 layer_tree_host_->Composite(gfx::FrameTime::Now());
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 scoped_refptr<DelegatedFrameProvider> frame_provider_; 233 scoped_refptr<DelegatedFrameProvider> frame_provider_;
233 scoped_refptr<DelegatedRendererLayer> delegated_layer_; 234 scoped_refptr<DelegatedRendererLayer> delegated_layer_;
234 }; 235 };
235 236
236 TEST_F(LayerTreeHostNoMessageLoopDelegatedLayer, SingleDelegatedLayer) { 237 TEST_F(LayerTreeHostNoMessageLoopDelegatedLayer, SingleDelegatedLayer) {
237 RunTest(); 238 RunTest();
238 } 239 }
239 240
240 } // namespace 241 } // namespace
241 } // namespace cc 242 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698