| OLD | NEW |
| 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. | 9 // for a particular scene. |
| 10 // | 10 // |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 // reported information, it's still better for them to schedule each frame | 35 // 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 | 36 // 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 | 37 // up to any changes in timing. This also gives the compositor more |
| 38 // opportunity to plan for the upcoming frame, perhaps even boost clocks | 38 // opportunity to plan for the upcoming frame, perhaps even boost clocks |
| 39 // in anticipation. | 39 // in anticipation. |
| 40 ScheduleFrame() => (FrameInfo frame_info); | 40 ScheduleFrame() => (FrameInfo frame_info); |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 // Provides timestamp information about a frame which has been scheduled | 43 // Provides timestamp information about a frame which has been scheduled |
| 44 // to be drawn. | 44 // to be drawn. |
| 45 // |
| 46 // As there may be latency in receiving an updated |FrameInfo| from the |
| 47 // system, the consumer of this structure should apply compensation for |
| 48 // skipped frames. |
| 49 // |
| 50 // See |mojo::gfx::composition::FrameTracker|. |
| 45 struct FrameInfo { | 51 struct FrameInfo { |
| 46 // A timestamp indicating when the work of updating the frame was scheduled | 52 // A timestamp indicating when the work of updating the frame was scheduled |
| 47 // to begin which may be used to coordinate animations that require a | 53 // to begin which may be used to coordinate animations that require a |
| 48 // monotonic timing reference for synchronization, even across scenes. | 54 // monotonic timing reference for synchronization, even across scenes. |
| 49 // | 55 // |
| 50 // It essentially represents the time when the work of producing a new | 56 // It essentially represents the time when the work of producing a new |
| 51 // frame began. | 57 // frame began. |
| 52 // | 58 // |
| 53 // This value monotonically increases with each frame, never repeats, and | 59 // This value monotonically increases with each frame, never repeats, and |
| 54 // is guaranteed to represent a time in the recent past. It will always be | 60 // is guaranteed to represent a time in the recent past. It will always be |
| (...skipping 27 matching lines...) Expand all Loading... |
| 82 // A timestamp indicating approximately when the contents of the frame | 88 // A timestamp indicating approximately when the contents of the frame |
| 83 // will be shown on the display output assuming everything is fully rendered | 89 // will be shown on the display output assuming everything is fully rendered |
| 84 // and submitted by the indicated |frame_deadline|. | 90 // and submitted by the indicated |frame_deadline|. |
| 85 // | 91 // |
| 86 // This value monotonically increases with each frame, never repeats, and | 92 // This value monotonically increases with each frame, never repeats, and |
| 87 // is guaranteed to be no less than |frame_deadline|. | 93 // is guaranteed to be no less than |frame_deadline|. |
| 88 // | 94 // |
| 89 // Expressed in microseconds in the |MojoTimeTicks| timebase. | 95 // Expressed in microseconds in the |MojoTimeTicks| timebase. |
| 90 int64 presentation_time; | 96 int64 presentation_time; |
| 91 }; | 97 }; |
| OLD | NEW |