WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
62618
[chromium] Compositor shader initialization is inefficient
https://bugs.webkit.org/show_bug.cgi?id=62618
Summary
[chromium] Compositor shader initialization is inefficient
James Robinson
Reported
2011-06-13 19:58:27 PDT
[chromium] Compositor shader initialization is inefficient
Attachments
Patch
(28.05 KB, patch)
2011-06-13 20:12 PDT
,
James Robinson
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
James Robinson
Comment 1
2011-06-13 20:12:24 PDT
Created
attachment 97061
[details]
Patch
James Robinson
Comment 2
2011-06-13 20:39:55 PDT
On my linux z600 this reduces the time from start of compositor initialization to first swapbuffers on the gpu process from 125ms->73ms for a nearly empty page and from 240ms->190ms for maps.google.com.
Vangelis Kokkevis
Comment 3
2011-06-14 00:24:13 PDT
Comment on
attachment 97061
[details]
Patch Looks good!
James Robinson
Comment 4
2011-06-14 10:36:30 PDT
Ken or Stephen, mind do an official WebKit review?
Vangelis Kokkevis
Comment 5
2011-06-14 10:49:53 PDT
Comment on
attachment 97061
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=97061&action=review
> Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp:1106 > + if (!m_borderProgram->initialized()) {
This just in: Is there a reason why you don't call initialize() when the program first gets created?
James Robinson
Comment 6
2011-06-14 10:55:24 PDT
(In reply to
comment #5
)
> (From update of
attachment 97061
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=97061&action=review
> > > Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp:1106 > > + if (!m_borderProgram->initialized()) { > > This just in: Is there a reason why you don't call initialize() when the program first gets created?
Yes, definitely. initialize() queries uniform locations, which is synchronous and flushes the command queue. Calling initialize() when the program is first created will block the renderer until the shader is compiled and linked. By creating the commonly used shaders at compositor startup but not calling initialize() until draw time the GPU process has a reasonable chance to compile the shader while the compositor is doing software painting and uploading. The benefit is easiest to see by comparing traces.
Stephen White
Comment 7
2011-06-14 10:57:10 PDT
Comment on
attachment 97061
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=97061&action=review
> Source/WebCore/ChangeLog:19 > + release builds and force synchronous compilation/linking.
Just out of curiosity: What about bad drivers or machines where we might accidentally exceed hardware limits? Do we want to catch those in release builds in the wild and try to fall back to non-composited mode? Or is this too hard to do gracefully now that they're lazily initialized, and we just rely on the blacklist?
James Robinson
Comment 8
2011-06-14 11:12:31 PDT
If we want to check for failures then we should do it once at the end of initializing the shaders we want instead of after each program. I kind of doubt that's necessary, though - we should be blacklisting cards that can't handle the compositor's shaders.
Stephen White
Comment 9
2011-06-14 11:13:40 PDT
OK, looks good. R=me
WebKit Review Bot
Comment 10
2011-06-14 11:32:48 PDT
Comment on
attachment 97061
[details]
Patch Clearing flags on attachment: 97061 Committed
r88835
: <
http://trac.webkit.org/changeset/88835
>
WebKit Review Bot
Comment 11
2011-06-14 11:32:53 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug