Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@matanlurey
Copy link
Contributor

Closes flutter/flutter#132994.

I suspect this is imperfect, so please suggest any changes or additions (either using GitHub's tooling or as a review comment).

/cc @dnfield

@matanlurey matanlurey requested a review from flar August 22, 2023 16:43
@flar
Copy link
Contributor

flar commented Aug 22, 2023

It's a start. It might be worth mentioning the odd stateful nature of the paint attributes which I don't think DlOpReceiver really describes in much detail. There is a short description in that interface right before all of the setFoo() attribute setters, but it should be called out in the "class comment" and we should also point out that they persist through and beyond save/restore calls unlike the clip and transform state.

Copy link
Contributor

@flar flar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Submitting review based on previous comments

@matanlurey matanlurey requested a review from flar August 22, 2023 21:26
@matanlurey matanlurey force-pushed the engine-document-dl-sk-classes branch from 15d9d4d to 8500e4c Compare August 22, 2023 21:26
@matanlurey
Copy link
Contributor Author

Added a note!

Copy link
Contributor

@flar flar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These comments are backwards and misplaced.

These files are the Skia-specific implementation of DL interfaces. None of them are developer facing as is, but one of them does at least implement a developer-facing API and that is the DlSkCanvasAdapter which implements the public DlCanvas interface.

The comments here should be on DlCanvas and DlOpReceiver (and they need to be swapped for the most part, except that the comment about state is appropriate for the Receiver implementation (named Dispatcher because that is what it used to be called)).

Mostly these 2 Skia class should just say "the Skia-specific implementation of Dl..." and the comments about whether they are developer-facing or not should be on the DlFoo interfaces.

@flar
Copy link
Contributor

flar commented Aug 22, 2023

Class comment for DlCanvas in dl_canvas.h should be something like:


This is the engine developer facing API for rendering anything within the engine. It should be the API used to render anything in the framework classes (lib/ui), flow and flow/layers, embedders, shell, etc.

The only state carried by implementations of this interface are the clip and transform which are saved and restored by the |save|, |saveLayer|, and |restore| calls. (possibly explain that in more detail if you think it needs it)

The interface resembles closely the familiar SkCanvas interface that was used throughout the engine.

see DlSkAdapter(sp?)
see impeller::class that Dan is working on?


Then DlOpReceiver in dl_op_receiver.h should be something like:


This is an internal implementation interface for rendering backends that need to interact with recorded display lists. The DisplayList object will play back recorded operations in this format. Most developers should not needed to deal with this interface unless they are writing a utility that needs to examine the contents of a display list.

[Mention that it also has the same clip/transform state as DlCanvas, and...]
[Description of attribute state]

see DlSkDispatcher(sp?)
see impeller::DlDispatcher(sp?)
see DlOpSpy


DlSk* are only implementations, they shouldn't be the place where we document these interfaces. They should simply point people to the DlCanvas or DlOpReceiver interfaces and mention that they are the Skia-specific implementation of those interface classes...

@matanlurey
Copy link
Contributor Author

Tried my best :), feel free to point out anything additional!

@matanlurey matanlurey requested a review from flar August 23, 2023 00:11
@matanlurey matanlurey requested a review from flar August 25, 2023 23:31
Copy link
Contributor

@flar flar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor grammar typos to fix...

engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 28, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Aug 28, 2023
…133508)

flutter/engine@91522a1...a7a4c1c

2023-08-28 [email protected] Explain how to update the embedder/fixtures golden outputs. (flutter/engine#45184)
2023-08-28 [email protected] Roll Skia from ded5d08a9999 to 83f6fbad8a38 (1 revision) (flutter/engine#45183)
2023-08-28 [email protected] [Impeller] Simplify color source + text with new Skia API. (flutter/engine#45090)
2023-08-28 [email protected] Re-write docs for DlSkCanvas{Adapter|Dispatcher}. (flutter/engine#44961)
2023-08-28 [email protected] Roll Skia from 5baa2c74fbc6 to ded5d08a9999 (1 revision) (flutter/engine#45181)
2023-08-28 [email protected] Roll Skia from 651ada29fcb0 to 5baa2c74fbc6 (2 revisions) (flutter/engine#45178)
2023-08-28 [email protected] Roll Skia from 477659e6f41b to 651ada29fcb0 (3 revisions) (flutter/engine#45176)
2023-08-28 [email protected] [Impeller] Only enable captures in debug builds. (flutter/engine#45174)
2023-08-28 [email protected] Roll Skia from ce99ad7b587e to 477659e6f41b (1 revision) (flutter/engine#45173)
2023-08-28 [email protected] Skwasm platform views (flutter/engine#43011)
2023-08-28 [email protected] Roll Skia from df783b542165 to ce99ad7b587e (2 revisions) (flutter/engine#45172)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
gaaclarke pushed a commit to gaaclarke/engine that referenced this pull request Aug 30, 2023
Closes flutter/flutter#132994.

I suspect this is imperfect, so please suggest any changes or additions (either using GitHub's tooling or as a review comment).

/cc @dnfield
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Engine] There are 2+ ways that DisplayList* results in SkPaint (which is confusing)

2 participants