Commit e77d1b16 authored by Sadrul Habib Chowdhury's avatar Sadrul Habib Chowdhury Committed by Commit Bot

cc: Fix propagation of presentation-time request.

Make sure the request for presentation-time gets propagated correcly
from the pending-tree to the active-tree, so that if presentation-time
is requested on LayerTreeHost, it reaches all the way through to the
CompositorFrame.

BUG=811961

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I4745a1b49ed5e404610c6f491e7f98d541b178be
Reviewed-on: https://chromium-review.googlesource.com/1056360Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
Commit-Queue: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558539}
parent 50d89e7d
......@@ -7512,6 +7512,25 @@ class LayerTreeHostTestPaintedDeviceScaleFactor : public LayerTreeHostTest {
};
SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPaintedDeviceScaleFactor);
// Makes sure that presentation-time requests are correctly propagated to the
// frame's metadata.
class LayerTreeHostTestPresentationTimeRequest : public LayerTreeHostTest {
protected:
void BeginTest() override {
layer_tree_host()->RequestPresentationTimeForNextFrame(base::DoNothing());
PostSetNeedsCommitToMainThread();
}
void DisplayReceivedCompositorFrameOnThread(
const viz::CompositorFrame& frame) override {
EXPECT_NE(0u, frame.metadata.presentation_token);
EndTest();
}
void AfterTest() override {}
};
SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPresentationTimeRequest);
// Makes sure that viz::LocalSurfaceId is propagated to the LayerTreeFrameSink.
class LayerTreeHostTestLocalSurfaceId : public LayerTreeHostTest {
protected:
......
......@@ -468,6 +468,7 @@ void LayerTreeImpl::PushPropertiesTo(LayerTreeImpl* target_tree) {
target_tree->elastic_overscroll()->PushPendingToActive();
target_tree->set_content_source_id(content_source_id());
target_tree->set_request_presentation_time(request_presentation_time());
if (TakeNewLocalSurfaceIdRequest())
target_tree->RequestNewLocalSurfaceId();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment