Skip to content

Commit

Permalink
Move LatencyInfo to ui/latency_info
Browse files Browse the repository at this point in the history
Components such as cc/ and gpu/ that depend on ui::LatencyInfo
should not pull in all of ui/events.

This CL pulls ui::LatencyInfo into a separate component to
simplify this dependency. cc/ and gpu/ no longer depend on
ui/events.

BUG=601871
TBR=jam@chromium.org for top level BUILD.gn and build/all.gyp
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Committed: https://crrev.com/168cca4ea0abb22aa05575ec94c35d429dc08993
Cr-Commit-Position: refs/heads/master@{#386889}

Review URL: https://codereview.chromium.org/1871233002

Cr-Commit-Position: refs/heads/master@{#386992}
  • Loading branch information
fsamuel authored and Commit bot committed Apr 13, 2016
1 parent 2dc73f8 commit 7cc1dcc
Show file tree
Hide file tree
Showing 87 changed files with 349 additions and 233 deletions.
1 change: 1 addition & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ group("both_gn_and_gyp") {
"//ui/display:display_unittests",
"//ui/events:events_unittests",
"//ui/gl:gl_unittests",
"//ui/latency_info:latency_info_unittests",
"//ui/touch_selection:ui_touch_selection_unittests",
"//url/ipc:url_ipc_unittests",
]
Expand Down
5 changes: 5 additions & 0 deletions build/all.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,7 @@
'../ui/android/ui_android.gyp:ui_android_unittests',
'../ui/base/ui_base_tests.gyp:ui_base_unittests',
'../ui/events/events_unittests.gyp:events_unittests',
'../ui/latency_info/latency_info_unittests.gyp:latency_info_unittests',
'../ui/touch_selection/ui_touch_selection.gyp:ui_touch_selection_unittests',
# Unit test bundles packaged as an apk.
'../base/base.gyp:base_unittests_apk',
Expand Down Expand Up @@ -855,6 +856,7 @@
'../ui/events/events_unittests.gyp:events_unittests_apk',
'../ui/gfx/gfx_tests.gyp:gfx_unittests_apk',
'../ui/gl/gl_tests.gyp:gl_unittests_apk',
'../ui/latency_info/latency_info_unittests.gyp:latency_info_unittests',
'../ui/touch_selection/ui_touch_selection.gyp:ui_touch_selection_unittests_apk',
],
'conditions': [
Expand Down Expand Up @@ -1054,6 +1056,7 @@
'../ui/events/events_unittests.gyp:events_unittests',
'../ui/gfx/gfx_tests.gyp:gfx_unittests',
'../ui/gl/gl_tests.gyp:gl_unittests',
'../ui/latency_info/latency_info_unittests.gyp:latency_info_unittests',
'../ui/touch_selection/ui_touch_selection.gyp:ui_touch_selection_unittests',
'../ui/views/views.gyp:views_unittests',
'../url/url.gyp:url_unittests',
Expand Down Expand Up @@ -1157,6 +1160,7 @@
'../ui/gfx/gfx_tests.gyp:gfx_unittests',
'../ui/gl/gl_tests.gyp:gl_unittests',
'../ui/keyboard/keyboard.gyp:keyboard_unittests',
'../ui/latency_info/latency_info_unittests.gyp:latency_info_unittests',
'../ui/touch_selection/ui_touch_selection.gyp:ui_touch_selection_unittests',
'../url/url.gyp:url_unittests',
],
Expand Down Expand Up @@ -1275,6 +1279,7 @@
'../ui/events/events.gyp:*',
'../ui/gfx/gfx_tests.gyp:gfx_unittests',
'../ui/gl/gl_tests.gyp:gl_unittests',
'../ui/latency_info/latency_info.gyp:*',
'../ui/keyboard/keyboard.gyp:*',
'../ui/snapshot/snapshot.gyp:snapshot_unittests',
'../ui/touch_selection/ui_touch_selection.gyp:ui_touch_selection_unittests',
Expand Down
4 changes: 2 additions & 2 deletions cc/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -554,10 +554,10 @@ component("cc") {
"//gpu",
"//gpu/command_buffer/client:gles2_interface",
"//media",
"//ui/events:events_base",
"//ui/gfx",
"//ui/gfx/geometry",
"//ui/gl",
"//ui/latency_info",
]

defines = [ "CC_IMPLEMENTATION=1" ]
Expand Down Expand Up @@ -952,12 +952,12 @@ test("cc_unittests") {
"//media",
"//testing/gmock",
"//testing/gtest",
"//ui/events:events_base",
"//ui/gfx",
"//ui/gfx:test_support",
"//ui/gfx/geometry",
"//ui/gl",
"//ui/gl:test_support",
"//ui/latency_info",
]

data_deps = [
Expand Down
2 changes: 1 addition & 1 deletion cc/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ include_rules = [
"+third_party/khronos/GLES2/gl2.h",
"+third_party/khronos/GLES2/gl2ext.h",
"+third_party/skia/include",
"+ui/events/latency_info.h",
"+ui/latency_info",
"+ui/gfx",
"+ui/gl",
"-cc/blink",
Expand Down
4 changes: 2 additions & 2 deletions cc/cc.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
'<(DEPTH)/media/media.gyp:media',
'<(DEPTH)/skia/skia.gyp:skia',
'<(DEPTH)/third_party/protobuf/protobuf.gyp:protobuf_lite',
'<(DEPTH)/ui/events/events.gyp:events_base',
'<(DEPTH)/ui/gfx/gfx.gyp:gfx',
'<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry',
'<(DEPTH)/ui/gl/gl.gyp:gl',
"<(DEPTH)/ui/latency_info/latency_info.gyp:latency_info",
],
'variables': {
'optimize': 'max',
Expand Down Expand Up @@ -667,9 +667,9 @@
'<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
'<(DEPTH)/gpu/gpu.gyp:gpu',
'<(DEPTH)/skia/skia.gyp:skia',
'<(DEPTH)/ui/events/events.gyp:events_base',
'<(DEPTH)/ui/gfx/gfx.gyp:gfx',
'<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry',
"<(DEPTH)/ui/latency_info/latency_info.gyp:latency_info",
],
'defines': [
'CC_SURFACES_IMPLEMENTATION=1',
Expand Down
2 changes: 1 addition & 1 deletion cc/cc_tests.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,9 @@
'../testing/gmock.gyp:gmock',
'../testing/gtest.gyp:gtest',
'../third_party/protobuf/protobuf.gyp:protobuf_lite',
'../ui/events/events.gyp:events_base',
'../ui/gfx/gfx.gyp:gfx',
'../ui/gfx/gfx.gyp:gfx_geometry',
'../ui/latency_info/latency_info.gyp:latency_info',
'cc.gyp:cc',
'cc.gyp:cc_proto',
'cc.gyp:cc_surfaces',
Expand Down
2 changes: 1 addition & 1 deletion cc/output/compositor_frame_metadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
#include "cc/output/viewport_selection_bound.h"
#include "cc/surfaces/surface_id.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/events/latency_info.h"
#include "ui/gfx/geometry/size_f.h"
#include "ui/gfx/geometry/vector2d_f.h"
#include "ui/latency_info/latency_info.h"

namespace cc {

Expand Down
2 changes: 1 addition & 1 deletion cc/output/latency_info_swap_promise.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include "base/compiler_specific.h"
#include "cc/output/swap_promise.h"
#include "ui/events/latency_info.h"
#include "ui/latency_info/latency_info.h"

namespace cc {

Expand Down
2 changes: 1 addition & 1 deletion cc/surfaces/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ component("surfaces") {
"//gpu/command_buffer/client:gles2_interface",
"//gpu/command_buffer/common",
"//skia",
"//ui/events:events_base",
"//ui/gfx",
"//ui/gfx/geometry",
"//ui/latency_info",
]

if (is_android && !is_debug) {
Expand Down
2 changes: 1 addition & 1 deletion cc/surfaces/display.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "cc/surfaces/surface_id.h"
#include "cc/surfaces/surface_manager.h"
#include "cc/surfaces/surfaces_export.h"
#include "ui/events/latency_info.h"
#include "ui/latency_info/latency_info.h"

namespace gpu {
class GpuMemoryBufferManager;
Expand Down
1 change: 1 addition & 0 deletions content/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ include_rules = [
"+ui/events",
"+ui/gfx",
"+ui/gl",
"+ui/latency_info",
"+ui/native_theme",
"+ui/ozone/public",
"+ui/resources/grit/ui_resources.h",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "content/browser/android/in_process/synchronous_compositor_registry_in_proc.h"
#include "content/public/browser/browser_thread.h"
#include "ui/events/blink/synchronous_input_handler_proxy.h"
#include "ui/events/latency_info.h"
#include "ui/latency_info/latency_info.h"

using blink::WebInputEvent;

Expand Down
2 changes: 1 addition & 1 deletion content/browser/compositor/image_transport_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#include "build/build_config.h"
#include "cc/surfaces/surface_id_allocator.h"
#include "content/common/content_export.h"
#include "ui/events/latency_info.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/latency_info/latency_info.h"

namespace cc {
class SurfaceManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#include "cc/output/output_surface_client.h"
#include "cc/output/software_output_device.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "ui/events/latency_info.h"
#include "ui/gfx/vsync_provider.h"
#include "ui/latency_info/latency_info.h"

namespace content {

Expand Down
2 changes: 1 addition & 1 deletion content/browser/gpu/gpu_process_host.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
#include "ipc/message_filter.h"
#include "media/base/media_switches.h"
#include "ui/base/ui_base_switches.h"
#include "ui/events/latency_info.h"
#include "ui/gl/gl_switches.h"
#include "ui/latency_info/latency_info.h"

#if defined(OS_ANDROID)
#include "base/android/build_info.h"
Expand Down
2 changes: 1 addition & 1 deletion content/browser/loader/resource_scheduler_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_test_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/events/latency_info.h"
#include "ui/latency_info/latency_info.h"

using std::string;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "content/shell/browser/shell.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "ui/events/event_switches.h"
#include "ui/events/latency_info.h"
#include "ui/latency_info/latency_info.h"

using blink::WebInputEvent;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "base/macros.h"
#include "content/browser/renderer_host/event_with_latency_info.h"
#include "content/common/content_export.h"
#include "ui/events/latency_info.h"
#include "ui/latency_info/latency_info.h"

namespace content {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "content/common/input_messages.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "ui/events/event.h"
#include "ui/events/latency_info.h"
#include "ui/latency_info/latency_info.h"

using blink::WebInputEvent;
using blink::WebTouchEvent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "base/logging.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "ui/events/latency_info.h"
#include "ui/latency_info/latency_info.h"

namespace content {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "base/logging.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "ui/events/latency_info.h"
#include "ui/latency_info/latency_info.h"

namespace content {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <cmath>

#include "base/logging.h"
#include "ui/events/latency_info.h"
#include "ui/latency_info/latency_info.h"

namespace content {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "content/shell/browser/shell.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "ui/events/event_switches.h"
#include "ui/events/latency_info.h"
#include "ui/latency_info/latency_info.h"

using blink::WebInputEvent;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "content/shell/browser/shell.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "ui/events/event_switches.h"
#include "ui/events/latency_info.h"
#include "ui/latency_info/latency_info.h"

using blink::WebInputEvent;

Expand Down
2 changes: 1 addition & 1 deletion content/browser/renderer_host/render_widget_host_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
#include "ui/base/ime/text_input_mode.h"
#include "ui/base/ime/text_input_type.h"
#include "ui/events/gesture_detection/gesture_provider_config_helper.h"
#include "ui/events/latency_info.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/latency_info/latency_info.h"

struct FrameHostMsg_HittestData_Params;
struct ViewHostMsg_SelectionBounds_Params;
Expand Down
2 changes: 1 addition & 1 deletion content/common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,12 @@ source_set("common") {
"//ui/accessibility",
"//ui/base",
"//ui/base/ime",
"//ui/events/ipc",
"//ui/gfx",
"//ui/gfx/geometry",
"//ui/gfx/ipc",
"//ui/gfx/ipc/skia",
"//ui/gl",
"//ui/latency_info/ipc",
"//ui/shell_dialogs",
"//url",
"//url/ipc:url_ipc",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#define CONTENT_COMMON_ACCELERATED_SURFACE_BUFFERS_SWAPPED_PARAMS_MAC_H_

#include "ui/base/cocoa/remote_layer_api.h"
#include "ui/events/latency_info.h"
#include "ui/gfx/mac/io_surface.h"
#include "ui/latency_info/latency_info.h"

namespace content {

Expand Down
2 changes: 1 addition & 1 deletion content/common/gpu_host_messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_message_start.h"
#include "ui/events/ipc/latency_info_param_traits.h"
#include "ui/gfx/gpu_memory_buffer.h"
#include "ui/gfx/ipc/gfx_param_traits.h"
#include "ui/gfx/ipc/skia/gfx_skia_param_traits.h"
#include "ui/latency_info/ipc/latency_info_param_traits.h"
#include "url/gurl.h"
#include "url/ipc/url_param_traits.h"

Expand Down
2 changes: 1 addition & 1 deletion content/common/input/event_with_latency_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef CONTENT_COMMON_INPUT_EVENT_WITH_LATENCY_INFO_H_
#define CONTENT_COMMON_INPUT_EVENT_WITH_LATENCY_INFO_H_

#include "ui/events/latency_info.h"
#include "ui/latency_info/latency_info.h"

#include "content/common/input/web_input_event_traits.h"

Expand Down
2 changes: 1 addition & 1 deletion content/common/input/input_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "base/macros.h"
#include "content/common/content_export.h"
#include "content/common/input/scoped_web_input_event.h"
#include "ui/events/latency_info.h"
#include "ui/latency_info/latency_info.h"

namespace blink {
class WebInputEvent;
Expand Down
2 changes: 1 addition & 1 deletion content/common/input/input_event_ack.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "content/common/input/did_overscroll_params.h"
#include "content/common/input/input_event_ack_state.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "ui/events/latency_info.h"
#include "ui/latency_info/latency_info.h"

namespace content {

Expand Down
2 changes: 1 addition & 1 deletion content/common/input_messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
#include "content/common/input/touch_action.h"
#include "ipc/ipc_message_macros.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "ui/events/ipc/latency_info_param_traits.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/vector2d_f.h"
#include "ui/gfx/ipc/gfx_param_traits.h"
#include "ui/gfx/ipc/skia/gfx_skia_param_traits.h"
#include "ui/gfx/range/range.h"
#include "ui/latency_info/ipc/latency_info_param_traits.h"

#undef IPC_MESSAGE_EXPORT
#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
Expand Down
1 change: 1 addition & 0 deletions content/content_browser.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
'../ui/events/events.gyp:gesture_detection',
'../ui/gfx/gfx.gyp:gfx',
'../ui/gfx/gfx.gyp:gfx_geometry',
'../ui/latency_info/latency_info.gyp:latency_info',
'../ui/resources/ui_resources.gyp:ui_resources',
'../ui/snapshot/snapshot.gyp:snapshot',
'../ui/surface/surface.gyp:surface',
Expand Down
2 changes: 1 addition & 1 deletion content/content_common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
'../ui/accessibility/accessibility.gyp:ax_gen',
'../ui/base/ime/ui_base_ime.gyp:ui_base_ime',
'../ui/base/ui_base.gyp:ui_base',
'../ui/events/events.gyp:events_ipc',
'../ui/latency_info/latency_info.gyp:latency_info_ipc',
'../ui/gfx/gfx.gyp:gfx',
'../ui/gfx/gfx.gyp:gfx_geometry',
'../ui/gfx/ipc/gfx_ipc.gyp:gfx_ipc',
Expand Down
1 change: 1 addition & 0 deletions content/content_tests.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,7 @@
'../ui/events/events.gyp:events_test_support',
'../ui/events/events.gyp:gesture_detection',
'../ui/gfx/gfx.gyp:gfx_test_support',
'../ui/latency_info/latency_info.gyp:latency_info',
'../ui/resources/ui_resources.gyp:ui_resources',
'../ui/surface/surface.gyp:surface',
'../url/url.gyp:url_lib',
Expand Down
Loading

0 comments on commit 7cc1dcc

Please sign in to comment.