Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(643)

Unified Diff: services/ui/ws/frame_generator.h

Issue 2651843002: FrameGenerator should receive SurfaceInfo and use it in frame generation (Closed)
Patch Set: c Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/ui/ws/display.cc ('k') | services/ui/ws/frame_generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/frame_generator.h
diff --git a/services/ui/ws/frame_generator.h b/services/ui/ws/frame_generator.h
index d5f5b755e5d58a752382412f0e9960479677f254..9e5f943abda623d91d312e56127b26ac7aca668e 100644
--- a/services/ui/ws/frame_generator.h
+++ b/services/ui/ws/frame_generator.h
@@ -23,7 +23,6 @@
namespace cc {
class RenderPass;
-class SurfaceId;
}
namespace ui {
@@ -38,22 +37,18 @@ class ServerWindow;
// Responsible for redrawing the display in response to the redraw requests by
// submitting CompositorFrames to the owned CompositorFrameSink.
-class FrameGenerator : public ServerWindowTracker,
- public cc::mojom::MojoCompositorFrameSinkClient {
+class FrameGenerator : public cc::mojom::MojoCompositorFrameSinkClient {
public:
FrameGenerator(FrameGeneratorDelegate* delegate, ServerWindow* root_window);
~FrameGenerator() override;
- void set_device_scale_factor(float device_scale_factor) {
- device_scale_factor_ = device_scale_factor;
- }
+ void SetDeviceScaleFactor(float device_scale_factor);
// Schedules a redraw for the provided region.
void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget);
- // If |window| corresponds to the active WM for the display then update
- // |window_manager_surface_id_|.
- void OnSurfaceCreated(const cc::SurfaceId& surface_id, ServerWindow* window);
+ // Updates the WindowManager's SurfaceInfo.
+ void OnSurfaceCreated(const cc::SurfaceInfo& surface_info);
private:
friend class ui::ws::test::FrameGeneratorTest;
@@ -67,12 +62,9 @@ class FrameGenerator : public ServerWindowTracker,
// Generates the CompositorFrame.
cc::CompositorFrame GenerateCompositorFrame(const gfx::Rect& output_rect);
- // DrawWindow creates SurfaceDrawQuad for the provided ServerWindow and
- // appends it to the provided cc::RenderPass.
- void DrawWindow(cc::RenderPass* pass, ServerWindow* window);
-
- // ServerWindowObserver implementation.
- void OnWindowDestroying(ServerWindow* window) override;
+ // DrawWindow creates SurfaceDrawQuad for the window manager and appends it to
+ // the provided cc::RenderPass.
+ void DrawWindow(cc::RenderPass* pass);
FrameGeneratorDelegate* delegate_;
ServerWindow* const root_window_;
@@ -84,7 +76,7 @@ class FrameGenerator : public ServerWindowTracker,
cc::mojom::MojoCompositorFrameSinkAssociatedPtr compositor_frame_sink_;
cc::mojom::DisplayPrivateAssociatedPtr display_private_;
- cc::SurfaceId window_manager_surface_id_;
+ cc::SurfaceInfo window_manager_surface_info_;
mojo::Binding<cc::mojom::MojoCompositorFrameSinkClient> binding_;
« no previous file with comments | « services/ui/ws/display.cc ('k') | services/ui/ws/frame_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698