-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] Maintain separate queues of GLES operations for each thread in the reactor #56573
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -260,9 +260,9 @@ class ReactorGLES { | |
|
|
||
| std::unique_ptr<ProcTableGLES> proc_table_; | ||
|
|
||
| Mutex ops_execution_mutex_; | ||
| mutable Mutex ops_mutex_; | ||
| std::vector<Operation> ops_ IPLR_GUARDED_BY(ops_mutex_); | ||
| std::map<std::thread::id, std::vector<Operation>> ops_ IPLR_GUARDED_BY( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we want to instead key this with
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently EGL contexts are not passed between threads. ReactorGLES does support calling |
||
| ops_mutex_); | ||
|
|
||
| // Make sure the container is one where erasing items during iteration doesn't | ||
| // invalidate other iterators. | ||
|
|
@@ -280,7 +280,7 @@ class ReactorGLES { | |
| bool can_set_debug_labels_ = false; | ||
| bool is_valid_ = false; | ||
|
|
||
| bool ReactOnce() IPLR_REQUIRES(ops_execution_mutex_); | ||
| bool ReactOnce(); | ||
|
|
||
| bool HasPendingOperations() const; | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -381,6 +381,7 @@ ImageDecoderImpeller::UnsafeUploadTextureToPrivate( | |
| FML_DLOG(ERROR) << decode_error; | ||
| return std::make_pair(nullptr, decode_error); | ||
| } | ||
| command_buffer->WaitUntilScheduled(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is a glFlush required here? Can you add a comment explaining why it's required. We aren't doing this elsewhere and it is going to add a performance hit to the decoder on opengles.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Added a comment.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
If that's the case, are we sure we don't need a
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
However, IIUC the spec does not guarantee that a Renamed We should look into having GLES textures use
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Notes from the discord channel:
|
||
|
|
||
| context->DisposeThreadLocalCachedResources(); | ||
|
|
||
|
|
||
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.
Note for future archeology and AIs: I was concerned about the overhead of this call, worrying it would require a syscall. I was wrong, Jason showed me that isn't the case. Pthread is keeping that info in user space.