-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Progressive JPEG in a composited layer should render while loading #15503
Progressive JPEG in a composited layer should render while loading #15503
Conversation
EWS run on previous version of this PR (hash 8c7221e) |
8c7221e
to
403f32b
Compare
EWS run on previous version of this PR (hash 403f32b) |
403f32b
to
6f64717
Compare
EWS run on previous version of this PR (hash 6f64717) |
@@ -3185,9 +3185,11 @@ void RenderLayerBacking::updateImageContents(PaintedContentsInfo& contentsInfo) | |||
if (!image) | |||
return; | |||
|
|||
#if (!PLATFORM(GTK) || !PLATFORM(WPE) || !PLATFORM(WIN) || !PLATFORM(PLAYSTATION)) |
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.
Wouldnβt PLATFORM(COCOA) be more appropriate here? Also youβre using || instead of &&
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.
Good shout on && but I want to avoid (COCOCA) because it might be effecting more platforms like MACCATALYST etc., so I opted to do this instead of macOS restriction.
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.
@donny-dont - Fixed '&&' bit in next commit.
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.
Was thinking more on this and is there a reason why ports wouldnβt want this code enabled?
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.
In case of Apple platforms, it requires all images which go through compositor layer to not load immediately but loaded in one go, which defeat purpose of 'progressive' loading for JPEG (if they have filter or transforms applied or something which pushes them to be composited). So for other ports, this will also delay loading, so I am adding this part behind platform flags to not delay loading if they are composited images on other platform and continue to load progressively.
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.
Try loading this https://jsfiddle.net/6y4zjb17/ on Safari vs Chrome.
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.
@fujii & @donny-dont - I will wait for @smfr's input to help me understand on which platform, we need to add this flag (e.g., COCOA only or some others as well).
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.
Maybe an ENABLE
flag would be more appropriate here then?
https://bugs.webkit.org/show_bug.cgi?id=249113 rdar://problem/103499397 Reviewed by NOBODY (OOPS!). Inspired: https://src.chromium.org/viewvc/blink?view=revision&revision=198593 A progressive JPEG image renders while it loads, but currently it does not when the image is in a composited layer. It should render the same way, layered or not, so do that. Although this is required in case of Apple platforms leveraging Core Graphics. Hence, I added platform flags to disable this behavior for other platforms. It will lead to improved progressive JPEG loading from in specific scenarios (i.e., transform: translateZ). This patch is without test case since it would require serving JPEG progressively and I am not sure, it would be possible within EWS. * Source/WebCore/rendering/RenderLayerBacking.cpp: (RenderLayerBacking::updateImageContents): Add platform flags around 'cachedImage' loading case
6f64717
to
b47cafd
Compare
EWS run on current version of this PR (hash b47cafd) |
b47cafd