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.
Reland "Move Skia SkFontLCDConfig globals to Chromium"
This is a reland of 78b97c8 Also updated the tsan_suppressions.cc file with the updated names of the globals that were moved. Original change's description: > Move Skia SkFontLCDConfig globals to Chromium > > This change eliminates the usage of the deprecated SkFontLCDConfig, > which stores font-related monitor properties in some global variables. > Chromium is the only client of this deprecated API, and the Skia team > has wanted to remove it for some time. > > Unfortunately, the use is fairly widespread within Chromium: > 1. The globals are set directly in a handful of places via calls to > SkFontLCDConfig functions. > 2. The globals are used (indirectly) whenever an SkSurfaceProps is > initialized with the kLegacyFontHost_InitType flag, and also when > an SkCanvas or SkSurface are created without specifying the props. > > The correct long-term plan would be to retrieve the values from the > Display (ideally per-monitor values) and pass them along as needed. > But given the extensive usage, the only reasonable short-term approach > is to lift the globals out of Skia and bring them "in-house" into > Chromium. > > To that end: > -- Undefines SK_LEGACY_SURFACE_PROPS. > -- New globals and APIs in /skia/ext/legacy_display_globals.* > -- Replaced "SkSurfaceProps(kLegacyFontHost_InitType)" with calls to > new API: skia::LegacyDisplayGlobals::GetSkSurfaceProps() > -- Found places where SkCanvas and SkSurface were created and props > weren't already specified; passing the LegacyDisplayGlobals in most > cases, but `nullptr` (or empty SkSurfaceProps) if it was clear > without doing much analysis that no text was being drawn. > > This gets us closer to the end-goal by allowing Skia to fully remove > the deprecated APIs, and also surfacing a lot of places where the use > of the globals was hidden by indirect usage. > > Change-Id: I8fffaee4933c03ee828d2ffab858f53d92c59f4d > Bug: 1126992, skia:3934 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2378763 > Reviewed-by: Scott Violet <sky@chromium.org> > Reviewed-by: Ben Wagner <bungeman@chromium.org> > Reviewed-by: Michael Spang <spang@chromium.org> > Commit-Queue: Ian Prest <iapres@microsoft.com> > Cr-Commit-Position: refs/heads/master@{#818197} TBR=sky@chromium.org Bug: 1126992, 328826, skia:3934 Change-Id: I8911a67cb8a9d4079b993feaff29ff8abd02dd94 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2486073 Reviewed-by: Scott Violet <sky@chromium.org> Reviewed-by: Ian Prest <iapres@microsoft.com> Commit-Queue: Ian Prest <iapres@microsoft.com> Cr-Commit-Position: refs/heads/master@{#818688}
- Loading branch information
Showing
97 changed files
with
322 additions
and
247 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.