| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 SERVICES_UI_WS_FRAME_GENERATOR_H_ | 5 #ifndef SERVICES_UI_WS_FRAME_GENERATOR_H_ |
| 6 #define SERVICES_UI_WS_FRAME_GENERATOR_H_ | 6 #define SERVICES_UI_WS_FRAME_GENERATOR_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <unordered_map> | 9 #include <unordered_map> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/timer/timer.h" | 12 #include "base/timer/timer.h" |
| 13 #include "cc/surfaces/frame_sink_id.h" | 13 #include "cc/surfaces/frame_sink_id.h" |
| 14 #include "cc/surfaces/surface_id.h" | 14 #include "cc/surfaces/surface_id.h" |
| 15 #include "cc/surfaces/surface_id_allocator.h" |
| 15 #include "services/ui/public/interfaces/window_tree_constants.mojom.h" | 16 #include "services/ui/public/interfaces/window_tree_constants.mojom.h" |
| 16 #include "services/ui/ws/ids.h" | 17 #include "services/ui/ws/ids.h" |
| 17 #include "services/ui/ws/server_window_tracker.h" | 18 #include "services/ui/ws/server_window_tracker.h" |
| 18 #include "ui/gfx/geometry/rect.h" | 19 #include "ui/gfx/geometry/rect.h" |
| 19 #include "ui/gfx/native_widget_types.h" | 20 #include "ui/gfx/native_widget_types.h" |
| 20 | 21 |
| 21 namespace cc { | 22 namespace cc { |
| 22 class CompositorFrame; | 23 class CompositorFrame; |
| 23 class RenderPass; | 24 class RenderPass; |
| 24 class SurfaceId; | 25 class SurfaceId; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 | 115 |
| 115 ui::DisplayCompositor* GetDisplayCompositor(); | 116 ui::DisplayCompositor* GetDisplayCompositor(); |
| 116 | 117 |
| 117 // ServerWindowObserver implementation. | 118 // ServerWindowObserver implementation. |
| 118 void OnWindowDestroying(ServerWindow* window) override; | 119 void OnWindowDestroying(ServerWindow* window) override; |
| 119 | 120 |
| 120 FrameGeneratorDelegate* delegate_; | 121 FrameGeneratorDelegate* delegate_; |
| 121 ServerWindow* const root_window_; | 122 ServerWindow* const root_window_; |
| 122 scoped_refptr<gpu::GpuChannelHost> gpu_channel_; | 123 scoped_refptr<gpu::GpuChannelHost> gpu_channel_; |
| 123 | 124 |
| 125 gfx::Size last_submitted_frame_size_; |
| 126 cc::LocalFrameId local_frame_id_; |
| 127 cc::SurfaceIdAllocator id_allocator_; |
| 124 cc::mojom::MojoCompositorFrameSinkPtr compositor_frame_sink_; | 128 cc::mojom::MojoCompositorFrameSinkPtr compositor_frame_sink_; |
| 125 gfx::AcceleratedWidget widget_ = gfx::kNullAcceleratedWidget; | 129 gfx::AcceleratedWidget widget_ = gfx::kNullAcceleratedWidget; |
| 126 | 130 |
| 127 // Represents the top level root surface id that should reference the display | 131 // Represents the top level root surface id that should reference the display |
| 128 // root surface. We don't know the actual value, because it's generated in | 132 // root surface. We don't know the actual value, because it's generated in |
| 129 // another process, this is used internally as a placeholder. | 133 // another process, this is used internally as a placeholder. |
| 130 const cc::SurfaceId top_level_root_surface_id_; | 134 const cc::SurfaceId top_level_root_surface_id_; |
| 131 | 135 |
| 132 struct SurfaceReference { | 136 struct SurfaceReference { |
| 133 cc::SurfaceId parent_id; | 137 cc::SurfaceId parent_id; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 154 base::WeakPtrFactory<FrameGenerator> weak_factory_; | 158 base::WeakPtrFactory<FrameGenerator> weak_factory_; |
| 155 | 159 |
| 156 DISALLOW_COPY_AND_ASSIGN(FrameGenerator); | 160 DISALLOW_COPY_AND_ASSIGN(FrameGenerator); |
| 157 }; | 161 }; |
| 158 | 162 |
| 159 } // namespace ws | 163 } // namespace ws |
| 160 | 164 |
| 161 } // namespace ui | 165 } // namespace ui |
| 162 | 166 |
| 163 #endif // SERVICES_UI_WS_FRAME_GENERATOR_H_ | 167 #endif // SERVICES_UI_WS_FRAME_GENERATOR_H_ |
| OLD | NEW |