| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "ui/gfx/geometry/rect.h" | 25 #include "ui/gfx/geometry/rect.h" |
| 26 | 26 |
| 27 namespace base { | 27 namespace base { |
| 28 class CommandLine; | 28 class CommandLine; |
| 29 } | 29 } |
| 30 | 30 |
| 31 namespace cc { | 31 namespace cc { |
| 32 class CopyOutputRequest; | 32 class CopyOutputRequest; |
| 33 class InputHandler; | 33 class InputHandler; |
| 34 class Layer; | 34 class Layer; |
| 35 class LayerTreeHostInterface; | 35 class LayerTreeHost; |
| 36 namespace proto { | 36 namespace proto { |
| 37 class CompositorMessage; | 37 class CompositorMessage; |
| 38 } | 38 } |
| 39 } | 39 } |
| 40 | 40 |
| 41 namespace gfx { | 41 namespace gfx { |
| 42 class ColorSpace; | 42 class ColorSpace; |
| 43 } | 43 } |
| 44 | 44 |
| 45 namespace ui { | 45 namespace ui { |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 MAX_COMPOSITOR_FRAME_SINK_RETRIES = 5, | 204 MAX_COMPOSITOR_FRAME_SINK_RETRIES = 5, |
| 205 }; | 205 }; |
| 206 | 206 |
| 207 protected: | 207 protected: |
| 208 friend class RenderViewImplScaleFactorTest; | 208 friend class RenderViewImplScaleFactorTest; |
| 209 | 209 |
| 210 RenderWidgetCompositor(RenderWidgetCompositorDelegate* delegate, | 210 RenderWidgetCompositor(RenderWidgetCompositorDelegate* delegate, |
| 211 CompositorDependencies* compositor_deps); | 211 CompositorDependencies* compositor_deps); |
| 212 | 212 |
| 213 void Initialize(float device_scale_factor); | 213 void Initialize(float device_scale_factor); |
| 214 cc::LayerTreeHostInterface* layer_tree_host() { | 214 cc::LayerTreeHost* layer_tree_host() { return layer_tree_host_.get(); } |
| 215 return layer_tree_host_.get(); | |
| 216 } | |
| 217 | 215 |
| 218 private: | 216 private: |
| 219 void LayoutAndUpdateLayers(); | 217 void LayoutAndUpdateLayers(); |
| 220 void InvokeLayoutAndPaintCallback(); | 218 void InvokeLayoutAndPaintCallback(); |
| 221 bool CompositeIsSynchronous() const; | 219 bool CompositeIsSynchronous() const; |
| 222 void SynchronouslyComposite(); | 220 void SynchronouslyComposite(); |
| 223 | 221 |
| 224 int num_failed_recreate_attempts_; | 222 int num_failed_recreate_attempts_; |
| 225 RenderWidgetCompositorDelegate* const delegate_; | 223 RenderWidgetCompositorDelegate* const delegate_; |
| 226 CompositorDependencies* const compositor_deps_; | 224 CompositorDependencies* const compositor_deps_; |
| 227 const bool threaded_; | 225 const bool threaded_; |
| 228 std::unique_ptr<cc::LayerTreeHostInterface> layer_tree_host_; | 226 std::unique_ptr<cc::LayerTreeHost> layer_tree_host_; |
| 229 bool never_visible_; | 227 bool never_visible_; |
| 230 | 228 |
| 231 blink::WebLayoutAndPaintAsyncCallback* layout_and_paint_async_callback_; | 229 blink::WebLayoutAndPaintAsyncCallback* layout_and_paint_async_callback_; |
| 232 | 230 |
| 233 cc::RemoteProtoChannel::ProtoReceiver* remote_proto_channel_receiver_; | 231 cc::RemoteProtoChannel::ProtoReceiver* remote_proto_channel_receiver_; |
| 234 | 232 |
| 235 base::WeakPtrFactory<RenderWidgetCompositor> weak_factory_; | 233 base::WeakPtrFactory<RenderWidgetCompositor> weak_factory_; |
| 236 }; | 234 }; |
| 237 | 235 |
| 238 } // namespace content | 236 } // namespace content |
| 239 | 237 |
| 240 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ | 238 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ |
| OLD | NEW |