| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 cc::TopControlsState current, | 56 cc::TopControlsState current, |
| 57 bool animate); | 57 bool animate); |
| 58 void SetTopControlsShrinkBlinkSize(bool shrink); | 58 void SetTopControlsShrinkBlinkSize(bool shrink); |
| 59 void SetTopControlsHeight(float height); | 59 void SetTopControlsHeight(float height); |
| 60 void SetNeedsRedrawRect(gfx::Rect damage_rect); | 60 void SetNeedsRedrawRect(gfx::Rect damage_rect); |
| 61 // Like setNeedsRedraw but forces the frame to be drawn, without early-outs. | 61 // Like setNeedsRedraw but forces the frame to be drawn, without early-outs. |
| 62 // Redraw will be forced after the next commit | 62 // Redraw will be forced after the next commit |
| 63 void SetNeedsForcedRedraw(); | 63 void SetNeedsForcedRedraw(); |
| 64 // Calling CreateLatencyInfoSwapPromiseMonitor() to get a scoped | 64 // Calling CreateLatencyInfoSwapPromiseMonitor() to get a scoped |
| 65 // LatencyInfoSwapPromiseMonitor. During the life time of the | 65 // LatencyInfoSwapPromiseMonitor. During the life time of the |
| 66 // LatencyInfoSwapPromiseMonitor, if SetNeedsCommit() or SetNeedsUpdateLayer() | 66 // LatencyInfoSwapPromiseMonitor, if SetNeedsCommit() or |
| 67 // is called on LayerTreeHost, the original latency info will be turned | 67 // SetNeedsUpdateLayers() is called on LayerTreeHost, the original latency |
| 68 // into a LatencyInfoSwapPromise. | 68 // info will be turned into a LatencyInfoSwapPromise. |
| 69 scoped_ptr<cc::SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( | 69 scoped_ptr<cc::SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( |
| 70 ui::LatencyInfo* latency); | 70 ui::LatencyInfo* latency); |
| 71 // Calling QueueSwapPromise() to directly queue a SwapPromise into | 71 // Calling QueueSwapPromise() to directly queue a SwapPromise into |
| 72 // LayerTreeHost. | 72 // LayerTreeHost. |
| 73 void QueueSwapPromise(scoped_ptr<cc::SwapPromise> swap_promise); | 73 void QueueSwapPromise(scoped_ptr<cc::SwapPromise> swap_promise); |
| 74 int GetLayerTreeId() const; | 74 int GetLayerTreeId() const; |
| 75 int GetSourceFrameNumber() const; | 75 int GetSourceFrameNumber() const; |
| 76 void SetNeedsUpdateLayers(); |
| 76 void SetNeedsCommit(); | 77 void SetNeedsCommit(); |
| 77 void NotifyInputThrottledUntilCommit(); | 78 void NotifyInputThrottledUntilCommit(); |
| 78 const cc::Layer* GetRootLayer() const; | 79 const cc::Layer* GetRootLayer() const; |
| 79 int ScheduleMicroBenchmark( | 80 int ScheduleMicroBenchmark( |
| 80 const std::string& name, | 81 const std::string& name, |
| 81 scoped_ptr<base::Value> value, | 82 scoped_ptr<base::Value> value, |
| 82 const base::Callback<void(scoped_ptr<base::Value>)>& callback); | 83 const base::Callback<void(scoped_ptr<base::Value>)>& callback); |
| 83 bool SendMessageToMicroBenchmark(int id, scoped_ptr<base::Value> value); | 84 bool SendMessageToMicroBenchmark(int id, scoped_ptr<base::Value> value); |
| 84 void StartCompositor(); | 85 void StartCompositor(); |
| 85 | 86 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; | 182 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; |
| 182 | 183 |
| 183 scoped_ptr<cc::CopyOutputRequest> temporary_copy_output_request_; | 184 scoped_ptr<cc::CopyOutputRequest> temporary_copy_output_request_; |
| 184 | 185 |
| 185 base::WeakPtrFactory<RenderWidgetCompositor> weak_factory_; | 186 base::WeakPtrFactory<RenderWidgetCompositor> weak_factory_; |
| 186 }; | 187 }; |
| 187 | 188 |
| 188 } // namespace content | 189 } // namespace content |
| 189 | 190 |
| 190 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ | 191 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ |
| OLD | NEW |