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

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

Issue 14999012: Move cc/debug/latency_info to ui/base. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "cc/debug/rendering_stats.h" 10 #include "cc/debug/rendering_stats.h"
11 #include "cc/input/top_controls_state.h" 11 #include "cc/input/top_controls_state.h"
12 #include "cc/trees/layer_tree_host_client.h" 12 #include "cc/trees/layer_tree_host_client.h"
13 #include "cc/trees/layer_tree_settings.h" 13 #include "cc/trees/layer_tree_settings.h"
14 #include "skia/ext/refptr.h" 14 #include "skia/ext/refptr.h"
15 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeView.h" 15 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeView.h"
16 #include "ui/gfx/rect.h" 16 #include "ui/gfx/rect.h"
17 17
18 class SkPicture; 18 class SkPicture;
19 19
20 namespace ui {
21 struct LatencyInfo;
22 }
23
20 namespace cc { 24 namespace cc {
21 class InputHandler; 25 class InputHandler;
22 class LayerTreeHost; 26 class LayerTreeHost;
23 struct LatencyInfo;
24 } 27 }
25 28
26 namespace content { 29 namespace content {
27 class RenderWidget; 30 class RenderWidget;
28 31
29 class RenderWidgetCompositor : public WebKit::WebLayerTreeView, 32 class RenderWidgetCompositor : public WebKit::WebLayerTreeView,
30 public cc::LayerTreeHostClient { 33 public cc::LayerTreeHostClient {
31 public: 34 public:
32 // Attempt to construct and initialize a compositor instance for the widget 35 // Attempt to construct and initialize a compositor instance for the widget
33 // with the given settings. Returns NULL if initialization fails. 36 // with the given settings. Returns NULL if initialization fails.
34 static scoped_ptr<RenderWidgetCompositor> Create(RenderWidget* widget); 37 static scoped_ptr<RenderWidgetCompositor> Create(RenderWidget* widget);
35 38
36 virtual ~RenderWidgetCompositor(); 39 virtual ~RenderWidgetCompositor();
37 40
38 const base::WeakPtr<cc::InputHandler>& GetInputHandler(); 41 const base::WeakPtr<cc::InputHandler>& GetInputHandler();
39 void SetSuppressScheduleComposite(bool suppress); 42 void SetSuppressScheduleComposite(bool suppress);
40 void Animate(base::TimeTicks time); 43 void Animate(base::TimeTicks time);
41 void Composite(base::TimeTicks frame_begin_time); 44 void Composite(base::TimeTicks frame_begin_time);
42 void SetNeedsDisplayOnAllLayers(); 45 void SetNeedsDisplayOnAllLayers();
43 void SetRasterizeOnlyVisibleContent(); 46 void SetRasterizeOnlyVisibleContent();
44 void GetRenderingStats(cc::RenderingStats* stats); 47 void GetRenderingStats(cc::RenderingStats* stats);
45 skia::RefPtr<SkPicture> CapturePicture(); 48 skia::RefPtr<SkPicture> CapturePicture();
46 void UpdateTopControlsState(cc::TopControlsState constraints, 49 void UpdateTopControlsState(cc::TopControlsState constraints,
47 cc::TopControlsState current, 50 cc::TopControlsState current,
48 bool animate); 51 bool animate);
49 void SetOverdrawBottomHeight(float overdraw_bottom_height); 52 void SetOverdrawBottomHeight(float overdraw_bottom_height);
50 void SetNeedsRedrawRect(gfx::Rect damage_rect); 53 void SetNeedsRedrawRect(gfx::Rect damage_rect);
51 void SetLatencyInfo(const cc::LatencyInfo& latency_info); 54 void SetLatencyInfo(const ui::LatencyInfo& latency_info);
52 55
53 // WebLayerTreeView implementation. 56 // WebLayerTreeView implementation.
54 virtual void setSurfaceReady(); 57 virtual void setSurfaceReady();
55 virtual void setRootLayer(const WebKit::WebLayer& layer); 58 virtual void setRootLayer(const WebKit::WebLayer& layer);
56 virtual void clearRootLayer(); 59 virtual void clearRootLayer();
57 virtual void setViewportSize( 60 virtual void setViewportSize(
58 const WebKit::WebSize& unused_deprecated, 61 const WebKit::WebSize& unused_deprecated,
59 const WebKit::WebSize& device_viewport_size); 62 const WebKit::WebSize& device_viewport_size);
60 virtual WebKit::WebSize layoutViewportSize() const; 63 virtual WebKit::WebSize layoutViewportSize() const;
61 virtual WebKit::WebSize deviceViewportSize() const; 64 virtual WebKit::WebSize deviceViewportSize() const;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 116
114 bool threaded_; 117 bool threaded_;
115 bool suppress_schedule_composite_; 118 bool suppress_schedule_composite_;
116 RenderWidget* widget_; 119 RenderWidget* widget_;
117 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; 120 scoped_ptr<cc::LayerTreeHost> layer_tree_host_;
118 }; 121 };
119 122
120 } // namespace content 123 } // namespace content
121 124
122 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ 125 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_
OLDNEW
« no previous file with comments | « content/renderer/gpu/mailbox_output_surface.cc ('k') | content/renderer/gpu/render_widget_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698