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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // LayerTreeHost. | 68 // LayerTreeHost. |
69 void QueueSwapPromise(scoped_ptr<cc::SwapPromise> swap_promise); | 69 void QueueSwapPromise(scoped_ptr<cc::SwapPromise> swap_promise); |
70 int GetLayerTreeId() const; | 70 int GetLayerTreeId() const; |
71 void NotifyInputThrottledUntilCommit(); | 71 void NotifyInputThrottledUntilCommit(); |
72 const cc::Layer* GetRootLayer() const; | 72 const cc::Layer* GetRootLayer() const; |
73 int ScheduleMicroBenchmark( | 73 int ScheduleMicroBenchmark( |
74 const std::string& name, | 74 const std::string& name, |
75 scoped_ptr<base::Value> value, | 75 scoped_ptr<base::Value> value, |
76 const base::Callback<void(scoped_ptr<base::Value>)>& callback); | 76 const base::Callback<void(scoped_ptr<base::Value>)>& callback); |
77 bool SendMessageToMicroBenchmark(int id, scoped_ptr<base::Value> value); | 77 bool SendMessageToMicroBenchmark(int id, scoped_ptr<base::Value> value); |
| 78 void SetIgnoreSelectionUpdates(bool ignore_selection); |
78 | 79 |
79 // WebLayerTreeView implementation. | 80 // WebLayerTreeView implementation. |
80 virtual void setSurfaceReady(); | 81 virtual void setSurfaceReady(); |
81 virtual void setRootLayer(const blink::WebLayer& layer); | 82 virtual void setRootLayer(const blink::WebLayer& layer); |
82 virtual void clearRootLayer(); | 83 virtual void clearRootLayer(); |
83 virtual void setViewportSize( | 84 virtual void setViewportSize( |
84 const blink::WebSize& unused_deprecated, | 85 const blink::WebSize& unused_deprecated, |
85 const blink::WebSize& device_viewport_size); | 86 const blink::WebSize& device_viewport_size); |
86 virtual void setViewportSize(const blink::WebSize& device_viewport_size); | 87 virtual void setViewportSize(const blink::WebSize& device_viewport_size); |
87 virtual blink::WebSize layoutViewportSize() const; | 88 virtual blink::WebSize layoutViewportSize() const; |
(...skipping 20 matching lines...) Expand all Loading... |
108 virtual void compositeAndReadbackAsync( | 109 virtual void compositeAndReadbackAsync( |
109 blink::WebCompositeAndReadbackAsyncCallback* callback); | 110 blink::WebCompositeAndReadbackAsyncCallback* callback); |
110 virtual void finishAllRendering(); | 111 virtual void finishAllRendering(); |
111 virtual void setDeferCommits(bool defer_commits); | 112 virtual void setDeferCommits(bool defer_commits); |
112 virtual void registerForAnimations(blink::WebLayer* layer); | 113 virtual void registerForAnimations(blink::WebLayer* layer); |
113 virtual void registerViewportLayers( | 114 virtual void registerViewportLayers( |
114 const blink::WebLayer* pageScaleLayer, | 115 const blink::WebLayer* pageScaleLayer, |
115 const blink::WebLayer* innerViewportScrollLayer, | 116 const blink::WebLayer* innerViewportScrollLayer, |
116 const blink::WebLayer* outerViewportScrollLayer) OVERRIDE; | 117 const blink::WebLayer* outerViewportScrollLayer) OVERRIDE; |
117 virtual void clearViewportLayers() OVERRIDE; | 118 virtual void clearViewportLayers() OVERRIDE; |
| 119 virtual void registerSelection(const blink::WebSelection& selection) OVERRIDE; |
| 120 virtual void clearSelection() OVERRIDE; |
118 virtual void setShowFPSCounter(bool show); | 121 virtual void setShowFPSCounter(bool show); |
119 virtual void setShowPaintRects(bool show); | 122 virtual void setShowPaintRects(bool show); |
120 virtual void setShowDebugBorders(bool show); | 123 virtual void setShowDebugBorders(bool show); |
121 virtual void setContinuousPaintingEnabled(bool enabled); | 124 virtual void setContinuousPaintingEnabled(bool enabled); |
122 virtual void setShowScrollBottleneckRects(bool show); | 125 virtual void setShowScrollBottleneckRects(bool show); |
123 | 126 |
124 // cc::LayerTreeHostClient implementation. | 127 // cc::LayerTreeHostClient implementation. |
125 virtual void WillBeginMainFrame(int frame_id) OVERRIDE; | 128 virtual void WillBeginMainFrame(int frame_id) OVERRIDE; |
126 virtual void DidBeginMainFrame() OVERRIDE; | 129 virtual void DidBeginMainFrame() OVERRIDE; |
127 virtual void Animate(base::TimeTicks frame_begin_time) OVERRIDE; | 130 virtual void Animate(base::TimeTicks frame_begin_time) OVERRIDE; |
(...skipping 15 matching lines...) Expand all Loading... |
143 virtual void DidPostSwapBuffers() OVERRIDE; | 146 virtual void DidPostSwapBuffers() OVERRIDE; |
144 virtual void DidAbortSwapBuffers() OVERRIDE; | 147 virtual void DidAbortSwapBuffers() OVERRIDE; |
145 | 148 |
146 private: | 149 private: |
147 RenderWidgetCompositor(RenderWidget* widget, bool threaded); | 150 RenderWidgetCompositor(RenderWidget* widget, bool threaded); |
148 | 151 |
149 void Initialize(cc::LayerTreeSettings settings); | 152 void Initialize(cc::LayerTreeSettings settings); |
150 | 153 |
151 bool threaded_; | 154 bool threaded_; |
152 bool suppress_schedule_composite_; | 155 bool suppress_schedule_composite_; |
| 156 bool suppress_selection_updates_; |
153 RenderWidget* widget_; | 157 RenderWidget* widget_; |
154 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; | 158 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; |
155 }; | 159 }; |
156 | 160 |
157 } // namespace content | 161 } // namespace content |
158 | 162 |
159 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ | 163 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ |
OLD | NEW |