| 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/local_frame_id.h" | 14 #include "cc/surfaces/local_frame_id.h" |
| 15 #include "cc/surfaces/surface_sequence.h" | 15 #include "cc/surfaces/surface_sequence.h" |
| 16 #include "cc/surfaces/surface_sequence_generator.h" | 16 #include "cc/surfaces/surface_sequence_generator.h" |
| 17 #include "services/ui/ws/server_window_observer.h" | 17 #include "services/ui/ws/server_window_tracker.h" |
| 18 #include "ui/gfx/geometry/rect.h" | 18 #include "ui/gfx/geometry/rect.h" |
| 19 #include "ui/gfx/native_widget_types.h" | 19 #include "ui/gfx/native_widget_types.h" |
| 20 | 20 |
| 21 namespace cc { | 21 namespace cc { |
| 22 class CompositorFrame; | 22 class CompositorFrame; |
| 23 class CopyOutputRequest; | 23 class CopyOutputRequest; |
| 24 class RenderPass; | 24 class RenderPass; |
| 25 class SurfaceId; | 25 class SurfaceId; |
| 26 } | 26 } |
| 27 | 27 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 39 namespace test { | 39 namespace test { |
| 40 class FrameGeneratorTest; | 40 class FrameGeneratorTest; |
| 41 } | 41 } |
| 42 | 42 |
| 43 class FrameGeneratorDelegate; | 43 class FrameGeneratorDelegate; |
| 44 class ServerWindow; | 44 class ServerWindow; |
| 45 class ServerWindowCompositorFrameSink; | 45 class ServerWindowCompositorFrameSink; |
| 46 | 46 |
| 47 // Responsible for redrawing the display in response to the redraw requests by | 47 // Responsible for redrawing the display in response to the redraw requests by |
| 48 // submitting CompositorFrames to the owned CompositorFrameSink. | 48 // submitting CompositorFrames to the owned CompositorFrameSink. |
| 49 class FrameGenerator : public ServerWindowObserver { | 49 class FrameGenerator : public ServerWindowTracker { |
| 50 public: | 50 public: |
| 51 FrameGenerator(FrameGeneratorDelegate* delegate, | 51 FrameGenerator(FrameGeneratorDelegate* delegate, |
| 52 scoped_refptr<DisplayCompositor> display_compositor); | 52 scoped_refptr<DisplayCompositor> display_compositor); |
| 53 ~FrameGenerator() override; | 53 ~FrameGenerator() override; |
| 54 | 54 |
| 55 void OnGpuChannelEstablished(scoped_refptr<gpu::GpuChannelHost> gpu_channel); | 55 void OnGpuChannelEstablished(scoped_refptr<gpu::GpuChannelHost> gpu_channel); |
| 56 | 56 |
| 57 // Schedules a redraw for the provided region. | 57 // Schedules a redraw for the provided region. |
| 58 void RequestRedraw(const gfx::Rect& redraw_region); | 58 void RequestRedraw(const gfx::Rect& redraw_region); |
| 59 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget); | 59 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 base::WeakPtrFactory<FrameGenerator> weak_factory_; | 135 base::WeakPtrFactory<FrameGenerator> weak_factory_; |
| 136 | 136 |
| 137 DISALLOW_COPY_AND_ASSIGN(FrameGenerator); | 137 DISALLOW_COPY_AND_ASSIGN(FrameGenerator); |
| 138 }; | 138 }; |
| 139 | 139 |
| 140 } // namespace ws | 140 } // namespace ws |
| 141 | 141 |
| 142 } // namespace ui | 142 } // namespace ui |
| 143 | 143 |
| 144 #endif // SERVICES_UI_WS_FRAME_GENERATOR_H_ | 144 #endif // SERVICES_UI_WS_FRAME_GENERATOR_H_ |
| OLD | NEW |