This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Add DlColorSource objects to hold information for SkShaders #31981
Merged
fluttergithubbot
merged 11 commits into
flutter:main
from
flar:add-DlColorSource-objects
Mar 15, 2022
Merged
Add DlColorSource objects to hold information for SkShaders #31981
fluttergithubbot
merged 11 commits into
flutter:main
from
flar:add-DlColorSource-objects
Mar 15, 2022
Conversation
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
Contributor
Author
|
When flutter/impeller#73 merges into the Impeller repo then I can adjust the DEPS for this PR and merge it. |
zanderso
reviewed
Mar 12, 2022
chinmaygarde
approved these changes
Mar 14, 2022
Member
chinmaygarde
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from perhaps the defaulted virtual destructors, everything else is nits and the patch overall looks good to me. Thanks!
335ceb2 to
614d9a5
Compare
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Mar 16, 2022
zanderso
pushed a commit
to flutter/flutter
that referenced
this pull request
Mar 16, 2022
* 0199e90 [macOS] fix text selection when there's composing text (flutter/engine#31936) * 0ca0ce1 Roll Skia from 9565f4bd902b to a48a3c9417c0 (3 revisions) (flutter/engine#32044) * a60e8c3 Switch the renderer to impeller based on the presence of a command line flag. (flutter/engine#31959) * 24051b6 Roll Fuchsia Mac SDK from EOVjR8JSN... to jvlI1s78T... (flutter/engine#32047) * fef6232 Roll Skia from a48a3c9417c0 to ffb49630eb1a (3 revisions) (flutter/engine#32048) * 5a80834 [ci.yaml] Migrate remaining targets to cocoon scheduler (flutter/engine#32018) * cd7a1e2 Support stencil buffers on OpenGL for Windows and Android (flutter/engine#31967) * dc22c4c Add DlColorSource objects to hold information for SkShaders (flutter/engine#31981)
jason-simmons
pushed a commit
to jason-simmons/flutter_engine
that referenced
this pull request
Mar 22, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
waiting for tree to go green
This PR is approved and tested, but waiting for the tree to be green to land.
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.
Fixes flutter/flutter#99997
I could have named this object DlShader to match the Skia naming, but the name "shader" which once referred to sources of color data has become a more generic term for a variety of GPU programs. I chose DlColorSource to indicate that these are the objects from which rendering objects get their source pixels.
The other "Dl" attributes have so far been directly constructible, but for the case of gradients the objects contain arbitrarily long arrays for colors and stops so I created a constructor that will inline the arrays into the allocated memory (similar to techniques used in SkVertices). Since these constructors are non-standard and since they must be executed with care, I only allow 2 locations to construct these - the DlColorSource::Make methods and the DisplayListBuilder methods that instantiate them into the DisplayList memory itself. These objects are still simple and satisfy the principles outlined in
display_list_attributes.h, but their variable size dictates a slightly different construction technique.