You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
This file contains hidden or 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
Most of the big objects that dealt with Skia interaction have already been moved into the skia sub-directory, but there were a few smaller uses of conversions that were scattered throughout the main body of DisplayList source code. This PR essentially pulled on a Skia root and kept pulling until a large number of Skia references were removed from the main body or sequestered into the skia sub-directory, including:
Dispatcher was renamed to DlOpReceiver and many Skia enums and minor references removed from its methods
DisplayListBuilder used to allow access to its OpReceiver methods through a public asReceiver() method. These methods now require special "friend" access only granted to a test file and a benchmark file that check regressions on internal state.
Removed DisplayList::RenderTo(SkCanvas) method that knew how to interface with Skia. That code is now embedded in the DlSkCanvasAdapter instead and DisplayList only supports dispatching to a DlOpReciever now.
moved SkPaintDispatchHelper into the skia sub-directory where its only use lies
removed all "DlThing ToDl(SkThing)" converter functions as they are obsolete
moved all "SkThing ToSk(DlThing)" converter functions to skia where their only uses lie
moved all "DlThing::skia_object" methods into ToSk converter functions in the skia sub-directory where their only uses lie
There should be minimal use of SkObjects in the main body of the DL source code, but the following remain:
Some test files use Skia objects to compare behavior of the DL equivalents
Many interfaces still include SkScalar, SkRect, SkPath, SkMatrix, SkM44 and maybe a few other utility geometric objects
@dnfield I removed a piece of code that protected color source access from the wrong thread in lib/ui/paint.cc when I removed the Paint::paint(SkPaint& paint) method now that it is no longer needed for the paragraph code. It feels like a similar protection is probably needed in DlSkCanvasAdapter and/or DlSkCanvasDispatcher which translate from DL objects to Sk objects for talking to an SkCanvas. The comment there indicated that the protection was only situationally needed when accessing a ui.Paint from the paragraph code. Is that still true after this re-configuration of the DL code?
Note that the paragraph code still calls the Paint::toDlPaint(DlPaint& paint) method which performs a similar operation for it, but entirely using DL data structures. That code doesn't have the "owner" protection in it, though...
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
autosubmitMerge PR when tree becomes green via auto submit App
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Most of the big objects that dealt with Skia interaction have already been moved into the skia sub-directory, but there were a few smaller uses of conversions that were scattered throughout the main body of DisplayList source code. This PR essentially pulled on a Skia root and kept pulling until a large number of Skia references were removed from the main body or sequestered into the skia sub-directory, including:
There should be minimal use of SkObjects in the main body of the DL source code, but the following remain: