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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 787763006: cc: Adding BeginFrameTracker object and removing Now() from LTHI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase onto master. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl_unittest.cc
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index 5c7488cbff7dbb3b31aa5095593a3c482b7e55ec..637781820201f9da79808a99e32a61707f6ca4f1 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -180,6 +180,9 @@ class LayerTreeHostImplTest : public testing::Test,
task_graph_runner_.get(), 0);
bool init = host_impl_->InitializeRenderer(output_surface.Pass());
host_impl_->SetViewportSize(gfx::Size(10, 10));
+ // Set the BeginFrameArgs so that methods which use it are able to.
+ host_impl_->WillBeginImplFrame(
+ CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE));
return init;
}
@@ -5119,6 +5122,8 @@ TEST_F(LayerTreeHostImplTest, PartialSwapReceivesDamageRect) {
settings, this, &proxy_, &stats_instrumentation_,
shared_bitmap_manager_.get(), NULL, task_graph_runner_.get(), 0);
layer_tree_host_impl->InitializeRenderer(output_surface.Pass());
+ layer_tree_host_impl->WillBeginImplFrame(
+ CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE));
layer_tree_host_impl->SetViewportSize(gfx::Size(500, 500));
scoped_ptr<LayerImpl> root =
@@ -5407,6 +5412,8 @@ static scoped_ptr<LayerTreeHostImpl> SetupLayersForOpacity(
scoped_ptr<LayerTreeHostImpl> my_host_impl = LayerTreeHostImpl::Create(
settings, client, proxy, stats_instrumentation, manager, NULL, NULL, 0);
my_host_impl->InitializeRenderer(output_surface.Pass());
+ my_host_impl->WillBeginImplFrame(
+ CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE));
my_host_impl->SetViewportSize(gfx::Size(100, 100));
/*
@@ -7758,6 +7765,8 @@ class FakeVideoFrameController : public VideoFrameController {
};
TEST_F(LayerTreeHostImplTest, AddVideoFrameControllerInsideFrame) {
+ host_impl_->DidFinishImplFrame();
+
BeginFrameArgs begin_frame_args =
CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE);
FakeVideoFrameController controller;
@@ -7770,6 +7779,8 @@ TEST_F(LayerTreeHostImplTest, AddVideoFrameControllerInsideFrame) {
}
TEST_F(LayerTreeHostImplTest, AddVideoFrameControllerOutsideFrame) {
+ host_impl_->DidFinishImplFrame();
+
BeginFrameArgs begin_frame_args =
CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE);
FakeVideoFrameController controller;
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698