-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] Add support for external GL textures to TiledTextureContents. #47586
Conversation
There are extensions we can check for for the remaining tile modes:
We also currently draw the texture with a repeat mode when we add it to the display list. Maybe we should change that to clamp to edge too |
|
||
// Also, external textures cannot be bound to color filters, so ignore this | ||
// case for now. | ||
FSExternal::BindSAMPLEREXTERNALOESTextureSampler( |
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.
I think we cannot actually hit this case with the API we have today (which doesn't allow adding color/image filters directly to external textures) - so perhaps a DCHECK is appropriate.
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.
which doesn't allow adding color/image filters directly to external textures
Where is this disallowed? 🤔 There is no separate API for external textures in Aiks.
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.
The optimization only applies to color filters that are on the paint object used in the draw call. External texture API does not accept a paint object so all filters need to be applied by a separate composited later
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.
Oh I see, you mean how we expose it to plugins/framework. Added a dcheck. We can easily add support later for other customers if requested.
Since we'll still sometimes need this emulation if supporting all the tiling modes, I think we should add faster paths in a less urgent follow-up. |
This PR isn't urgent, so take your time 😄 |
79b8149
to
bc43e90
Compare
da0d242
to
628d0b7
Compare
Alright, this should be good to review, although I should probably try running the failing benchmark against it before landing. |
@@ -85,6 +88,19 @@ class MockBlitPass : public BlitPass { | |||
(override)); | |||
}; | |||
|
|||
class MockRenderPass : public RenderPass { |
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.
nit: unused.
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.
Overall LGTM, though of course please test on device too.
Also please file issues for the oes tile mode extensions.
Alrighty, I ran the benchmark on device and it didn't crash. Hopefully the builder will stop failing once this rolls in ( |
…138599) flutter/engine@5064aef...90c3ada 2023-11-17 skia-flutter-autoroll@skia.org Roll Dart SDK from 12c5efc94edf to 46e8b18047eb (1 revision) (flutter/engine#48168) 2023-11-17 skia-flutter-autoroll@skia.org Roll Skia from c7d2a4933dfa to c8ee25282849 (2 revisions) (flutter/engine#48164) 2023-11-17 dnfield@google.com Only run systrace test on API 29+, avoid building scenario app for 28 (flutter/engine#48163) 2023-11-17 matanlurey@users.noreply.github.com Make `lib/ui/text/...` compatible with `.clang-tidy`. (flutter/engine#48156) 2023-11-17 matanlurey@users.noreply.github.com Make `flow/...` compatible with `.clang_tidy`. (flutter/engine#48148) 2023-11-17 bdero@google.com [Impeller] Add support for external GL textures to TiledTextureContents. (flutter/engine#47586) 2023-11-17 skia-flutter-autoroll@skia.org Roll Dart SDK from 906f23c1cb20 to 12c5efc94edf (1 revision) (flutter/engine#48157) 2023-11-17 skia-flutter-autoroll@skia.org Roll Skia from 762d95ed65e0 to c7d2a4933dfa (1 revision) (flutter/engine#48159) 2023-11-16 1961493+harryterkelsen@users.noreply.github.com [canvaskit] Size the PictureRecorder when calling Scene.toImage (flutter/engine#48142) 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 jonahwilliams@google.com,rmistry@google.com,zra@google.com 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://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Resolves flutter/flutter#135881.
OES_EGL_image_external only allows CLAMP_TO_EDGE address sampling modes, so emulate the other tiling modes.