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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 | 169 |
170 protected: | 170 protected: |
171 RenderWidgetCompositor(RenderWidget* widget, | 171 RenderWidgetCompositor(RenderWidget* widget, |
172 CompositorDependencies* compositor_deps); | 172 CompositorDependencies* compositor_deps); |
173 | 173 |
174 void Initialize(); | 174 void Initialize(); |
175 cc::LayerTreeHost* layer_tree_host() { return layer_tree_host_.get(); } | 175 cc::LayerTreeHost* layer_tree_host() { return layer_tree_host_.get(); } |
176 | 176 |
177 private: | 177 private: |
178 void ScheduleCommit(); | 178 void ScheduleCommit(); |
| 179 void DidLayoutAndPaintAsync(); |
179 bool CommitIsSynchronous() const; | 180 bool CommitIsSynchronous() const; |
180 void SynchronousCommit(); | |
181 | 181 |
182 int num_failed_recreate_attempts_; | 182 int num_failed_recreate_attempts_; |
183 RenderWidget* widget_; | 183 RenderWidget* widget_; |
184 CompositorDependencies* compositor_deps_; | 184 CompositorDependencies* compositor_deps_; |
185 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; | 185 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; |
186 | 186 |
187 blink::WebLayoutAndPaintAsyncCallback* layout_and_paint_async_callback_; | 187 blink::WebLayoutAndPaintAsyncCallback* layout_and_paint_async_callback_; |
188 scoped_ptr<cc::CopyOutputRequest> temporary_copy_output_request_; | 188 scoped_ptr<cc::CopyOutputRequest> temporary_copy_output_request_; |
189 | 189 |
190 base::WeakPtrFactory<RenderWidgetCompositor> weak_factory_; | 190 base::WeakPtrFactory<RenderWidgetCompositor> weak_factory_; |
191 }; | 191 }; |
192 | 192 |
193 } // namespace content | 193 } // namespace content |
194 | 194 |
195 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ | 195 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ |
OLD | NEW |