-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fillText
after transferControlToOffscreen
for canvas doesn't draw
#47233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fillText
after transferControlToOffscreen
for canvas doesn't draw
#47233
Conversation
EWS run on previous version of this PR (hash 6c52b86) |
Safer C++ Build #41670 (6c52b86)❌ Found 1 failing file with 2 issues. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
6c52b86
to
0330c20
Compare
EWS run on previous version of this PR (hash 0330c20) |
@@ -48,14 +48,17 @@ class PlaceholderRenderingContextSource : public ThreadSafeRefCounted<Placeholde | |||
void setPlaceholderBuffer(ImageBuffer&); | |||
|
|||
// Called by the placeholder context to attach to compositor layer. | |||
void setContentsToLayer(GraphicsLayer&); | |||
void setContentsToLayer(GraphicsLayer&, ImageBuffer*); | |||
|
|||
private: | |||
explicit PlaceholderRenderingContextSource(PlaceholderRenderingContext&); | |||
|
|||
WeakPtr<PlaceholderRenderingContext> m_placeholder; // For main thread use. |
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 WTF_GUARDED_BY_CAPABILITY(mainThread)
to this one too?
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.
Cannot, the weakptr pointer itself is copied at worker thread to the main thread function closure.
|
||
private: | ||
explicit PlaceholderRenderingContextSource(PlaceholderRenderingContext&); | ||
|
||
WeakPtr<PlaceholderRenderingContext> m_placeholder; // For main thread use. | ||
Lock m_lock; | ||
RefPtr<GraphicsLayerAsyncContentsDisplayDelegate> m_delegate WTF_GUARDED_BY_LOCK(m_lock); | ||
unsigned m_bufferVersion { 0 }; |
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 guess we can't use WTF_GUARDED_BY_CAPABILITY(!mainThread)
, but maybe just a comment that it's from the placeholdee's thread?
0330c20
to
cb6dc77
Compare
EWS run on previous version of this PR (hash cb6dc77) |
fillText
after transferControlToOffscreen
for canvas doesn't draw
EWS run on current version of this PR (hash 69b1ded) |
fillText
after transferControlToOffscreen
for canvas doesn't draw
69b1ded
to
cb6dc77
Compare
https://bugs.webkit.org/show_bug.cgi?id=290042 rdar://147925254 Reviewed by Matt Woodrow. PlaceholderRenderingContextSource::setPlaceholderBuffer can be called before the delegate is provided (either due to a race, or due to the <canvas> element for which this is a placeholder not being in a Document). * LayoutTests/TestExpectations: * Source/WebCore/html/canvas/PlaceholderRenderingContext.cpp: (WebCore::PlaceholderRenderingContextSource::setPlaceholderBuffer): (WebCore::PlaceholderRenderingContextSource::setContentsToLayer): (WebCore::PlaceholderRenderingContext::setContentsToLayer): * Source/WebCore/html/canvas/PlaceholderRenderingContext.h: (WebCore::PlaceholderRenderingContextSource::WTF_GUARDED_BY_LOCK): (WebCore::PlaceholderRenderingContextSource::WTF_GUARDED_BY_CAPABILITY): Canonical link: https://commits.webkit.org/296714@main
cb6dc77
to
323a593
Compare
Committed 296714@main (323a593): https://commits.webkit.org/296714@main Reviewed commits have been landed. Closing PR #47233 and removing active labels. |
323a593
69b1ded
🧪 wpe-wk2🧪 ios-wk2🧪 api-mac🧪 api-wpe🧪 ios-wk2-wpt🧪 mac-wk1🧪 api-ios🧪 mac-wk2🧪 gtk-wk2🧪 mac-wk2-stress🧪 api-gtk🧪 vision-wk2🧪 mac-intel-wk2