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 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 // CompositorFrame is submitted. | 70 // CompositorFrame is submitted. |
71 void OnSurfaceCreated(const cc::SurfaceId& surface_id, ServerWindow* window); | 71 void OnSurfaceCreated(const cc::SurfaceId& surface_id, ServerWindow* window); |
72 | 72 |
73 private: | 73 private: |
74 friend class ui::ws::test::FrameGeneratorTest; | 74 friend class ui::ws::test::FrameGeneratorTest; |
75 | 75 |
76 // cc::mojom::MojoCompositorFrameSinkClient implementation: | 76 // cc::mojom::MojoCompositorFrameSinkClient implementation: |
77 void DidReceiveCompositorFrameAck() override; | 77 void DidReceiveCompositorFrameAck() override; |
78 void OnBeginFrame(const cc::BeginFrameArgs& begin_frame_arags) override; | 78 void OnBeginFrame(const cc::BeginFrameArgs& begin_frame_arags) override; |
79 void ReclaimResources(const cc::ReturnedResourceArray& resources) override; | 79 void ReclaimResources(const cc::ReturnedResourceArray& resources) override; |
| 80 void WillDrawSurface() override {} |
80 | 81 |
81 // Generates the CompositorFrame. | 82 // Generates the CompositorFrame. |
82 cc::CompositorFrame GenerateCompositorFrame(const gfx::Rect& output_rect); | 83 cc::CompositorFrame GenerateCompositorFrame(const gfx::Rect& output_rect); |
83 | 84 |
84 // DrawWindowTree recursively visits ServerWindows, creating a SurfaceDrawQuad | 85 // DrawWindowTree recursively visits ServerWindows, creating a SurfaceDrawQuad |
85 // for each that lacks one. | 86 // for each that lacks one. |
86 void DrawWindowTree(cc::RenderPass* pass, | 87 void DrawWindowTree(cc::RenderPass* pass, |
87 ServerWindow* window, | 88 ServerWindow* window, |
88 const gfx::Vector2d& parent_to_root_origin_offset, | 89 const gfx::Vector2d& parent_to_root_origin_offset, |
89 float opacity); | 90 float opacity); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 base::WeakPtrFactory<FrameGenerator> weak_factory_; | 157 base::WeakPtrFactory<FrameGenerator> weak_factory_; |
157 | 158 |
158 DISALLOW_COPY_AND_ASSIGN(FrameGenerator); | 159 DISALLOW_COPY_AND_ASSIGN(FrameGenerator); |
159 }; | 160 }; |
160 | 161 |
161 } // namespace ws | 162 } // namespace ws |
162 | 163 |
163 } // namespace ui | 164 } // namespace ui |
164 | 165 |
165 #endif // SERVICES_UI_WS_FRAME_GENERATOR_H_ | 166 #endif // SERVICES_UI_WS_FRAME_GENERATOR_H_ |
OLD | NEW |