WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
101801
[Texmap][CSS Shaders] Reuse the precompiled shader for custom filters in TextureMapperGL
https://bugs.webkit.org/show_bug.cgi?id=101801
Summary
[Texmap][CSS Shaders] Reuse the precompiled shader for custom filters in Text...
Alexandru Chiculita
Reported
2012-11-09 14:44:16 PST
The shader is always recompiled before paint. Add code to cache the shader at least until next paint.
Attachments
Patch V1
(28.51 KB, patch)
2012-11-17 07:27 PST
,
Alexandru Chiculita
noam
: review-
noam
: commit-queue-
Details
Formatted Diff
Diff
Patch V2
(34.55 KB, patch)
2012-11-17 16:31 PST
,
Alexandru Chiculita
noam
: review+
noam
: commit-queue-
Details
Formatted Diff
Diff
Patch V3
(36.16 KB, patch)
2012-11-17 17:44 PST
,
Alexandru Chiculita
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Alexandru Chiculita
Comment 1
2012-11-17 07:27:13 PST
Created
attachment 174817
[details]
Patch V1
Noam Rosenthal
Comment 2
2012-11-17 09:50:05 PST
Comment on
attachment 174817
[details]
Patch V1 View in context:
https://bugs.webkit.org/attachment.cgi?id=174817&action=review
Great progress, see comments.
> Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:152 > + WebCustomFilterProgramProxy* customFilterProgramProxy = static_cast<WebCustomFilterProgramProxy*>(program->platformCompiledProgram()->client());
This seems a bit messy... I am sure we have enough information in LayerTreeCoordinator to know which shaders we have to send.
> Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:159 > + if (!customFilterProgramProxy->wasSentToUIProcess()) {
I would prefer if we sent all the new programs to the Ui process in LayerTreeCoordinator rather than here with an if condition.
> Source/WebKit2/Shared/CoordinatedGraphics/WebCustomFilterProgramProxy.h:75 > + bool wasSentToUIProcess() const { return m_wasSentToUIProcess; }
Sent you went through the trouble of creating this class, maybe it should also do its own encoding/decoding rather than leave it to CoordinatedGraphicsArgumentCoders.
> Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:292 > + injectCachedCustomFilterPrograms(const_cast<FilterOperations&>(filters));
Would be cleaner to create a local copy and inject to it rather than const_cast
Alexandru Chiculita
Comment 3
2012-11-17 13:44:42 PST
(In reply to
comment #2
)
> (From update of
attachment 174817
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=174817&action=review
> > Great progress, see comments.
Thanks Noam, your comments make sense. I will integrate the feedback and upload again.
Alexandru Chiculita
Comment 4
2012-11-17 16:31:46 PST
Created
attachment 174832
[details]
Patch V2 Integrated the feedback.
Noam Rosenthal
Comment 5
2012-11-17 16:44:18 PST
Comment on
attachment 174832
[details]
Patch V2 View in context:
https://bugs.webkit.org/attachment.cgi?id=174832&action=review
Very nice! Some pre-landing nits below...
> Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:270 > + int programId = 0; > + if (!decoder->decode(programId))
programID
> Source/WebKit2/Shared/CoordinatedGraphics/WebCustomFilterOperation.h:50 > + int programId() const { return m_programId; }
programID() and m_programID (WebKit style)
> Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:313 > + } > + WebCustomFilterOperation* customOperation = static_cast<WebCustomFilterOperation*>(operation);
Add line break
> Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:319 > + if (iter == m_customFilterPrograms.end()) { > + ASSERT_NOT_REACHED(); > + continue; > + }
ASSERT(iter != m_customFilterPrograms.end())
> Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:338 > + if (iter == m_customFilterPrograms.end()) { > + ASSERT_NOT_REACHED(); > + return; > + }
Ditto
Noam Rosenthal
Comment 6
2012-11-17 17:01:08 PST
btw we should probably call checkCustomFilterProgramProxies for filter operations inside an animation, otherwise those might not be rendered correctly.
Alexandru Chiculita
Comment 7
2012-11-17 17:05:18 PST
(In reply to
comment #6
)
> btw we should probably call checkCustomFilterProgramProxies for filter operations inside an animation, otherwise those might not be rendered correctly.
Hm.. didn't know the filter animations are accelerated on Texture Mapper. Will do.
Alexandru Chiculita
Comment 8
2012-11-17 17:44:48 PST
Created
attachment 174835
[details]
Patch V3 I've added the animations fix, so I've set the CQ+ flag again. @Noam: is there an automatic way to test the composited animations?
Noam Rosenthal
Comment 9
2012-11-17 17:47:43 PST
(In reply to
comment #8
)
> @Noam: is there an automatic way to test the composited animations?
Unfortunately not really quite yet, we would need good support for taking several pixel snapshots for the same page and that's tricky.
WebKit Review Bot
Comment 10
2012-11-17 18:14:16 PST
Comment on
attachment 174835
[details]
Patch V3 Clearing flags on attachment: 174835 Committed
r135056
: <
http://trac.webkit.org/changeset/135056
>
WebKit Review Bot
Comment 11
2012-11-17 18:14:20 PST
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