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

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

Issue 1111743002: cc: Adding DidFinishImplFrame to LTHI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing surfaces_scheduler. 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 unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 7646 matching lines...) Expand 10 before | Expand all | Expand 10 after
7657 7657
7658 TEST_F(LayerTreeHostImplTest, AddVideoFrameControllerInsideFrame) { 7658 TEST_F(LayerTreeHostImplTest, AddVideoFrameControllerInsideFrame) {
7659 BeginFrameArgs begin_frame_args = 7659 BeginFrameArgs begin_frame_args =
7660 CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE); 7660 CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE);
7661 FakeVideoFrameController controller; 7661 FakeVideoFrameController controller;
7662 7662
7663 host_impl_->WillBeginImplFrame(begin_frame_args); 7663 host_impl_->WillBeginImplFrame(begin_frame_args);
7664 EXPECT_FALSE(controller.begin_frame_args().IsValid()); 7664 EXPECT_FALSE(controller.begin_frame_args().IsValid());
7665 host_impl_->AddVideoFrameController(&controller); 7665 host_impl_->AddVideoFrameController(&controller);
7666 EXPECT_TRUE(controller.begin_frame_args().IsValid()); 7666 EXPECT_TRUE(controller.begin_frame_args().IsValid());
7667 host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); 7667 host_impl_->DidFinishImplFrame();
7668 } 7668 }
7669 7669
7670 TEST_F(LayerTreeHostImplTest, AddVideoFrameControllerOutsideFrame) { 7670 TEST_F(LayerTreeHostImplTest, AddVideoFrameControllerOutsideFrame) {
7671 BeginFrameArgs begin_frame_args = 7671 BeginFrameArgs begin_frame_args =
7672 CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE); 7672 CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE);
7673 FakeVideoFrameController controller; 7673 FakeVideoFrameController controller;
7674 7674
7675 host_impl_->WillBeginImplFrame(begin_frame_args); 7675 host_impl_->WillBeginImplFrame(begin_frame_args);
7676 host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); 7676 host_impl_->DidFinishImplFrame();
7677 7677
7678 EXPECT_FALSE(controller.begin_frame_args().IsValid()); 7678 EXPECT_FALSE(controller.begin_frame_args().IsValid());
7679 host_impl_->AddVideoFrameController(&controller); 7679 host_impl_->AddVideoFrameController(&controller);
7680 EXPECT_FALSE(controller.begin_frame_args().IsValid()); 7680 EXPECT_FALSE(controller.begin_frame_args().IsValid());
7681 7681
7682 begin_frame_args = CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE); 7682 begin_frame_args = CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE);
7683 EXPECT_FALSE(controller.begin_frame_args().IsValid()); 7683 EXPECT_FALSE(controller.begin_frame_args().IsValid());
7684 host_impl_->WillBeginImplFrame(begin_frame_args); 7684 host_impl_->WillBeginImplFrame(begin_frame_args);
7685 EXPECT_TRUE(controller.begin_frame_args().IsValid()); 7685 EXPECT_TRUE(controller.begin_frame_args().IsValid());
7686 } 7686 }
7687 7687
7688 } // namespace 7688 } // namespace
7689 } // namespace cc 7689 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698