Commit 071ec809 authored by Sadrul Habib Chowdhury's avatar Sadrul Habib Chowdhury Committed by Commit Bot

[cc/metrics] De-flake a test.

The test wants to send a begin-main-frame for every frame. However,
posting a task on the main-thread to request 'begin main frame' can
be too slow in some configs (e.g. in asan/tsan etc. builds). There
is a more direct way of forcing a 'begin main frame' to be issued
directly from the compositor thread through LayerTreeHostImpl. So
use that to have a more deterministic behaviour.

BUG=1115376

Change-Id: I9ba0304be6f271f9b8025bcd2d82ce1470e9fd38
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2383313
Auto-Submit: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Xida Chen <xidachen@chromium.org>
Reviewed-by: default avatarXida Chen <xidachen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803191}
parent b7bc2726
......@@ -55,7 +55,7 @@ class DroppedFrameCounterTestBase : public LayerTreeTest {
host_impl->SetViewportDamage(gfx::Rect(0, 0, 10, 20));
// Request update from the main-thread too.
PostSetNeedsCommitToMainThread();
host_impl->SetNeedsCommit();
}
void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
......
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