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

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

Issue 1126963006: Move VISUAL_STATE promise to activation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Current state (presubmit warnings, cc_unittests tests failing) 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
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 6483 matching lines...) Expand 10 before | Expand all | Expand 10 after
6494 6494
6495 const std::vector<ui::LatencyInfo>& metadata_latency_before = 6495 const std::vector<ui::LatencyInfo>& metadata_latency_before =
6496 fake_output_surface->last_sent_frame().metadata.latency_info; 6496 fake_output_surface->last_sent_frame().metadata.latency_info;
6497 EXPECT_TRUE(metadata_latency_before.empty()); 6497 EXPECT_TRUE(metadata_latency_before.empty());
6498 6498
6499 ui::LatencyInfo latency_info; 6499 ui::LatencyInfo latency_info;
6500 latency_info.AddLatencyNumber( 6500 latency_info.AddLatencyNumber(
6501 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, 0, 0); 6501 ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, 0, 0);
6502 scoped_ptr<SwapPromise> swap_promise( 6502 scoped_ptr<SwapPromise> swap_promise(
6503 new LatencyInfoSwapPromise(latency_info)); 6503 new LatencyInfoSwapPromise(latency_info));
6504 host_impl_->active_tree()->QueueSwapPromise(swap_promise.Pass()); 6504 host_impl_->active_tree()->QueuePromise(swap_promise.Pass());
6505 host_impl_->SetNeedsRedraw(); 6505 host_impl_->SetNeedsRedraw();
6506 6506
6507 gfx::Rect full_frame_damage(host_impl_->DrawViewportSize()); 6507 gfx::Rect full_frame_damage(host_impl_->DrawViewportSize());
6508 LayerTreeHostImpl::FrameData frame; 6508 LayerTreeHostImpl::FrameData frame;
6509 EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame)); 6509 EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame));
6510 host_impl_->DrawLayers(&frame); 6510 host_impl_->DrawLayers(&frame);
6511 host_impl_->DidDrawAllLayers(frame); 6511 host_impl_->DidDrawAllLayers(frame);
6512 EXPECT_TRUE(host_impl_->SwapBuffers(frame)); 6512 EXPECT_TRUE(host_impl_->SwapBuffers(frame));
6513 6513
6514 const std::vector<ui::LatencyInfo>& metadata_latency_after = 6514 const std::vector<ui::LatencyInfo>& metadata_latency_after =
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after
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

Powered by Google App Engine
This is Rietveld 408576698