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

Side by Side Diff: mojo/services/gfx/composition/interfaces/scheduling.mojom

Issue 1997513002: Mozart: Generalize frame scheduling. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-jank2
Patch Set: add 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
« no previous file with comments | « mojo/services/gfx/composition/interfaces/scenes.mojom ('k') | mojo/tools/data/apptests » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 [DartPackage="mojo_services"] 5 [DartPackage="mojo_services"]
6 module mojo.gfx.composition; 6 module mojo.gfx.composition;
7 7
8 // Provides support for scheduling drawing and composition operations 8 // Provides support for scheduling drawing and composition operations.
9 // for a particular scene.
10 // 9 //
11 // Instances of this interface must be obtained from a |Scene|. This interface 10 // Instances of this interface must be obtained from a |Scene| or |Renderer|.
12 // is modeled separately so as to allow applications to use different threads 11 interface FrameScheduler {
13 // for scheduling work as opposed to publishing scene updates.
14 interface SceneScheduler {
15 // Asks the compositor to invoke the callback when it is a good time to 12 // Asks the compositor to invoke the callback when it is a good time to
16 // draw the next frame. 13 // draw the next frame.
17 // 14 //
18 // The rate at which the callback is invoked may depend on how the scene 15 // The rate at which the callback is invoked may depend on how the scene
19 // has been embedded. The scene will only receive frame callbacks while 16 // has been embedded. The scene will only receive frame callbacks while
20 // it is attached to a scene graph which the compositor has been asked 17 // it is attached to a scene graph which the compositor has been asked
21 // to renderer since timing information ultimately derives from the 18 // to render since timing information ultimately derives from the
22 // renderer. If the same scene is being rendered to multiple destinations 19 // renderer. If the same scene is being rendered to multiple destinations
23 // with different timing requirements, the compositor will perform rate 20 // with different timing requirements, the compositor will couple the
24 // adaptation as required behind the scenes. 21 // scene scheduling to one of the renderers.
25 // 22 //
26 // The returned |frame_info| provides information about the frame to 23 // The returned |frame_info| provides information about the frame to
27 // be drawn. 24 // be drawn. This information should be passed to a
25 // |mojo::gfx::composition::FrameTracker| to apply compensation for
26 // skipped frames before using it.
28 // 27 //
29 // TODO(jeffbrown): Consider whether we should have the callback be invoked 28 // TODO(jeffbrown): Consider whether we should have the callback be invoked
30 // immediately rather than on schedule, letting the client set its own 29 // immediately rather than on schedule, letting the client set its own
31 // timers. Advantage may be a reduction in latency due to the elimination 30 // timers. Advantage may be a reduction in latency due to the elimination
32 // of an IPC on a timing critical path. Disadvantage may be an increase 31 // of an IPC on a timing critical path. Disadvantage may be an increase
33 // in the number of context switches and some extra client side bookkeeping. 32 // in the number of context switches and some extra client side bookkeeping.
34 // Note that although clients could predict future frame times based on the 33 // Note that although clients could predict future frame times based on the
35 // reported information, it's still better for them to schedule each frame 34 // reported information, it's still better for them to schedule each frame
36 // individually so they stay in sync with one another and quickly catch 35 // individually so they stay in sync with one another and quickly catch
37 // up to any changes in timing. This also gives the compositor more 36 // up to any changes in timing. This also gives the compositor more
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // A timestamp indicating approximately when the contents of the frame 87 // A timestamp indicating approximately when the contents of the frame
89 // will be shown on the display output assuming everything is fully rendered 88 // will be shown on the display output assuming everything is fully rendered
90 // and submitted by the indicated |frame_deadline|. 89 // and submitted by the indicated |frame_deadline|.
91 // 90 //
92 // This value monotonically increases with each frame, never repeats, and 91 // This value monotonically increases with each frame, never repeats, and
93 // is guaranteed to be no less than |frame_deadline|. 92 // is guaranteed to be no less than |frame_deadline|.
94 // 93 //
95 // Expressed in microseconds in the |MojoTimeTicks| timebase. 94 // Expressed in microseconds in the |MojoTimeTicks| timebase.
96 int64 presentation_time; 95 int64 presentation_time;
97 }; 96 };
OLDNEW
« no previous file with comments | « mojo/services/gfx/composition/interfaces/scenes.mojom ('k') | mojo/tools/data/apptests » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698