Repository navigation
Expose exact iOS render presentation tokens #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d303f9c
a9d4624
05a2956
24284c3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1540,6 +1540,24 @@ pub fn Renderer(comptime GraphicsAPI: type) type { | |
| pub fn drawFrame( | ||
| self: *Self, | ||
| sync: bool, | ||
| ) !void { | ||
| return self.drawFrameWithOptionalPresentation(sync, null); | ||
| } | ||
|
|
||
| /// Draw a forced frame whose backend presentation carries an opaque | ||
| /// completion token to the embedder. | ||
| pub fn drawFrameWithPresentation( | ||
| self: *Self, | ||
| sync: bool, | ||
| presentation: renderer.FramePresentation, | ||
| ) !void { | ||
| return self.drawFrameWithOptionalPresentation(sync, presentation); | ||
| } | ||
|
|
||
| fn drawFrameWithOptionalPresentation( | ||
| self: *Self, | ||
| sync: bool, | ||
| presentation: ?renderer.FramePresentation, | ||
| ) !void { | ||
| // const start = std.time.Instant.now() catch unreachable; | ||
| // const start_micro = std.time.microTimestamp(); | ||
|
|
@@ -1697,7 +1715,10 @@ pub fn Renderer(comptime GraphicsAPI: type) type { | |
| } | ||
|
|
||
| // Get a frame context from the graphics API. | ||
| var frame_ctx = try self.api.beginFrame(self, &frame.target); | ||
| var frame_ctx = if (presentation) |value| | ||
| try self.api.beginFrameWithPresentation(self, &frame.target, value) | ||
| else | ||
| try self.api.beginFrame(self, &frame.target); | ||
|
Comment on lines
+1718
to
+1721
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When |
||
| defer frame_ctx.complete(sync); | ||
|
|
||
| { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.