OLD | NEW |
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/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 static scoped_ptr<RenderWidgetCompositor> Create( | 45 static scoped_ptr<RenderWidgetCompositor> Create( |
46 RenderWidget* widget, | 46 RenderWidget* widget, |
47 CompositorDependencies* compositor_deps); | 47 CompositorDependencies* compositor_deps); |
48 | 48 |
49 virtual ~RenderWidgetCompositor(); | 49 virtual ~RenderWidgetCompositor(); |
50 | 50 |
51 const base::WeakPtr<cc::InputHandler>& GetInputHandler(); | 51 const base::WeakPtr<cc::InputHandler>& GetInputHandler(); |
52 bool BeginMainFrameRequested() const; | 52 bool BeginMainFrameRequested() const; |
53 void SetNeedsDisplayOnAllLayers(); | 53 void SetNeedsDisplayOnAllLayers(); |
54 void SetRasterizeOnlyVisibleContent(); | 54 void SetRasterizeOnlyVisibleContent(); |
55 void UpdateTopControlsState(cc::TopControlsState constraints, | |
56 cc::TopControlsState current, | |
57 bool animate); | |
58 void SetTopControlsShrinkBlinkSize(bool shrink); | |
59 void SetTopControlsHeight(float height); | |
60 void SetNeedsRedrawRect(gfx::Rect damage_rect); | 55 void SetNeedsRedrawRect(gfx::Rect damage_rect); |
61 // Like setNeedsRedraw but forces the frame to be drawn, without early-outs. | 56 // Like setNeedsRedraw but forces the frame to be drawn, without early-outs. |
62 // Redraw will be forced after the next commit | 57 // Redraw will be forced after the next commit |
63 void SetNeedsForcedRedraw(); | 58 void SetNeedsForcedRedraw(); |
64 // Calling CreateLatencyInfoSwapPromiseMonitor() to get a scoped | 59 // Calling CreateLatencyInfoSwapPromiseMonitor() to get a scoped |
65 // LatencyInfoSwapPromiseMonitor. During the life time of the | 60 // LatencyInfoSwapPromiseMonitor. During the life time of the |
66 // LatencyInfoSwapPromiseMonitor, if SetNeedsCommit() or | 61 // LatencyInfoSwapPromiseMonitor, if SetNeedsCommit() or |
67 // SetNeedsUpdateLayers() is called on LayerTreeHost, the original latency | 62 // SetNeedsUpdateLayers() is called on LayerTreeHost, the original latency |
68 // info will be turned into a LatencyInfoSwapPromise. | 63 // info will be turned into a LatencyInfoSwapPromise. |
69 scoped_ptr<cc::SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( | 64 scoped_ptr<cc::SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 const blink::WebLayer* outerViewportScrollLayer) override; | 118 const blink::WebLayer* outerViewportScrollLayer) override; |
124 virtual void clearViewportLayers() override; | 119 virtual void clearViewportLayers() override; |
125 virtual void registerSelection(const blink::WebSelectionBound& start, | 120 virtual void registerSelection(const blink::WebSelectionBound& start, |
126 const blink::WebSelectionBound& end) override; | 121 const blink::WebSelectionBound& end) override; |
127 virtual void clearSelection() override; | 122 virtual void clearSelection() override; |
128 virtual void setShowFPSCounter(bool show); | 123 virtual void setShowFPSCounter(bool show); |
129 virtual void setShowPaintRects(bool show); | 124 virtual void setShowPaintRects(bool show); |
130 virtual void setShowDebugBorders(bool show); | 125 virtual void setShowDebugBorders(bool show); |
131 virtual void setContinuousPaintingEnabled(bool enabled); | 126 virtual void setContinuousPaintingEnabled(bool enabled); |
132 virtual void setShowScrollBottleneckRects(bool show); | 127 virtual void setShowScrollBottleneckRects(bool show); |
| 128 |
| 129 virtual void updateTopControlsState(blink::WebTopControlsState constraints, |
| 130 blink::WebTopControlsState current, |
| 131 bool animate); |
| 132 virtual void setTopControlsHeight(float height, bool shrink); |
133 virtual void setTopControlsShownRatio(float); | 133 virtual void setTopControlsShownRatio(float); |
134 | |
135 // TODO(aelias): Delete after Blink roll | 134 // TODO(aelias): Delete after Blink roll |
136 virtual void setTopControlsContentOffset(float); | 135 virtual void setTopControlsContentOffset(float); |
137 | 136 |
138 // cc::LayerTreeHostClient implementation. | 137 // cc::LayerTreeHostClient implementation. |
139 void WillBeginMainFrame() override; | 138 void WillBeginMainFrame() override; |
140 void DidBeginMainFrame() override; | 139 void DidBeginMainFrame() override; |
141 void BeginMainFrame(const cc::BeginFrameArgs& args) override; | 140 void BeginMainFrame(const cc::BeginFrameArgs& args) override; |
142 void BeginMainFrameNotExpectedSoon() override; | 141 void BeginMainFrameNotExpectedSoon() override; |
143 void Layout() override; | 142 void Layout() override; |
144 void ApplyViewportDeltas(const gfx::Vector2dF& inner_delta, | 143 void ApplyViewportDeltas(const gfx::Vector2dF& inner_delta, |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; | 182 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; |
184 | 183 |
185 scoped_ptr<cc::CopyOutputRequest> temporary_copy_output_request_; | 184 scoped_ptr<cc::CopyOutputRequest> temporary_copy_output_request_; |
186 | 185 |
187 base::WeakPtrFactory<RenderWidgetCompositor> weak_factory_; | 186 base::WeakPtrFactory<RenderWidgetCompositor> weak_factory_; |
188 }; | 187 }; |
189 | 188 |
190 } // namespace content | 189 } // namespace content |
191 | 190 |
192 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ | 191 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ |
OLD | NEW |