-
Notifications
You must be signed in to change notification settings - Fork 6k
Make IOManager own resource context #7272
Conversation
lib/ui/io_manager.h
Outdated
| #include "third_party/skia/include/gpu/GrContext.h" | ||
|
|
||
| namespace blink { | ||
| // Interface for methods that manage access to the resource GrConext and Skia |
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.
typo: GrContext
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.
Thanks - fixed
|
/cc @amirh |
lib/ui/ui_dart_state.cc
Outdated
| fml::WeakPtr<GrContext> UIDartState::GetResourceContext() const { | ||
| return resource_context_; | ||
| if (!io_manager_) { | ||
| return fml::WeakPtr<GrContext>(); |
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: Since the type is already known, you can replace this line with just return {};
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
… into resource_context_manager2
|
Note - updated some tests here for async image and updated the golden (looks like improvements in Skia's encoding caused this). |
Fixes flutter/flutter#24798
Successor to #7243 - that approach seemed like it would ultimately fail, even though it has some similarities to this one.
This exposes an IOManager interface in
lib/uiso thatruntimeandlib/uican access the resource GrContext and SkiaUnrefQueue via the IOManager. Ensures that the resource GrContext is created on the IO task runner.This does not require changes to the Platform View implementation, so shouldn't affect Fuchsia the way the other one would have.