-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] Support external textures on iOS #36498
[Impeller] Support external textures on iOS #36498
Conversation
Ping @ColdPaleLight. Is there anything to do to unblock making progress on this? We'd really like to work on this as it is a high priority task but don't want to step on your toes :) |
@chinmaygarde I think this PR is ready for review now :) |
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.
This is awesome. Thank you so much. Apologies for the late reply. The team was out for an offsite recently but things should start picking back now.
grContext:grContext | ||
width:textureSize.width() | ||
height:textureSize.height()]; | ||
#if IMPELLER_SUPPORTS_RENDERING |
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.
Is the ifdef check necessary at all on Darwin TUs? AFAIK, only Fuchsia has this off.
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.
Done.
context:(flutter::Texture::PaintContext&)context { | ||
#if IMPELLER_SUPPORTS_RENDERING | ||
if (_enableImpeller) { | ||
IMPELLER_UNIMPLEMENTED |
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.
Can we add a validation log here instead and also add a followup bug for its implementation?
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.
Done.
/** | ||
* MTLDevice that is backing this context.s | ||
*/ | ||
@property(nonatomic, readonly) id<MTLDevice> device; |
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.
Isn't this redundant? It could just as easily be accessed via the context below.
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.
Done.
/** | ||
* Impeller context; | ||
*/ | ||
@property(nonatomic, readonly) std::shared_ptr<impeller::Context> context; |
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.
Perhaps make this ContextMTL so callers don't have to cast. There is no way this can be anything else in the Darwin context.
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.
Done.
…113766) * 7d18d7007 [Impeller] Support external textures on iOS (flutter/engine#36498) * d07919654 [Impeller] Implement RuntimeEffectContents (flutter/engine#36866) * 119e839ef Revert "[Impeller] Implement RuntimeEffectContents (#36866)" (flutter/engine#36883) * bcd83df4e [Impeller] Reland RuntimeEffectContents (flutter/engine#36884)
fix flutter/flutter#112364
Texture::PaintContext
to pass parameters.I have tested this patch locally and it works well.
Note that external textures in YUV format are not yet supported, I will support it in the PR #36685.
Pre-launch Checklist
writing and running engine tests.
///
).