Chromium Code Reviews| Index: services/ui/ws/frame_generator.h |
| diff --git a/services/ui/ws/frame_generator.h b/services/ui/ws/frame_generator.h |
| index f9a0647dd0b88dce94e85e5050ad5f0931f06375..b71d80f356d816810a9f80206bcc5f8f98b1fad7 100644 |
| --- a/services/ui/ws/frame_generator.h |
| +++ b/services/ui/ws/frame_generator.h |
| @@ -28,16 +28,14 @@ class RenderPass; |
| namespace ui { |
| namespace ws { |
| -class ServerWindow; |
| - |
| // Responsible for redrawing the display in response to the redraw requests by |
| // submitting CompositorFrames to the owned CompositorFrameSink. |
| class FrameGenerator : public cc::CompositorFrameSinkClient, |
| public cc::BeginFrameObserver { |
| public: |
| - FrameGenerator( |
| - ServerWindow* root_window, |
| - std::unique_ptr<cc::CompositorFrameSink> compositor_frame_sink); |
| + FrameGenerator(std::unique_ptr<cc::CompositorFrameSink> compositor_frame_sink, |
| + bool visible, |
|
Fady Samuel
2017/03/22 03:38:39
Hmm, we don't do this for device_scale_factor... M
Alex Z.
2017/03/22 13:17:17
I did it this way to preserve the same behavior. C
Alex Z.
2017/03/22 14:56:44
Done.
|
| + const gfx::Rect& bounds); |
| ~FrameGenerator() override; |
| void SetDeviceScaleFactor(float device_scale_factor); |
| @@ -47,6 +45,8 @@ class FrameGenerator : public cc::CompositorFrameSinkClient, |
| void OnSurfaceCreated(const cc::SurfaceInfo& surface_info); |
| void OnWindowDamaged(); |
| + void OnWindowVisibilityChanged(bool visible); |
| + void OnWindowBoundsChanged(const gfx::Rect& bounds); |
| private: |
| // cc::CompositorFrameSinkClient implementation: |
| @@ -69,7 +69,7 @@ class FrameGenerator : public cc::CompositorFrameSinkClient, |
| void OnBeginFrameSourcePausedChanged(bool paused) override; |
| // Generates the CompositorFrame. |
| - cc::CompositorFrame GenerateCompositorFrame(const gfx::Rect& output_rect); |
| + cc::CompositorFrame GenerateCompositorFrame(); |
| // DrawWindow creates SurfaceDrawQuad for the window manager and appends it to |
| // the provided cc::RenderPass. |
| @@ -79,8 +79,9 @@ class FrameGenerator : public cc::CompositorFrameSinkClient, |
| // FrameGenerator as an observer to/from begin_frame_source_ accordingly. |
| void SetNeedsBeginFrame(bool needs_begin_frame); |
| - ServerWindow* const root_window_; |
| float device_scale_factor_ = 1.f; |
| + bool is_window_visible_; |
| + gfx::Rect bounds_; |
| std::unique_ptr<cc::CompositorFrameSink> compositor_frame_sink_; |
| cc::BeginFrameArgs last_begin_frame_args_; |