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

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

Issue 423773002: Unified BeginFrame scheduling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 2 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
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/layer_tree_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 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 no_loop_thread_.Join(); 83 no_loop_thread_.Join();
84 } 84 }
85 85
86 // base::DelegateSimpleThread::Delegate override. 86 // base::DelegateSimpleThread::Delegate override.
87 virtual void Run() OVERRIDE { 87 virtual void Run() OVERRIDE {
88 ASSERT_FALSE(base::MessageLoopProxy::current().get()); 88 ASSERT_FALSE(base::MessageLoopProxy::current().get());
89 RunTestWithoutMessageLoop(); 89 RunTestWithoutMessageLoop();
90 EXPECT_FALSE(base::MessageLoopProxy::current().get()); 90 EXPECT_FALSE(base::MessageLoopProxy::current().get());
91 } 91 }
92 92
93 virtual void DidLoseOutputSurface() OVERRIDE {}
94
93 protected: 95 protected:
94 virtual void RunTestWithoutMessageLoop() = 0; 96 virtual void RunTestWithoutMessageLoop() = 0;
95 97
96 void SetupLayerTreeHost() { 98 void SetupLayerTreeHost() {
97 LayerTreeSettings settings; 99 LayerTreeSettings settings;
98 settings.single_thread_proxy_scheduler = false; 100 settings.single_thread_proxy_scheduler = false;
99 layer_tree_host_ = 101 layer_tree_host_ =
100 LayerTreeHost::CreateSingleThreaded(this, this, NULL, settings, NULL); 102 LayerTreeHost::CreateSingleThreaded(this, this, NULL, settings, NULL);
101 layer_tree_host_->SetViewportSize(size_); 103 layer_tree_host_->SetViewportSize(size_);
102 layer_tree_host_->SetRootLayer(root_layer_); 104 layer_tree_host_->SetRootLayer(root_layer_);
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 scoped_refptr<DelegatedFrameProvider> frame_provider_; 229 scoped_refptr<DelegatedFrameProvider> frame_provider_;
228 scoped_refptr<DelegatedRendererLayer> delegated_layer_; 230 scoped_refptr<DelegatedRendererLayer> delegated_layer_;
229 }; 231 };
230 232
231 TEST_F(LayerTreeHostNoMessageLoopDelegatedLayer, SingleDelegatedLayer) { 233 TEST_F(LayerTreeHostNoMessageLoopDelegatedLayer, SingleDelegatedLayer) {
232 RunTest(); 234 RunTest();
233 } 235 }
234 236
235 } // namespace 237 } // namespace
236 } // namespace cc 238 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/layer_tree_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698