-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SkiaRenderer: Use SkColorSpace instead of gfx::ColorSpace
The conversion from gfx::ColorSpace to SkColorSpace now takes an SDR white level. Move conversion to be done as early as possible in the various pipelines, so that it is done in as few places as possible. ScopedSkImageBuilder takes an argument for the color space to override for the resulting SkImage. Change this to be an SkColorSpace (this is just more reasonable, because SkImages take SkColorSpaces). In several places, RenderPassBacking's color space is accessed as an SkColorSpace. Add a helper function RenderPassBackingSkColorSpace to do this conversion. SkiaOutputDevice::Reshape takes two color space arguments, one as a SkColorSpace in the SkSurfaceCharacterization, and one as an explicit gfx::ColorSpace. The gfx::ColorSpace is actually needed, because it is used with SharedImage (where things like PQ and SCRGB_LINEAR_80_NIT refer to specific formats, independent of SDR white level). In these cases, if an SkColorSpace is needed, use the one from the SkSurfaceCharacterization. Add the function DirectRenderer::CurrentRenderPassSkColorSpace, which produces the SkColorSpace for the current render pass (to consolidate places where the conversion is done). Change the function reshape_color_space to return an SkColorSpace (this is the only way that it is currently used). Add an SDR white level parameter to OutputSurface::ReshapeParams. Bug: 1286076 Change-Id: I49eb1ca3ece305f2f44c2d9383772bd59935b76d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3628391 Commit-Queue: ccameron chromium <ccameron@chromium.org> Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org> Cr-Commit-Position: refs/heads/main@{#1001210}
- Loading branch information
1 parent
8d3202a
commit 18724a3
Showing
12 changed files
with
76 additions
and
56 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
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