| 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" |
| 11 #include "base/values.h" | 11 #include "base/values.h" |
| 12 #include "cc/base/swap_promise.h" |
| 12 #include "cc/base/swap_promise_monitor.h" | 13 #include "cc/base/swap_promise_monitor.h" |
| 13 #include "cc/input/top_controls_state.h" | 14 #include "cc/input/top_controls_state.h" |
| 14 #include "cc/trees/layer_tree_host_client.h" | 15 #include "cc/trees/layer_tree_host_client.h" |
| 15 #include "cc/trees/layer_tree_host_single_thread_client.h" | 16 #include "cc/trees/layer_tree_host_single_thread_client.h" |
| 16 #include "cc/trees/layer_tree_settings.h" | 17 #include "cc/trees/layer_tree_settings.h" |
| 17 #include "third_party/WebKit/public/platform/WebLayerTreeView.h" | 18 #include "third_party/WebKit/public/platform/WebLayerTreeView.h" |
| 18 #include "third_party/skia/include/core/SkBitmap.h" | 19 #include "third_party/skia/include/core/SkBitmap.h" |
| 19 #include "ui/gfx/rect.h" | 20 #include "ui/gfx/rect.h" |
| 20 | 21 |
| 21 namespace ui { | 22 namespace ui { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // Like setNeedsRedraw but forces the frame to be drawn, without early-outs. | 58 // Like setNeedsRedraw but forces the frame to be drawn, without early-outs. |
| 58 // Redraw will be forced after the next commit | 59 // Redraw will be forced after the next commit |
| 59 void SetNeedsForcedRedraw(); | 60 void SetNeedsForcedRedraw(); |
| 60 // Calling CreateLatencyInfoSwapPromiseMonitor() to get a scoped | 61 // Calling CreateLatencyInfoSwapPromiseMonitor() to get a scoped |
| 61 // LatencyInfoSwapPromiseMonitor. During the life time of the | 62 // LatencyInfoSwapPromiseMonitor. During the life time of the |
| 62 // LatencyInfoSwapPromiseMonitor, if SetNeedsCommit() or SetNeedsUpdateLayer() | 63 // LatencyInfoSwapPromiseMonitor, if SetNeedsCommit() or SetNeedsUpdateLayer() |
| 63 // is called on LayerTreeHost, the original latency info will be turned | 64 // is called on LayerTreeHost, the original latency info will be turned |
| 64 // into a LatencyInfoSwapPromise. | 65 // into a LatencyInfoSwapPromise. |
| 65 scoped_ptr<cc::SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( | 66 scoped_ptr<cc::SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( |
| 66 ui::LatencyInfo* latency); | 67 ui::LatencyInfo* latency); |
| 68 // Calling QueueSwapPromise() to directly queue a SwapPromise into |
| 69 // LayerTreeHost. |
| 70 void QueueSwapPromise(scoped_ptr<cc::SwapPromise> swap_promise); |
| 67 int GetLayerTreeId() const; | 71 int GetLayerTreeId() const; |
| 68 void NotifyInputThrottledUntilCommit(); | 72 void NotifyInputThrottledUntilCommit(); |
| 69 const cc::Layer* GetRootLayer() const; | 73 const cc::Layer* GetRootLayer() const; |
| 70 bool ScheduleMicroBenchmark( | 74 bool ScheduleMicroBenchmark( |
| 71 const std::string& name, | 75 const std::string& name, |
| 72 scoped_ptr<base::Value> value, | 76 scoped_ptr<base::Value> value, |
| 73 const base::Callback<void(scoped_ptr<base::Value>)>& callback); | 77 const base::Callback<void(scoped_ptr<base::Value>)>& callback); |
| 74 | 78 |
| 75 // WebLayerTreeView implementation. | 79 // WebLayerTreeView implementation. |
| 76 virtual void setSurfaceReady(); | 80 virtual void setSurfaceReady(); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 | 148 |
| 145 bool threaded_; | 149 bool threaded_; |
| 146 bool suppress_schedule_composite_; | 150 bool suppress_schedule_composite_; |
| 147 RenderWidget* widget_; | 151 RenderWidget* widget_; |
| 148 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; | 152 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; |
| 149 }; | 153 }; |
| 150 | 154 |
| 151 } // namespace content | 155 } // namespace content |
| 152 | 156 |
| 153 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ | 157 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ |
| OLD | NEW |