forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Zero-copy: introduce a way to letterbox the BlitRequest results
Currently, CopyOutputRequest API enables its callers to obtain a copy of the contents produced by a render pass. BlitRequest allows those results to be placed in a specific region of caller-provided textures, without modifying contents outside of that region. This is an almost-ideal situation for FrameSinkVideoCapturerImpl, with an exception that when it produces a VideoFrame, it may be forced to letterbox part of the frame. To avoid doing this work in the capturer (by memory-mapping the GpuMemoryBuffer), a letterbox region is introduced to BlitRequest. Changes: - Introduce `BlitRequest::letterbox_region()` that specifies the region of the caller-provided textures outside of which everything will be filled with black. - `FrameSinkVideoCaprturerImpl` takes advantage of newly introduced capability on `BlitRequest`. Letterboxing only happens in the capturer for non-GMB-backed VideoFrames, and only if there are parts of a frame that we have not already written to. - `skia::BlitRGBAToYUVA()` now exposes additional parameter to allow letterboxing of the destination image. - Test changes in SkiaReadbackPixeltest to account for new parameter to `BlitRequest`. - Minor: `RenderableGpuMemoryBufferVideoFramePool` now tags GpuMemoryBuffers with the color space. - Minor cleanup in `SkiaOutputSurfaceImplOnGpu::ImportSurfacesForNV12Planes()` - rename variables, add/expand comments, add DVLOG(3)s to facilitate future investigations. - Minor cleanup in `FrameSinkVideoCapturerImpl` - comments, DVLOGs, helpers. Bug: 1310411 Change-Id: I292ab78b9aabc29e23eb1489ea1ca8c9752b88eb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3617204 Reviewed-by: Jordan Bayles <jophba@chromium.org> Reviewed-by: Dan Sanders <sandersd@chromium.org> Reviewed-by: Michael Ludwig <michaelludwig@google.com> Commit-Queue: Piotr Bialecki <bialpio@chromium.org> Reviewed-by: Kyle Charbonneau <kylechar@chromium.org> Cr-Commit-Position: refs/heads/main@{#1003391}
- Loading branch information
Showing
13 changed files
with
312 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.