latency: Remove unused types for LatencyInfo.
A few LatencyInfo objects are created with FRAME event-source for every frame, and some components are stuffed into these LatencyInfo objects. But these are never used to generate any metrics. The desired metrics out of these are currently generated by CompositorFrameReporter, and so these can now be removed. Consequently, a lot fewer LatencyInfo objects will be created (which has often caused various performance related regressions). BUG=1005377, 849719 Change-Id: I62ffd47647147fc712563829e81f98ef56275dfc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1811520 Commit-Queue: Sadrul Chowdhury <sadrul@chromium.org> Commit-Queue: Mohsen Izadi <mohsen@chromium.org> Reviewed-by: Mohsen Izadi <mohsen@chromium.org> Reviewed-by: Ken Buchanan <kenrb@chromium.org> Auto-Submit: Sadrul Chowdhury <sadrul@chromium.org> Cr-Commit-Position: refs/heads/master@{#698197}
This commit is contained in:

committed by
Commit Bot

parent
c71b51fe5c
commit
a8f7ed59d0
cc/trees
components/viz/service
ui/latency
@ -2356,15 +2356,7 @@ viz::CompositorFrame LayerTreeHostImpl::GenerateCompositorFrame(
|
||||
active_tree()->TakeForceSendMetadataRequest());
|
||||
}
|
||||
|
||||
metadata.latency_info.emplace_back(ui::SourceEventType::FRAME);
|
||||
ui::LatencyInfo& new_latency_info = metadata.latency_info.back();
|
||||
if (CommitToActiveTree()) {
|
||||
new_latency_info.AddLatencyNumberWithTimestamp(
|
||||
ui::LATENCY_BEGIN_FRAME_UI_COMPOSITOR_COMPONENT, frame_time);
|
||||
} else {
|
||||
new_latency_info.AddLatencyNumberWithTimestamp(
|
||||
ui::LATENCY_BEGIN_FRAME_RENDERER_COMPOSITOR_COMPONENT, frame_time);
|
||||
|
||||
if (!CommitToActiveTree()) {
|
||||
base::TimeTicks draw_time = base::TimeTicks::Now();
|
||||
for (auto& latency : metadata.latency_info) {
|
||||
latency.AddLatencyNumberWithTimestamp(
|
||||
|
@ -9538,42 +9538,19 @@ TEST_F(LayerTreeHostImplTest, ScrollInvisibleScroller) {
|
||||
host_impl_->CurrentlyScrollingNode()->id);
|
||||
}
|
||||
|
||||
template <bool commit_to_active_tree>
|
||||
class LayerTreeHostImplLatencyInfoTest : public LayerTreeHostImplTest {
|
||||
public:
|
||||
void SetUp() override {
|
||||
LayerTreeSettings settings = DefaultSettings();
|
||||
settings.commit_to_active_tree = commit_to_active_tree;
|
||||
CreateHostImpl(settings, CreateLayerTreeFrameSink());
|
||||
SetupRootLayer<SolidColorLayerImpl>(host_impl_->active_tree(),
|
||||
gfx::Size(10, 10));
|
||||
UpdateDrawProperties(host_impl_->active_tree());
|
||||
}
|
||||
};
|
||||
// Make sure LatencyInfo carried by LatencyInfoSwapPromise are passed
|
||||
// in viz::CompositorFrameMetadata.
|
||||
TEST_F(LayerTreeHostImplTest, LatencyInfoPassedToCompositorFrameMetadata) {
|
||||
LayerTreeSettings settings = DefaultSettings();
|
||||
settings.commit_to_active_tree = false;
|
||||
CreateHostImpl(settings, CreateLayerTreeFrameSink());
|
||||
SetupRootLayer<SolidColorLayerImpl>(host_impl_->active_tree(),
|
||||
gfx::Size(10, 10));
|
||||
UpdateDrawProperties(host_impl_->active_tree());
|
||||
|
||||
// Make sure LatencyInfo are passed in viz::CompositorFrameMetadata properly in
|
||||
// the Renderer. This includes components added by LatencyInfoSwapPromise and
|
||||
// the default LATENCY_BEGIN_FRAME_RENDERER_COMPOSITOR_COMPONENT.
|
||||
using LayerTreeHostImplLatencyInfoRendererTest =
|
||||
LayerTreeHostImplLatencyInfoTest<false>;
|
||||
TEST_F(LayerTreeHostImplLatencyInfoRendererTest,
|
||||
LatencyInfoPassedToCompositorFrameMetadataRenderer) {
|
||||
auto* fake_layer_tree_frame_sink =
|
||||
static_cast<FakeLayerTreeFrameSink*>(host_impl_->layer_tree_frame_sink());
|
||||
|
||||
// The first frame should only have the default BeginFrame component.
|
||||
DrawFrame();
|
||||
|
||||
const std::vector<ui::LatencyInfo>& metadata_latency_after1 =
|
||||
fake_layer_tree_frame_sink->last_sent_frame()->metadata.latency_info;
|
||||
EXPECT_EQ(1u, metadata_latency_after1.size());
|
||||
EXPECT_TRUE(metadata_latency_after1[0].FindLatency(
|
||||
ui::LATENCY_BEGIN_FRAME_RENDERER_COMPOSITOR_COMPONENT, nullptr));
|
||||
EXPECT_TRUE(metadata_latency_after1[0].FindLatency(
|
||||
ui::INPUT_EVENT_LATENCY_RENDERER_SWAP_COMPONENT, nullptr));
|
||||
|
||||
// The second frame should have the default BeginFrame component and the
|
||||
// component attached via LatencyInfoSwapPromise.
|
||||
ui::LatencyInfo latency_info;
|
||||
latency_info.set_trace_id(5);
|
||||
latency_info.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT);
|
||||
@ -9585,68 +9562,11 @@ TEST_F(LayerTreeHostImplLatencyInfoRendererTest,
|
||||
host_impl_->SetNeedsRedraw();
|
||||
DrawFrame();
|
||||
|
||||
const std::vector<ui::LatencyInfo>& metadata_latency_after2 =
|
||||
const auto& metadata_latency_after =
|
||||
fake_layer_tree_frame_sink->last_sent_frame()->metadata.latency_info;
|
||||
EXPECT_EQ(2u, metadata_latency_after2.size());
|
||||
EXPECT_TRUE(metadata_latency_after2[0].FindLatency(
|
||||
EXPECT_EQ(1u, metadata_latency_after.size());
|
||||
EXPECT_TRUE(metadata_latency_after[0].FindLatency(
|
||||
ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, nullptr));
|
||||
EXPECT_TRUE(metadata_latency_after2[1].FindLatency(
|
||||
ui::LATENCY_BEGIN_FRAME_RENDERER_COMPOSITOR_COMPONENT, nullptr));
|
||||
|
||||
// Renderer should also record INPUT_EVENT_LATENCY_RENDERER_SWAP_COMPONENT.
|
||||
EXPECT_TRUE(metadata_latency_after2[0].FindLatency(
|
||||
ui::INPUT_EVENT_LATENCY_RENDERER_SWAP_COMPONENT, nullptr));
|
||||
EXPECT_TRUE(metadata_latency_after2[1].FindLatency(
|
||||
ui::INPUT_EVENT_LATENCY_RENDERER_SWAP_COMPONENT, nullptr));
|
||||
}
|
||||
|
||||
// Make sure LatencyInfo are passed in viz::CompositorFrameMetadata properly in
|
||||
// the UI. This includes components added by LatencyInfoSwapPromise and
|
||||
// the default LATENCY_BEGIN_FRAME_UI_COMPOSITOR_COMPONENT.
|
||||
using LayerTreeHostImplLatencyInfoUITest =
|
||||
LayerTreeHostImplLatencyInfoTest<true>;
|
||||
TEST_F(LayerTreeHostImplLatencyInfoUITest,
|
||||
LatencyInfoPassedToCompositorFrameMetadataUI) {
|
||||
auto* fake_layer_tree_frame_sink =
|
||||
static_cast<FakeLayerTreeFrameSink*>(host_impl_->layer_tree_frame_sink());
|
||||
|
||||
// The first frame should only have the default BeginFrame component.
|
||||
DrawFrame();
|
||||
|
||||
const std::vector<ui::LatencyInfo>& metadata_latency_after1 =
|
||||
fake_layer_tree_frame_sink->last_sent_frame()->metadata.latency_info;
|
||||
EXPECT_EQ(1u, metadata_latency_after1.size());
|
||||
EXPECT_TRUE(metadata_latency_after1[0].FindLatency(
|
||||
ui::LATENCY_BEGIN_FRAME_UI_COMPOSITOR_COMPONENT, nullptr));
|
||||
EXPECT_FALSE(metadata_latency_after1[0].FindLatency(
|
||||
ui::INPUT_EVENT_LATENCY_RENDERER_SWAP_COMPONENT, nullptr));
|
||||
|
||||
// The second frame should have the default BeginFrame component and the
|
||||
// component attached via LatencyInfoSwapPromise.
|
||||
ui::LatencyInfo latency_info;
|
||||
latency_info.set_trace_id(5);
|
||||
latency_info.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT);
|
||||
std::unique_ptr<SwapPromise> swap_promise(
|
||||
new LatencyInfoSwapPromise(latency_info));
|
||||
host_impl_->active_tree()->QueuePinnedSwapPromise(std::move(swap_promise));
|
||||
|
||||
host_impl_->SetFullViewportDamage();
|
||||
host_impl_->SetNeedsRedraw();
|
||||
DrawFrame();
|
||||
|
||||
const std::vector<ui::LatencyInfo>& metadata_latency_after2 =
|
||||
fake_layer_tree_frame_sink->last_sent_frame()->metadata.latency_info;
|
||||
EXPECT_EQ(2u, metadata_latency_after2.size());
|
||||
EXPECT_TRUE(metadata_latency_after2[0].FindLatency(
|
||||
ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, nullptr));
|
||||
EXPECT_TRUE(metadata_latency_after2[1].FindLatency(
|
||||
ui::LATENCY_BEGIN_FRAME_UI_COMPOSITOR_COMPONENT, nullptr));
|
||||
|
||||
// UI should not record INPUT_EVENT_LATENCY_RENDERER_SWAP_COMPONENT.
|
||||
EXPECT_FALSE(metadata_latency_after2[0].FindLatency(
|
||||
ui::INPUT_EVENT_LATENCY_RENDERER_SWAP_COMPONENT, nullptr));
|
||||
EXPECT_FALSE(metadata_latency_after2[1].FindLatency(
|
||||
ui::INPUT_EVENT_LATENCY_RENDERER_SWAP_COMPONENT, nullptr));
|
||||
}
|
||||
|
||||
#if defined(OS_ANDROID)
|
||||
|
@ -313,16 +313,6 @@ void ProxyMain::BeginMainFrame(
|
||||
return;
|
||||
}
|
||||
|
||||
// Queue the LATENCY_BEGIN_FRAME_RENDERER_MAIN_COMPONENT swap promise only
|
||||
// once we know we will commit since QueueSwapPromise itself requests a
|
||||
// commit.
|
||||
ui::LatencyInfo new_latency_info(ui::SourceEventType::FRAME);
|
||||
new_latency_info.AddLatencyNumberWithTimestamp(
|
||||
ui::LATENCY_BEGIN_FRAME_RENDERER_MAIN_COMPONENT,
|
||||
begin_main_frame_state->begin_frame_args.frame_time);
|
||||
layer_tree_host_->QueueSwapPromise(
|
||||
std::make_unique<LatencyInfoSwapPromise>(new_latency_info));
|
||||
|
||||
current_pipeline_stage_ = NO_PIPELINE_STAGE;
|
||||
|
||||
// Notify the impl thread that the main thread is ready to commit. This will
|
||||
|
@ -840,14 +840,6 @@ void SingleThreadProxy::BeginMainFrame(
|
||||
return;
|
||||
}
|
||||
|
||||
// Queue the LATENCY_BEGIN_FRAME_UI_MAIN_COMPONENT swap promise only once we
|
||||
// know we will commit since QueueSwapPromise itself requests a commit.
|
||||
ui::LatencyInfo new_latency_info(ui::SourceEventType::FRAME);
|
||||
new_latency_info.AddLatencyNumberWithTimestamp(
|
||||
ui::LATENCY_BEGIN_FRAME_UI_MAIN_COMPONENT, begin_frame_args.frame_time);
|
||||
layer_tree_host_->QueueSwapPromise(
|
||||
std::make_unique<LatencyInfoSwapPromise>(new_latency_info));
|
||||
|
||||
DoPainting();
|
||||
}
|
||||
|
||||
|
@ -604,13 +604,6 @@ bool Display::DrawAndSwap() {
|
||||
swapped_trace_id_, "Swap");
|
||||
swapped_since_resize_ = true;
|
||||
|
||||
if (scheduler_) {
|
||||
frame.metadata.latency_info.emplace_back(ui::SourceEventType::FRAME);
|
||||
frame.metadata.latency_info.back().AddLatencyNumberWithTimestamp(
|
||||
ui::LATENCY_BEGIN_FRAME_DISPLAY_COMPOSITOR_COMPONENT,
|
||||
scheduler_->current_frame_time());
|
||||
}
|
||||
|
||||
ui::LatencyInfo::TraceIntermediateFlowEvents(frame.metadata.latency_info,
|
||||
"Display::DrawAndSwap");
|
||||
|
||||
|
@ -314,8 +314,7 @@ TEST_F(DisplayTest, DisplayDamaged) {
|
||||
software_output_device_->viewport_pixel_size());
|
||||
EXPECT_EQ(gfx::Rect(10, 10, 1, 1), software_output_device_->damage_rect());
|
||||
|
||||
// Display should inject its own LatencyInfo.
|
||||
EXPECT_EQ(1u, output_surface_->last_sent_frame()->latency_info.size());
|
||||
EXPECT_EQ(0u, output_surface_->last_sent_frame()->latency_info.size());
|
||||
}
|
||||
|
||||
// Pass has no damage so shouldn't be swapped.
|
||||
@ -398,9 +397,7 @@ TEST_F(DisplayTest, DisplayDamaged) {
|
||||
EXPECT_EQ(gfx::Rect(0, 0, 100, 100),
|
||||
software_output_device_->damage_rect());
|
||||
|
||||
// Latency info from previous frame should be sent now, along with the
|
||||
// Display's info.
|
||||
EXPECT_EQ(2u, output_surface_->last_sent_frame()->latency_info.size());
|
||||
EXPECT_EQ(1u, output_surface_->last_sent_frame()->latency_info.size());
|
||||
}
|
||||
|
||||
// Pass has copy output request so should be swapped.
|
||||
@ -487,10 +484,7 @@ TEST_F(DisplayTest, DisplayDamaged) {
|
||||
display_->Resize(gfx::Size(100, 100));
|
||||
EXPECT_TRUE(scheduler_->swapped);
|
||||
EXPECT_EQ(5u, output_surface_->num_sent_frames());
|
||||
|
||||
// Latency info from previous frame should have been discarded since
|
||||
// there was no damage. So we only get the Display's LatencyInfo.
|
||||
EXPECT_EQ(1u, output_surface_->last_sent_frame()->latency_info.size());
|
||||
EXPECT_EQ(0u, output_surface_->last_sent_frame()->latency_info.size());
|
||||
}
|
||||
|
||||
// Surface that's damaged completely should be resized and swapped.
|
||||
@ -521,9 +515,7 @@ TEST_F(DisplayTest, DisplayDamaged) {
|
||||
software_output_device_->viewport_pixel_size());
|
||||
EXPECT_EQ(gfx::Rect(0, 0, 100, 100),
|
||||
software_output_device_->damage_rect());
|
||||
|
||||
// Only expect the Display's LatencyInfo.
|
||||
EXPECT_EQ(1u, output_surface_->last_sent_frame()->latency_info.size());
|
||||
EXPECT_EQ(0u, output_surface_->last_sent_frame()->latency_info.size());
|
||||
}
|
||||
TearDownDisplay();
|
||||
}
|
||||
@ -552,7 +544,7 @@ void DisplayTest::LatencyInfoCapTest(bool over_capacity) {
|
||||
|
||||
display_->DrawAndSwap();
|
||||
EXPECT_EQ(1u, output_surface_->num_sent_frames());
|
||||
EXPECT_EQ(1u, output_surface_->last_sent_frame()->latency_info.size());
|
||||
EXPECT_EQ(0u, output_surface_->last_sent_frame()->latency_info.size());
|
||||
|
||||
// Resize so the swap fails even though there's damage, which triggers
|
||||
// the case where we store latency info to append to a future swap.
|
||||
@ -573,7 +565,7 @@ void DisplayTest::LatencyInfoCapTest(bool over_capacity) {
|
||||
|
||||
EXPECT_TRUE(display_->DrawAndSwap());
|
||||
EXPECT_EQ(1u, output_surface_->num_sent_frames());
|
||||
EXPECT_EQ(1u, output_surface_->last_sent_frame()->latency_info.size());
|
||||
EXPECT_EQ(0u, output_surface_->last_sent_frame()->latency_info.size());
|
||||
|
||||
// Run a successful swap and verify whether or not LatencyInfo was discarded.
|
||||
display_->Resize(gfx::Size(100, 100));
|
||||
@ -583,7 +575,7 @@ void DisplayTest::LatencyInfoCapTest(bool over_capacity) {
|
||||
EXPECT_TRUE(display_->DrawAndSwap());
|
||||
|
||||
// Verify whether or not LatencyInfo was dropped.
|
||||
size_t expected_size = 1; // The Display adds its own latency info.
|
||||
size_t expected_size = 0;
|
||||
if (!over_capacity)
|
||||
expected_size += max_latency_info_count;
|
||||
EXPECT_EQ(2u, output_surface_->num_sent_frames());
|
||||
|
@ -866,7 +866,7 @@ TEST_F(SurfaceSynchronizationTest, LimitLatencyInfo) {
|
||||
const ui::LatencyComponentType latency_type1 =
|
||||
ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT;
|
||||
const ui::LatencyComponentType latency_type2 =
|
||||
ui::LATENCY_BEGIN_FRAME_UI_MAIN_COMPONENT;
|
||||
ui::LATENCY_COMPONENT_TYPE_LAST;
|
||||
|
||||
// Submit a frame with latency info
|
||||
ui::LatencyInfo info;
|
||||
@ -920,7 +920,7 @@ TEST_F(SurfaceSynchronizationTest,
|
||||
const ui::LatencyComponentType latency_type1 =
|
||||
ui::INPUT_EVENT_LATENCY_RENDERER_SWAP_COMPONENT;
|
||||
const ui::LatencyComponentType latency_type2 =
|
||||
ui::LATENCY_BEGIN_FRAME_UI_MAIN_COMPONENT;
|
||||
ui::LATENCY_COMPONENT_TYPE_LAST;
|
||||
|
||||
// Submit a frame with latency info
|
||||
ui::LatencyInfo info;
|
||||
@ -992,7 +992,7 @@ TEST_F(SurfaceSynchronizationTest,
|
||||
const ui::LatencyComponentType latency_type1 =
|
||||
ui::INPUT_EVENT_LATENCY_RENDERER_SWAP_COMPONENT;
|
||||
const ui::LatencyComponentType latency_type2 =
|
||||
ui::LATENCY_BEGIN_FRAME_UI_MAIN_COMPONENT;
|
||||
ui::LATENCY_COMPONENT_TYPE_LAST;
|
||||
|
||||
// Submit a frame with no unresolved dependecy.
|
||||
ui::LatencyInfo info;
|
||||
@ -1066,7 +1066,7 @@ TEST_F(SurfaceSynchronizationTest,
|
||||
const ui::LatencyComponentType latency_type1 =
|
||||
ui::INPUT_EVENT_LATENCY_RENDERER_SWAP_COMPONENT;
|
||||
const ui::LatencyComponentType latency_type2 =
|
||||
ui::LATENCY_BEGIN_FRAME_UI_MAIN_COMPONENT;
|
||||
ui::LATENCY_COMPONENT_TYPE_LAST;
|
||||
|
||||
// Submit a frame with no unresolved dependencies.
|
||||
ui::LatencyInfo info;
|
||||
@ -1136,7 +1136,7 @@ TEST_F(SurfaceSynchronizationTest, LatencyInfoNotCarriedOVer) {
|
||||
const ui::LatencyComponentType latency_type1 =
|
||||
ui::INPUT_EVENT_LATENCY_RENDERER_SWAP_COMPONENT;
|
||||
const ui::LatencyComponentType latency_type2 =
|
||||
ui::LATENCY_BEGIN_FRAME_UI_MAIN_COMPONENT;
|
||||
ui::LATENCY_COMPONENT_TYPE_LAST;
|
||||
|
||||
// Submit a frame with latency info
|
||||
ui::LatencyInfo info;
|
||||
|
@ -25,12 +25,6 @@ const char* GetComponentName(ui::LatencyComponentType type) {
|
||||
switch (type) {
|
||||
CASE_TYPE(INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT);
|
||||
CASE_TYPE(LATENCY_BEGIN_SCROLL_LISTENER_UPDATE_MAIN_COMPONENT);
|
||||
CASE_TYPE(LATENCY_BEGIN_FRAME_RENDERER_MAIN_COMPONENT);
|
||||
CASE_TYPE(LATENCY_BEGIN_FRAME_RENDERER_INVALIDATE_COMPONENT);
|
||||
CASE_TYPE(LATENCY_BEGIN_FRAME_RENDERER_COMPOSITOR_COMPONENT);
|
||||
CASE_TYPE(LATENCY_BEGIN_FRAME_UI_MAIN_COMPONENT);
|
||||
CASE_TYPE(LATENCY_BEGIN_FRAME_UI_COMPOSITOR_COMPONENT);
|
||||
CASE_TYPE(LATENCY_BEGIN_FRAME_DISPLAY_COMPOSITOR_COMPONENT);
|
||||
CASE_TYPE(INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT);
|
||||
CASE_TYPE(INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL_COMPONENT);
|
||||
CASE_TYPE(INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT);
|
||||
|
@ -48,13 +48,6 @@ enum LatencyComponentType {
|
||||
// scroll processing in impl thread. This is the timestamp when we consider
|
||||
// the main thread scroll listener update is begun.
|
||||
LATENCY_BEGIN_SCROLL_LISTENER_UPDATE_MAIN_COMPONENT,
|
||||
// The BeginFrame::frame_time of various frame sources.
|
||||
LATENCY_BEGIN_FRAME_RENDERER_MAIN_COMPONENT,
|
||||
LATENCY_BEGIN_FRAME_RENDERER_INVALIDATE_COMPONENT,
|
||||
LATENCY_BEGIN_FRAME_RENDERER_COMPOSITOR_COMPONENT,
|
||||
LATENCY_BEGIN_FRAME_UI_MAIN_COMPONENT,
|
||||
LATENCY_BEGIN_FRAME_UI_COMPOSITOR_COMPONENT,
|
||||
LATENCY_BEGIN_FRAME_DISPLAY_COMPOSITOR_COMPONENT,
|
||||
// ---------------------------NORMAL COMPONENT-------------------------------
|
||||
// The original timestamp of the touch event which converts to scroll update.
|
||||
INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT,
|
||||
@ -104,7 +97,6 @@ enum class SourceEventType {
|
||||
KEY_PRESS,
|
||||
// TODO(crbug.com/868056) Touchpad scrolling latency report as WHEEL.
|
||||
TOUCHPAD,
|
||||
FRAME,
|
||||
SCROLLBAR,
|
||||
OTHER,
|
||||
LAST = OTHER,
|
||||
|
@ -15,13 +15,6 @@ enum LatencyComponentType {
|
||||
// scroll processing in impl thread. This is the timestamp when we consider
|
||||
// the main thread scroll listener update is begun.
|
||||
LATENCY_BEGIN_SCROLL_LISTENER_UPDATE_MAIN_COMPONENT,
|
||||
// The BeginFrame::frame_time of various frame sources.
|
||||
LATENCY_BEGIN_FRAME_RENDERER_MAIN_COMPONENT,
|
||||
LATENCY_BEGIN_FRAME_RENDERER_INVALIDATE_COMPONENT,
|
||||
LATENCY_BEGIN_FRAME_RENDERER_COMPOSITOR_COMPONENT,
|
||||
LATENCY_BEGIN_FRAME_UI_MAIN_COMPONENT,
|
||||
LATENCY_BEGIN_FRAME_UI_COMPOSITOR_COMPONENT,
|
||||
LATENCY_BEGIN_FRAME_DISPLAY_COMPOSITOR_COMPONENT,
|
||||
// ---------------------------NORMAL COMPONENT-------------------------------
|
||||
// The original timestamp of the touch event which converts to scroll update.
|
||||
INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT,
|
||||
@ -67,7 +60,6 @@ enum SourceEventType {
|
||||
INERTIAL,
|
||||
KEY_PRESS,
|
||||
TOUCHPAD,
|
||||
FRAME,
|
||||
SCROLLBAR,
|
||||
OTHER,
|
||||
};
|
||||
|
@ -26,8 +26,6 @@ ui::mojom::SourceEventType UISourceEventTypeToMojo(ui::SourceEventType type) {
|
||||
return ui::mojom::SourceEventType::KEY_PRESS;
|
||||
case ui::SourceEventType::TOUCHPAD:
|
||||
return ui::mojom::SourceEventType::TOUCHPAD;
|
||||
case ui::SourceEventType::FRAME:
|
||||
return ui::mojom::SourceEventType::FRAME;
|
||||
case ui::SourceEventType::SCROLLBAR:
|
||||
return ui::mojom::SourceEventType::SCROLLBAR;
|
||||
case ui::SourceEventType::OTHER:
|
||||
@ -53,8 +51,6 @@ ui::SourceEventType MojoSourceEventTypeToUI(ui::mojom::SourceEventType type) {
|
||||
return ui::SourceEventType::KEY_PRESS;
|
||||
case ui::mojom::SourceEventType::TOUCHPAD:
|
||||
return ui::SourceEventType::TOUCHPAD;
|
||||
case ui::mojom::SourceEventType::FRAME:
|
||||
return ui::SourceEventType::FRAME;
|
||||
case ui::mojom::SourceEventType::SCROLLBAR:
|
||||
return ui::SourceEventType::SCROLLBAR;
|
||||
case ui::mojom::SourceEventType::OTHER:
|
||||
@ -162,24 +158,6 @@ EnumTraits<ui::mojom::LatencyComponentType, ui::LatencyComponentType>::ToMojom(
|
||||
case ui::LATENCY_BEGIN_SCROLL_LISTENER_UPDATE_MAIN_COMPONENT:
|
||||
return ui::mojom::LatencyComponentType::
|
||||
LATENCY_BEGIN_SCROLL_LISTENER_UPDATE_MAIN_COMPONENT;
|
||||
case ui::LATENCY_BEGIN_FRAME_RENDERER_MAIN_COMPONENT:
|
||||
return ui::mojom::LatencyComponentType::
|
||||
LATENCY_BEGIN_FRAME_RENDERER_MAIN_COMPONENT;
|
||||
case ui::LATENCY_BEGIN_FRAME_RENDERER_INVALIDATE_COMPONENT:
|
||||
return ui::mojom::LatencyComponentType::
|
||||
LATENCY_BEGIN_FRAME_RENDERER_INVALIDATE_COMPONENT;
|
||||
case ui::LATENCY_BEGIN_FRAME_RENDERER_COMPOSITOR_COMPONENT:
|
||||
return ui::mojom::LatencyComponentType::
|
||||
LATENCY_BEGIN_FRAME_RENDERER_COMPOSITOR_COMPONENT;
|
||||
case ui::LATENCY_BEGIN_FRAME_UI_MAIN_COMPONENT:
|
||||
return ui::mojom::LatencyComponentType::
|
||||
LATENCY_BEGIN_FRAME_UI_MAIN_COMPONENT;
|
||||
case ui::LATENCY_BEGIN_FRAME_UI_COMPOSITOR_COMPONENT:
|
||||
return ui::mojom::LatencyComponentType::
|
||||
LATENCY_BEGIN_FRAME_UI_COMPOSITOR_COMPONENT;
|
||||
case ui::LATENCY_BEGIN_FRAME_DISPLAY_COMPOSITOR_COMPONENT:
|
||||
return ui::mojom::LatencyComponentType::
|
||||
LATENCY_BEGIN_FRAME_DISPLAY_COMPOSITOR_COMPONENT;
|
||||
case ui::INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT:
|
||||
return ui::mojom::LatencyComponentType::
|
||||
INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT;
|
||||
@ -239,29 +217,6 @@ bool EnumTraits<ui::mojom::LatencyComponentType, ui::LatencyComponentType>::
|
||||
LATENCY_BEGIN_SCROLL_LISTENER_UPDATE_MAIN_COMPONENT:
|
||||
*output = ui::LATENCY_BEGIN_SCROLL_LISTENER_UPDATE_MAIN_COMPONENT;
|
||||
return true;
|
||||
case ui::mojom::LatencyComponentType::
|
||||
LATENCY_BEGIN_FRAME_RENDERER_MAIN_COMPONENT:
|
||||
*output = ui::LATENCY_BEGIN_FRAME_RENDERER_MAIN_COMPONENT;
|
||||
return true;
|
||||
case ui::mojom::LatencyComponentType::
|
||||
LATENCY_BEGIN_FRAME_RENDERER_INVALIDATE_COMPONENT:
|
||||
*output = ui::LATENCY_BEGIN_FRAME_RENDERER_INVALIDATE_COMPONENT;
|
||||
return true;
|
||||
case ui::mojom::LatencyComponentType::
|
||||
LATENCY_BEGIN_FRAME_RENDERER_COMPOSITOR_COMPONENT:
|
||||
*output = ui::LATENCY_BEGIN_FRAME_RENDERER_COMPOSITOR_COMPONENT;
|
||||
return true;
|
||||
case ui::mojom::LatencyComponentType::LATENCY_BEGIN_FRAME_UI_MAIN_COMPONENT:
|
||||
*output = ui::LATENCY_BEGIN_FRAME_UI_MAIN_COMPONENT;
|
||||
return true;
|
||||
case ui::mojom::LatencyComponentType::
|
||||
LATENCY_BEGIN_FRAME_UI_COMPOSITOR_COMPONENT:
|
||||
*output = ui::LATENCY_BEGIN_FRAME_UI_COMPOSITOR_COMPONENT;
|
||||
return true;
|
||||
case ui::mojom::LatencyComponentType::
|
||||
LATENCY_BEGIN_FRAME_DISPLAY_COMPOSITOR_COMPONENT:
|
||||
*output = ui::LATENCY_BEGIN_FRAME_DISPLAY_COMPOSITOR_COMPONENT;
|
||||
return true;
|
||||
case ui::mojom::LatencyComponentType::
|
||||
INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT:
|
||||
*output = ui::INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT;
|
||||
|
Reference in New Issue
Block a user