WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
98733
[WK2] Add CustomFilterOperation serialization in ArgumentCoder.
https://bugs.webkit.org/show_bug.cgi?id=98733
Summary
[WK2] Add CustomFilterOperation serialization in ArgumentCoder.
Dongseong Hwang
Reported
2012-10-09 02:30:51 PDT
Add ArgumentCoders for CustomFilterOperation and all dependent classes. Coordinated graphics will use this css shaders serialization when it enables CSS Shaders.
Attachments
Patch
(26.86 KB, patch)
2012-10-09 02:47 PDT
,
Dongseong Hwang
no flags
Details
Formatted Diff
Diff
Patch
(26.86 KB, patch)
2012-10-09 03:32 PDT
,
Dongseong Hwang
no flags
Details
Formatted Diff
Diff
Patch
(24.51 KB, patch)
2012-10-09 14:59 PDT
,
Dongseong Hwang
no flags
Details
Formatted Diff
Diff
Patch
(43.75 KB, patch)
2012-10-10 03:24 PDT
,
Dongseong Hwang
no flags
Details
Formatted Diff
Diff
Patch
(46.49 KB, patch)
2012-10-12 21:44 PDT
,
Dongseong Hwang
no flags
Details
Formatted Diff
Diff
Patch
(46.71 KB, patch)
2012-10-14 15:44 PDT
,
Dongseong Hwang
no flags
Details
Formatted Diff
Diff
Patch
(46.48 KB, patch)
2012-10-14 21:06 PDT
,
Dongseong Hwang
no flags
Details
Formatted Diff
Diff
Patch
(46.48 KB, patch)
2012-10-14 22:22 PDT
,
Dongseong Hwang
no flags
Details
Formatted Diff
Diff
Patch
(46.49 KB, patch)
2012-10-15 03:42 PDT
,
Dongseong Hwang
no flags
Details
Formatted Diff
Diff
Patch
(46.48 KB, patch)
2012-10-15 03:47 PDT
,
Dongseong Hwang
no flags
Details
Formatted Diff
Diff
Patch
(46.91 KB, patch)
2012-10-18 03:20 PDT
,
Dongseong Hwang
no flags
Details
Formatted Diff
Diff
Show Obsolete
(10)
View All
Add attachment
proposed patch, testcase, etc.
Dongseong Hwang
Comment 1
2012-10-09 02:47:43 PDT
Created
attachment 167718
[details]
Patch
Early Warning System Bot
Comment 2
2012-10-09 03:00:28 PDT
Comment on
attachment 167718
[details]
Patch
Attachment 167718
[details]
did not pass qt-wk2-ews (qt): Output:
http://queues.webkit.org/results/14218639
Dongseong Hwang
Comment 3
2012-10-09 03:32:20 PDT
Created
attachment 167722
[details]
Patch
Noam Rosenthal
Comment 4
2012-10-09 04:21:55 PDT
Comment on
attachment 167722
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=167722&action=review
> Source/WebCore/GNUmakefile.list.am:4362 > + Source/WebCore/platform/graphics/filters/StillCustomFilterProgram.h \
How about we call it WebCustomFilterProgram, and put it in WebKit2/Shared?
> Source/WebCore/rendering/style/StyleCustomFilterProgram.h:60 > + virtual bool isStyleCustomFilterProgram() const OVERRIDE { return true; } > +
Do you over have a StillCustomFilterProgram and a StyleCustomFilterProgram in the same process? I don't think these comparisons are necessary.
Dongseong Hwang
Comment 5
2012-10-09 14:31:43 PDT
(In reply to
comment #4
)
> How about we call it WebCustomFilterProgram, and put it in WebKit2/Shared?
Thanks for suggestions. I actually did not know where is the best place. :)
> Do you over have a StillCustomFilterProgram and a StyleCustomFilterProgram in the same process? > I don't think these comparisons are necessary.
No, always lay in separate processes. Absolutely!
Dongseong Hwang
Comment 6
2012-10-09 14:59:22 PDT
Created
attachment 167854
[details]
Patch
Anders Carlsson
Comment 7
2012-10-09 16:29:45 PDT
Comment on
attachment 167854
[details]
Patch I don't think we want to allow sending arbitrary shader strings from the web process to the UI process.
Noam Rosenthal
Comment 8
2012-10-09 17:14:57 PDT
(In reply to
comment #7
)
> (From update of
attachment 167854
[details]
) > I don't think we want to allow sending arbitrary shader strings from the web process to the UI process.
We want to allow this for coordinated graphics (Qt/EFL). Any opposition to doing this if it's guarded with USE(COORDINATED_GRAPHICS)?
Noam Rosenthal
Comment 9
2012-10-09 18:38:37 PDT
(In reply to
comment #8
)
> (In reply to
comment #7
) > > (From update of
attachment 167854
[details]
[details]) > > I don't think we want to allow sending arbitrary shader strings from the web process to the UI process. > > We want to allow this for coordinated graphics (Qt/EFL). > Any opposition to doing this if it's guarded with USE(COORDINATED_GRAPHICS)?
Though in any case we would want to validate the shader first, and then serialize the CustomFilterValidatedProgram.
Dongseong Hwang
Comment 10
2012-10-09 21:01:52 PDT
(In reply to
comment #9
)
> (In reply to
comment #8
) > > (In reply to
comment #7
) > > > (From update of
attachment 167854
[details]
[details] [details]) > > > I don't think we want to allow sending arbitrary shader strings from the web process to the UI process. > > > > We want to allow this for coordinated graphics (Qt/EFL). > > Any opposition to doing this if it's guarded with USE(COORDINATED_GRAPHICS)?
CSS_FILTERS and CSS_SHADERS guard are already in the USE(COORDINATED_GRAPHICS).
> > Though in any case we would want to validate the shader first, and then serialize the CustomFilterValidatedProgram.
Thank Anders and Noam for very valid concerns. The most critical requirement is that UI TexMap never execute author's arbitrary shaders. I think there are two solutions: 1. As Noam mentioned, validate the shader first, and then serialize the CustomFilterValidatedProgram. 2. Serialize CustomFilterProgram, and validate the shader using CustomFilterValidatedProgram. I prefer the second solution, because : 1. Texmap will receive CustomFilterOperation that has CustomFilterProgram as a member variable. 2. We can validate arbitrary shaders using ANGLE validator with the SH_CSS_SHADERS_SPEC flag like CustomFilterValidatedProgram does. 3. Texmap can reuse many custom filter classes without huge refactoring. I support the third reason. createCustomFilterEffect() in FilterEffectRenderer makes CustomFilterValidatedProgram and FECustomFilter from CustomFilterOperation. FECustomFilter plays a all role to render css shaders. I think TexMap reuse FECustomFilter to render css shaders because TexMap can have CustomFilterProgram though we need to refactor FECustomFilter little. In conclusion, if we choose the second solution, we can enable css shaders in TexMap reusing existing custom filter classes. If you don't mind, I want to enable css shaders in TexMap soon.
Noam Rosenthal
Comment 11
2012-10-09 21:12:37 PDT
Thank you for the explanation! How about we guard all this with USE(COORDINATED_GRAPHICS), and move it out of WebCoreArgumentCoders.[h|cpp] tp WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.[h|cpp], This way there would be no confusion about what this is used for. Andersca, any issues with this?
Dongseong Hwang
Comment 12
2012-10-09 22:07:38 PDT
(In reply to
comment #11
)
> Thank you for the explanation! > How about we guard all this with USE(COORDINATED_GRAPHICS), and move it out of WebCoreArgumentCoders.[h|cpp] tp WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.[h|cpp],
It's good idea. I can do this in this bug.
Dongseong Hwang
Comment 13
2012-10-10 03:24:57 PDT
Created
attachment 167967
[details]
Patch
Noam Rosenthal
Comment 14
2012-10-11 22:14:58 PDT
Comment on
attachment 167967
[details]
Patch Please rename StillCustomFilterProgram to WebCustomFilterProgram.
Dongseong Hwang
Comment 15
2012-10-12 21:44:46 PDT
Created
attachment 168539
[details]
Patch
Dongseong Hwang
Comment 16
2012-10-12 21:54:16 PDT
(In reply to
comment #14
)
> (From update of
attachment 167967
[details]
) > Please rename StillCustomFilterProgram to WebCustomFilterProgram.
Done. I filed
Bug 98990
to enable CSS Shaders in TexMap. If you don't mind, I want to enable css shaders in TexMap. I'm afraid that I filed that bug by myself thought your team or you may be working on now.
Noam Rosenthal
Comment 17
2012-10-13 00:40:04 PDT
Comment on
attachment 168539
[details]
Patch Please use CoordinatedGraphicsArgumentCoders and not CoordinatedArgumentCoders (only noticed that now)
Noam Rosenthal
Comment 18
2012-10-13 00:43:33 PDT
(In reply to
comment #16
)
> (In reply to
comment #14
) > > (From update of
attachment 167967
[details]
[details]) > > Please rename StillCustomFilterProgram to WebCustomFilterProgram. > > Done. > > I filed
Bug 98990
to enable CSS Shaders in TexMap. If you don't mind, I want to enable css shaders in TexMap. I'm afraid that I filed that bug by myself thought your team or you may be working on now.
Nobody is currently working on it. If you get it running it would be awesome!
Dongseong Hwang
Comment 19
2012-10-14 15:44:09 PDT
Created
attachment 168595
[details]
Patch
Dongseong Hwang
Comment 20
2012-10-14 15:49:44 PDT
(In reply to
comment #18
)
> Nobody is currently working on it. If you get it running it would be awesome!
Thanks! I'm very glad that I can contribute useful patches to TexMap soon. (In reply to
comment #17
)
> (From update of
attachment 168539
[details]
) > Please use CoordinatedGraphicsArgumentCoders and not CoordinatedArgumentCoders (only noticed that now)
Oops. I'm sorry for causing this redundant iteration.
Noam Rosenthal
Comment 21
2012-10-14 18:48:18 PDT
Comment on
attachment 168595
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=168595&action=review
Great! Please fix nit-picks before committing...
> Source/WebKit2/ChangeLog:10 > + Coordinated Graphics will use this css shaders serialization when it enables CSS > + Shaders.
Please remove these lines.
> Source/WebKit2/ChangeLog:30 > + WebCustomFilterProgram is made from serialized data of > + StyleCustomFilterProgram in UI Process. UI Process uses this class > + instead of StyleCustomFilterProgram because UI Process can not get a > + custom filter program via network.
Just say "WebCustomFilterProgram is made to serialize the data of a StyleCustomFilterProgram to the UI process."
> Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:29 > +#if USE(COORDINATED_GRAPHICS)
Put this line after the main include
> Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:150 > + encoder->encode(parameters[i]->name()); > + encoder->encodeEnum(parameters[i]->parameterType());
Please save parameters[i] in a local variable.
Noam Rosenthal
Comment 22
2012-10-14 18:49:25 PDT
> Oops. I'm sorry for causing this redundant iteration.
Thank you for helping with developing this feature! It's highly appreciated. Iterations are absolutely welcome as long as you're open to feedback :)
Dongseong Hwang
Comment 23
2012-10-14 21:02:45 PDT
Comment on
attachment 168595
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=168595&action=review
>> Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:29 >> +#if USE(COORDINATED_GRAPHICS) > > Put this line after the main include
Do I mean like following code? I don't understand fully what do you say. #include "config.h" #include "CoordinatedGraphicsArgumentCoders.h" #if USE(COORDINATED_GRAPHICS) These code are similar to GraphicsContext3D. #include "config.h" #if USE(3D_GRAPHICS) #include "GraphicsContext3D.h"
Dongseong Hwang
Comment 24
2012-10-14 21:06:21 PDT
Created
attachment 168619
[details]
Patch
Dongseong Hwang
Comment 25
2012-10-14 21:07:43 PDT
Comment on
attachment 168595
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=168595&action=review
>> Source/WebKit2/ChangeLog:10 >> + Shaders. > > Please remove these lines.
Done.
>> Source/WebKit2/ChangeLog:30 >> + custom filter program via network. > > Just say "WebCustomFilterProgram is made to serialize the data of a StyleCustomFilterProgram to the UI process."
Done. Thanks for rephrasing
>>> Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:29 >>> +#if USE(COORDINATED_GRAPHICS) >> >> Put this line after the main include > > Do I mean like following code? I don't understand fully what do you say. > #include "config.h" > #include "CoordinatedGraphicsArgumentCoders.h" > #if USE(COORDINATED_GRAPHICS) > > > These code are similar to GraphicsContext3D. > #include "config.h" > > #if USE(3D_GRAPHICS) > > #include "GraphicsContext3D.h"
Done as I understood. Check please.
>> Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:150 >> + encoder->encodeEnum(parameters[i]->parameterType()); > > Please save parameters[i] in a local variable.
Done.
Dongseong Hwang
Comment 26
2012-10-14 21:09:33 PDT
(In reply to
comment #22
)
> Thank you for helping with developing this feature! It's highly appreciated. Iterations are absolutely welcome as long as you're open to feedback :)
Thank you! and I think I'm open :)
Noam Rosenthal
Comment 27
2012-10-14 21:18:27 PDT
Comment on
attachment 168619
[details]
Patch Looks good, but patch doesn't apply on EWS
Noam Rosenthal
Comment 28
2012-10-14 21:20:32 PDT
Comment on
attachment 168619
[details]
Patch Looks fine, but patch doesn't apply...
Dongseong Hwang
Comment 29
2012-10-14 22:22:13 PDT
Created
attachment 168625
[details]
Patch
Dongseong Hwang
Comment 30
2012-10-14 22:23:11 PDT
(In reply to
comment #28
)
> (From update of
attachment 168619
[details]
) > Looks fine, but patch doesn't apply...
I don't know what's happen. I post the patch again.
Dongseong Hwang
Comment 31
2012-10-15 03:42:16 PDT
Created
attachment 168668
[details]
Patch
Dongseong Hwang
Comment 32
2012-10-15 03:44:00 PDT
Comment on
attachment 168625
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=168625&action=review
> Source/WebKit2/Shared/CoordinatedGraphics/WebCustomFilterProgram.h:61 > + , m_fragmentShaderString(m_fragmentShaderString)
There is typo to initialize m_fragmentShaderString from m_fragmentShaderString. It is why I posted new patch.
Dongseong Hwang
Comment 33
2012-10-15 03:47:27 PDT
Created
attachment 168670
[details]
Patch
Dongseong Hwang
Comment 34
2012-10-18 03:20:57 PDT
Created
attachment 169382
[details]
Patch
Dongseong Hwang
Comment 35
2012-10-18 03:22:20 PDT
(In reply to
comment #34
)
> Created an attachment (id=169382) [details] > Patch
Rebase upstream.
WebKit Review Bot
Comment 36
2012-10-18 06:38:28 PDT
Comment on
attachment 169382
[details]
Patch Clearing flags on attachment: 169382 Committed
r131741
: <
http://trac.webkit.org/changeset/131741
>
WebKit Review Bot
Comment 37
2012-10-18 06:38:34 PDT
All reviewed patches have been landed. Closing bug.
Csaba Osztrogonác
Comment 38
2012-10-18 09:53:13 PDT
(In reply to
comment #36
)
> (From update of
attachment 169382
[details]
) > Clearing flags on attachment: 169382 > > Committed
r131741
: <
http://trac.webkit.org/changeset/131741
>
It broke the Qt --minimal build: /ramdisk/qt-linux-release-minimal/build/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:66: error: 'WebKit' is not a namespace-name /ramdisk/qt-linux-release-minimal/build/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:66: error: expected namespace-name before ';' token Could you fix it, please?
Csaba Osztrogonác
Comment 39
2012-10-18 11:44:48 PDT
after commenting the using namespace line, I got one more error: /home/oszi/WebKit/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:260: error: 'WebCustomFilterProgram' has not been declared
Dongseong Hwang
Comment 40
2012-10-18 15:46:28 PDT
(In reply to
comment #39
)
> after commenting the using namespace line, I got one more error: > /home/oszi/WebKit/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:260: error: 'WebCustomFilterProgram' has not been declared
I'm sorry. I'll fix ASAP.
Dongseong Hwang
Comment 41
2012-10-18 16:44:00 PDT
(In reply to
comment #38
)
> Could you fix it, please?
Thanks for reporting! I filed a
Bug 99775
and posted a patch.
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