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

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, 7 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 SetNeedsDisplayOnAllLayers(); 38 void SetNeedsDisplayOnAllLayers();
38 void GetRenderingStats(cc::RenderingStats* stats); 39 void GetRenderingStats(cc::RenderingStats* stats);
39 skia::RefPtr<SkPicture> CapturePicture(); 40 skia::RefPtr<SkPicture> CapturePicture();
40 void UpdateTopControlsState(bool enable_hiding, 41 void UpdateTopControlsState(bool enable_hiding,
41 bool enable_showing, 42 bool enable_showing,
42 bool animate); 43 bool animate);
43 void SetOverdrawBottomHeight(float overdraw_bottom_height); 44 void SetOverdrawBottomHeight(float overdraw_bottom_height);
44 void SetNeedsRedrawRect(gfx::Rect damage_rect); 45 void SetNeedsRedrawRect(gfx::Rect damage_rect);
46 void SetLatencyInfo(const cc::LatencyInfo& latency_info);
45 47
46 // WebLayerTreeView implementation. 48 // WebLayerTreeView implementation.
47 virtual void setSurfaceReady(); 49 virtual void setSurfaceReady();
48 virtual void setRootLayer(const WebKit::WebLayer& layer); 50 virtual void setRootLayer(const WebKit::WebLayer& layer);
49 virtual void clearRootLayer(); 51 virtual void clearRootLayer();
50 virtual void setViewportSize( 52 virtual void setViewportSize(
51 const WebKit::WebSize& unused_deprecated, 53 const WebKit::WebSize& unused_deprecated,
52 const WebKit::WebSize& device_viewport_size); 54 const WebKit::WebSize& device_viewport_size);
53 virtual WebKit::WebSize layoutViewportSize() const; 55 virtual WebKit::WebSize layoutViewportSize() const;
54 virtual WebKit::WebSize deviceViewportSize() const; 56 virtual WebKit::WebSize deviceViewportSize() const;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 110
109 bool threaded_; 111 bool threaded_;
110 bool suppress_schedule_composite_; 112 bool suppress_schedule_composite_;
111 RenderWidget* widget_; 113 RenderWidget* widget_;
112 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; 114 scoped_ptr<cc::LayerTreeHost> layer_tree_host_;
113 }; 115 };
114 116
115 } // namespace content 117 } // namespace content
116 118
117 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ 119 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_
OLDNEW
« no previous file with comments | « content/renderer/gpu/input_event_filter_unittest.cc ('k') | content/renderer/gpu/render_widget_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698