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

Unified Diff: content/renderer/render_widget.h

Issue 11293121: Add latency measurement system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor input event changes Created 8 years 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/render_widget.h
diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h
index 631455f45d10566602bcae04ec36303b14265bcb..ca0648ba9a6b7f04936158d7f2c131c82f9c6971 100644
--- a/content/renderer/render_widget.h
+++ b/content/renderer/render_widget.h
@@ -32,6 +32,7 @@
#include "ui/gfx/rect.h"
#include "ui/gfx/vector2d.h"
#include "ui/surface/transport_dib.h"
+#include "webkit/compositor_bindings/web_latency_info_impl.h"
#include "webkit/glue/webcursor.h"
struct ViewHostMsg_UpdateRect_Params;
@@ -115,6 +116,7 @@ class CONTENT_EXPORT RenderWidget
// WebKit::WebWidgetClient
virtual void willBeginCompositorFrame();
+ virtual void didBeginCompositorFrame();
virtual void didInvalidateRect(const WebKit::WebRect&);
virtual void didScrollRect(int dx, int dy,
const WebKit::WebRect& clipRect);
@@ -265,8 +267,10 @@ class CONTENT_EXPORT RenderWidget
void OnCreateVideoAck(int32 video_id);
void OnUpdateVideoAck(int32 video_id);
void OnRequestMoveAck();
- void OnHandleInputEvent(const WebKit::WebInputEvent* event,
+ void OnHandleInputEvent(int64 input_number,
+ const WebKit::WebInputEvent* event,
bool keyboard_shortcut);
+ void OnStartFrame(int64 input_number);
void OnMouseCaptureLost();
virtual void OnSetFocus(bool enable);
void OnSetInputMethodActive(bool is_active);
@@ -441,6 +445,10 @@ class CONTENT_EXPORT RenderWidget
// the scheduling of compositing requests.
virtual bool WebWidgetHandlesCompositorScheduling() const;
+ // Signal that a new frame is starting, for the purposes of keeping track of
+ // frame latency.
+ void StartingFrame();
+
// Routing ID that allows us to communicate to the parent browser process
// RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent.
int32 routing_id_;
@@ -629,6 +637,13 @@ class CONTENT_EXPORT RenderWidget
// Specified whether the compositor will run in its own thread.
bool is_threaded_compositing_enabled_;
+ // Captures information about what input events and frames are currently
+ // being processed.
+ bool started_frame_;
+ bool got_input_;
+
+ WebKit::WebLatencyInfoImpl latency_info_;
+
DISALLOW_COPY_AND_ASSIGN(RenderWidget);
};

Powered by Google App Engine
This is Rietveld 408576698