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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 virtual void setContinuousPaintingEnabled(bool enabled); | 124 virtual void setContinuousPaintingEnabled(bool enabled); |
125 virtual void setShowScrollBottleneckRects(bool show); | 125 virtual void setShowScrollBottleneckRects(bool show); |
126 | 126 |
127 // cc::LayerTreeHostClient implementation. | 127 // cc::LayerTreeHostClient implementation. |
128 virtual void WillBeginMainFrame(int frame_id) OVERRIDE; | 128 virtual void WillBeginMainFrame(int frame_id) OVERRIDE; |
129 virtual void DidBeginMainFrame() OVERRIDE; | 129 virtual void DidBeginMainFrame() OVERRIDE; |
130 virtual void Animate(base::TimeTicks frame_begin_time) OVERRIDE; | 130 virtual void Animate(base::TimeTicks frame_begin_time) OVERRIDE; |
131 virtual void Layout() OVERRIDE; | 131 virtual void Layout() OVERRIDE; |
132 virtual void ApplyScrollAndScale(const gfx::Vector2d& scroll_delta, | 132 virtual void ApplyScrollAndScale(const gfx::Vector2d& scroll_delta, |
133 float page_scale) OVERRIDE; | 133 float page_scale) OVERRIDE; |
| 134 virtual void RecordDrawTiming(int64_t frame_id, |
| 135 const std::vector<std::pair<int, base::TimeTicks> >& draws) OVERRIDE; |
134 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback) | 136 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback) |
135 OVERRIDE; | 137 OVERRIDE; |
136 virtual void DidInitializeOutputSurface() OVERRIDE; | 138 virtual void DidInitializeOutputSurface() OVERRIDE; |
137 virtual void WillCommit() OVERRIDE; | 139 virtual void WillCommit() OVERRIDE; |
138 virtual void DidCommit() OVERRIDE; | 140 virtual void DidCommit() OVERRIDE; |
139 virtual void DidCommitAndDrawFrame() OVERRIDE; | 141 virtual void DidCommitAndDrawFrame() OVERRIDE; |
140 virtual void DidCompleteSwapBuffers() OVERRIDE; | 142 virtual void DidCompleteSwapBuffers() OVERRIDE; |
141 virtual void RateLimitSharedMainThreadContext() OVERRIDE; | 143 virtual void RateLimitSharedMainThreadContext() OVERRIDE; |
142 | 144 |
143 // cc::LayerTreeHostSingleThreadClient implementation. | 145 // cc::LayerTreeHostSingleThreadClient implementation. |
144 virtual void ScheduleComposite() OVERRIDE; | 146 virtual void ScheduleComposite() OVERRIDE; |
145 virtual void ScheduleAnimation() OVERRIDE; | 147 virtual void ScheduleAnimation() OVERRIDE; |
146 virtual void DidPostSwapBuffers() OVERRIDE; | 148 virtual void DidPostSwapBuffers() OVERRIDE; |
147 virtual void DidAbortSwapBuffers() OVERRIDE; | 149 virtual void DidAbortSwapBuffers() OVERRIDE; |
148 | 150 |
149 private: | 151 private: |
150 RenderWidgetCompositor(RenderWidget* widget, bool threaded); | 152 RenderWidgetCompositor(RenderWidget* widget, bool threaded); |
151 | 153 |
152 void Initialize(cc::LayerTreeSettings settings); | 154 void Initialize(cc::LayerTreeSettings settings); |
153 | 155 |
154 bool threaded_; | 156 bool threaded_; |
155 bool suppress_schedule_composite_; | 157 bool suppress_schedule_composite_; |
156 RenderWidget* widget_; | 158 RenderWidget* widget_; |
157 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; | 159 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; |
158 }; | 160 }; |
159 | 161 |
160 } // namespace content | 162 } // namespace content |
161 | 163 |
162 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ | 164 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ |
OLD | NEW |