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

Side by Side Diff: services/gfx/compositor/compositor_engine.h

Issue 1995873002: Mozart: Improve tracing and backpressure. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: address review comments Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_GFX_COMPOSITOR_COMPOSITOR_H_ 5 #ifndef SERVICES_GFX_COMPOSITOR_COMPOSITOR_H_
6 #define SERVICES_GFX_COMPOSITOR_COMPOSITOR_H_ 6 #define SERVICES_GFX_COMPOSITOR_COMPOSITOR_H_
7 7
8 #include <unordered_map> 8 #include <unordered_map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 void OnSceneConnectionError(SceneState* scene_state); 82 void OnSceneConnectionError(SceneState* scene_state);
83 void DestroyScene(SceneState* scene_state); 83 void DestroyScene(SceneState* scene_state);
84 84
85 void OnRendererConnectionError(RendererState* renderer_state); 85 void OnRendererConnectionError(RendererState* renderer_state);
86 void DestroyRenderer(RendererState* renderer_state); 86 void DestroyRenderer(RendererState* renderer_state);
87 87
88 void InvalidateScene(SceneState* scene_state); 88 void InvalidateScene(SceneState* scene_state);
89 SceneDef::Disposition PresentScene(SceneState* scene_state, 89 SceneDef::Disposition PresentScene(SceneState* scene_state,
90 int64_t presentation_time); 90 int64_t presentation_time);
91 91
92 // Starts the process of composing the contents of the renderer to
93 // produce a new frame.
94 void ComposeRenderer(RendererState* renderer_state,
95 const mojo::gfx::composition::FrameInfo& frame_info);
96
97 // Applies and validates scene updates from all scenes which are included
98 // in the renderer's scene graph.
92 void PresentRenderer(RendererState* renderer_state, 99 void PresentRenderer(RendererState* renderer_state,
93 int64_t presentation_time); 100 int64_t presentation_time);
94 void SnapshotRenderer(RendererState* renderer_state, 101
95 const mojo::gfx::composition::FrameInfo& frame_info); 102 // Resolves scene dependencies and captures a snapshot of the current
103 // state of the renderer's scene graph.
104 void SnapshotRenderer(RendererState* renderer_state);
96 void SnapshotRendererInner(RendererState* renderer_state, 105 void SnapshotRendererInner(RendererState* renderer_state,
97 std::ostream* block_log); 106 std::ostream* block_log);
107
108 // Paints the renderer's current snapshot and submits a frame of content
109 // to the output for display.
110 void PaintRenderer(RendererState* renderer_state,
111 const mojo::gfx::composition::FrameInfo& frame_info,
112 int64_t composition_time);
113
114 // Schedules the next frame to be rendered, if needed.
98 void ScheduleFrameForRenderer(RendererState* renderer_state, 115 void ScheduleFrameForRenderer(RendererState* renderer_state,
99 Scheduler::SchedulingMode scheduling_mode); 116 Scheduler::SchedulingMode scheduling_mode);
100 117
101 void OnOutputError(const base::WeakPtr<RendererState>& renderer_state_weak); 118 void OnOutputError(const base::WeakPtr<RendererState>& renderer_state_weak);
102 void OnOutputUpdateRequest( 119 void OnOutputUpdateRequest(
103 const base::WeakPtr<RendererState>& renderer_state_weak, 120 const base::WeakPtr<RendererState>& renderer_state_weak,
104 const mojo::gfx::composition::FrameInfo& frame_info); 121 const mojo::gfx::composition::FrameInfo& frame_info);
105 void OnOutputSnapshotRequest( 122 void OnOutputSnapshotRequest(
106 const base::WeakPtr<RendererState>& renderer_state_weak, 123 const base::WeakPtr<RendererState>& renderer_state_weak,
107 const mojo::gfx::composition::FrameInfo& frame_info); 124 const mojo::gfx::composition::FrameInfo& frame_info);
(...skipping 25 matching lines...) Expand all
133 Universe universe_; 150 Universe universe_;
134 151
135 base::WeakPtrFactory<CompositorEngine> weak_factory_; 152 base::WeakPtrFactory<CompositorEngine> weak_factory_;
136 153
137 DISALLOW_COPY_AND_ASSIGN(CompositorEngine); 154 DISALLOW_COPY_AND_ASSIGN(CompositorEngine);
138 }; 155 };
139 156
140 } // namespace compositor 157 } // namespace compositor
141 158
142 #endif // SERVICES_GFX_COMPOSITOR_COMPOSITOR_H_ 159 #endif // SERVICES_GFX_COMPOSITOR_COMPOSITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698