| 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 SetNeedsUpdateLayer() | 61 // LatencyInfoSwapPromiseMonitor, if SetNeedsCommit() or SetNeedsUpdateLayer() |
| 67 // is called on LayerTreeHost, the original latency info will be turned | 62 // is called on LayerTreeHost, the original latency info will be turned |
| 68 // into a LatencyInfoSwapPromise. | 63 // into a LatencyInfoSwapPromise. |
| 69 scoped_ptr<cc::SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( | 64 scoped_ptr<cc::SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 const blink::WebLayer* outerViewportScrollLayer) override; | 117 const blink::WebLayer* outerViewportScrollLayer) override; |
| 123 virtual void clearViewportLayers() override; | 118 virtual void clearViewportLayers() override; |
| 124 virtual void registerSelection(const blink::WebSelectionBound& start, | 119 virtual void registerSelection(const blink::WebSelectionBound& start, |
| 125 const blink::WebSelectionBound& end) override; | 120 const blink::WebSelectionBound& end) override; |
| 126 virtual void clearSelection() override; | 121 virtual void clearSelection() override; |
| 127 virtual void setShowFPSCounter(bool show); | 122 virtual void setShowFPSCounter(bool show); |
| 128 virtual void setShowPaintRects(bool show); | 123 virtual void setShowPaintRects(bool show); |
| 129 virtual void setShowDebugBorders(bool show); | 124 virtual void setShowDebugBorders(bool show); |
| 130 virtual void setContinuousPaintingEnabled(bool enabled); | 125 virtual void setContinuousPaintingEnabled(bool enabled); |
| 131 virtual void setShowScrollBottleneckRects(bool show); | 126 virtual void setShowScrollBottleneckRects(bool show); |
| 127 |
| 128 virtual void updateTopControlsState(blink::WebTopControlsState constraints, |
| 129 blink::WebTopControlsState current, |
| 130 bool animate); |
| 131 virtual void setTopControlsHeight(float height, bool shrink); |
| 132 virtual void setTopControlsShownRatio(float); | 132 virtual void setTopControlsShownRatio(float); |
| 133 | |
| 134 // TODO(aelias): Delete after Blink roll | 133 // TODO(aelias): Delete after Blink roll |
| 135 virtual void setTopControlsContentOffset(float); | 134 virtual void setTopControlsContentOffset(float); |
| 136 | 135 |
| 137 // cc::LayerTreeHostClient implementation. | 136 // cc::LayerTreeHostClient implementation. |
| 138 void WillBeginMainFrame() override; | 137 void WillBeginMainFrame() override; |
| 139 void DidBeginMainFrame() override; | 138 void DidBeginMainFrame() override; |
| 140 void BeginMainFrame(const cc::BeginFrameArgs& args) override; | 139 void BeginMainFrame(const cc::BeginFrameArgs& args) override; |
| 141 void Layout() override; | 140 void Layout() override; |
| 142 void ApplyViewportDeltas(const gfx::Vector2dF& inner_delta, | 141 void ApplyViewportDeltas(const gfx::Vector2dF& inner_delta, |
| 143 const gfx::Vector2dF& outer_delta, | 142 const gfx::Vector2dF& outer_delta, |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; | 180 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; |
| 182 | 181 |
| 183 scoped_ptr<cc::CopyOutputRequest> temporary_copy_output_request_; | 182 scoped_ptr<cc::CopyOutputRequest> temporary_copy_output_request_; |
| 184 | 183 |
| 185 base::WeakPtrFactory<RenderWidgetCompositor> weak_factory_; | 184 base::WeakPtrFactory<RenderWidgetCompositor> weak_factory_; |
| 186 }; | 185 }; |
| 187 | 186 |
| 188 } // namespace content | 187 } // namespace content |
| 189 | 188 |
| 190 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ | 189 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ |
| OLD | NEW |