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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.h

Issue 13931009: Add latency info to input events sent to RenderWidget. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ 5 #ifndef CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_
6 #define CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ 6 #define CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_
7 7
8 #include "base/time.h" 8 #include "base/time.h"
9 #include "cc/debug/rendering_stats.h" 9 #include "cc/debug/rendering_stats.h"
10 #include "cc/trees/layer_tree_host_client.h" 10 #include "cc/trees/layer_tree_host_client.h"
11 #include "cc/trees/layer_tree_settings.h" 11 #include "cc/trees/layer_tree_settings.h"
12 #include "skia/ext/refptr.h" 12 #include "skia/ext/refptr.h"
13 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeView.h" 13 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeView.h"
14 #include "ui/gfx/rect.h" 14 #include "ui/gfx/rect.h"
15 15
16 class SkPicture; 16 class SkPicture;
17 17
18 namespace cc { 18 namespace cc {
19 class LayerTreeHost; 19 class LayerTreeHost;
20 struct LatencyInfo;
20 } 21 }
21 22
22 namespace content { 23 namespace content {
23 class RenderWidget; 24 class RenderWidget;
24 25
25 class RenderWidgetCompositor : public WebKit::WebLayerTreeView, 26 class RenderWidgetCompositor : public WebKit::WebLayerTreeView,
26 public cc::LayerTreeHostClient { 27 public cc::LayerTreeHostClient {
27 public: 28 public:
28 // Attempt to construct and initialize a compositor instance for the widget 29 // Attempt to construct and initialize a compositor instance for the widget
29 // with the given settings. Returns NULL if initialization fails. 30 // with the given settings. Returns NULL if initialization fails.
30 static scoped_ptr<RenderWidgetCompositor> Create(RenderWidget* widget); 31 static scoped_ptr<RenderWidgetCompositor> Create(RenderWidget* widget);
31 32
32 virtual ~RenderWidgetCompositor(); 33 virtual ~RenderWidgetCompositor();
33 34
34 void SetSuppressScheduleComposite(bool suppress); 35 void SetSuppressScheduleComposite(bool suppress);
35 void Animate(base::TimeTicks time); 36 void Animate(base::TimeTicks time);
36 void Composite(base::TimeTicks frame_begin_time); 37 void Composite(base::TimeTicks frame_begin_time);
37 void GetRenderingStats(cc::RenderingStats* stats); 38 void GetRenderingStats(cc::RenderingStats* stats);
38 skia::RefPtr<SkPicture> CapturePicture(); 39 skia::RefPtr<SkPicture> CapturePicture();
39 void UpdateTopControlsState(bool enable_hiding, 40 void UpdateTopControlsState(bool enable_hiding,
40 bool enable_showing, 41 bool enable_showing,
41 bool animate); 42 bool animate);
42 void SetOverdrawBottomHeight(float overdraw_bottom_height); 43 void SetOverdrawBottomHeight(float overdraw_bottom_height);
43 void SetNeedsRedrawRect(gfx::Rect damage_rect); 44 void SetNeedsRedrawRect(gfx::Rect damage_rect);
45 void SetLatencyInfo(const cc::LatencyInfo& latency_info);
44 46
45 // WebLayerTreeView implementation. 47 // WebLayerTreeView implementation.
46 virtual void setSurfaceReady(); 48 virtual void setSurfaceReady();
47 virtual void setRootLayer(const WebKit::WebLayer& layer); 49 virtual void setRootLayer(const WebKit::WebLayer& layer);
48 virtual void clearRootLayer(); 50 virtual void clearRootLayer();
49 virtual void setViewportSize( 51 virtual void setViewportSize(
50 const WebKit::WebSize& unused_deprecated, 52 const WebKit::WebSize& unused_deprecated,
51 const WebKit::WebSize& device_viewport_size); 53 const WebKit::WebSize& device_viewport_size);
52 virtual WebKit::WebSize layoutViewportSize() const; 54 virtual WebKit::WebSize layoutViewportSize() const;
53 virtual WebKit::WebSize deviceViewportSize() const; 55 virtual WebKit::WebSize deviceViewportSize() const;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 bool threaded_; 109 bool threaded_;
108 bool suppress_schedule_composite_; 110 bool suppress_schedule_composite_;
109 RenderWidget* widget_; 111 RenderWidget* widget_;
110 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; 112 scoped_ptr<cc::LayerTreeHost> layer_tree_host_;
111 }; 113 };
112 114
113 } // namespace content 115 } // namespace content
114 116
115 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ 117 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_
116 118
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698