WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 61925
Add layer factory to GraphicsLayer for creating non-default layer type.
https://bugs.webkit.org/show_bug.cgi?id=61925
Summary
Add layer factory to GraphicsLayer for creating non-default layer type.
Viatcheslav Ostapenko
Reported
2011-06-02 07:21:15 PDT
Webkit2 Qt implementation will use this to create graphics layers.
Attachments
Layer factory method implementation.
(2.97 KB, patch)
2011-06-02 07:28 PDT
,
Viatcheslav Ostapenko
no flags
Details
Formatted Diff
Diff
Fix style error
(2.96 KB, patch)
2011-06-02 07:38 PDT
,
Viatcheslav Ostapenko
no flags
Details
Formatted Diff
Diff
Patch
(2.90 KB, patch)
2011-06-08 21:42 PDT
,
Noam Rosenthal
no flags
Details
Formatted Diff
Diff
Patch
(3.46 KB, patch)
2011-06-09 07:29 PDT
,
Noam Rosenthal
no flags
Details
Formatted Diff
Diff
Patch based on smfr's comments
(3.57 KB, patch)
2011-06-09 20:22 PDT
,
Noam Rosenthal
kenneth
: review+
Details
Formatted Diff
Diff
Patch with an additional comment
(3.76 KB, patch)
2011-06-10 04:39 PDT
,
Noam Rosenthal
no flags
Details
Formatted Diff
Diff
Patch: Use GraphicsLayerFactory in TextureMapper
(1.91 KB, patch)
2011-06-12 20:00 PDT
,
Noam Rosenthal
no flags
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Viatcheslav Ostapenko
Comment 1
2011-06-02 07:28:18 PDT
Created
attachment 95761
[details]
Layer factory method implementation.
WebKit Review Bot
Comment 2
2011-06-02 07:30:49 PDT
Attachment 95761
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h:94: The parameter name "factory" adds no information, so it should be removed. [readability/parameter_name] [5] Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:428: Missing space before ( in if( [whitespace/parens] [5] Total errors found: 2 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
Viatcheslav Ostapenko
Comment 3
2011-06-02 07:38:29 PDT
Created
attachment 95762
[details]
Fix style error
Kenneth Rohde Christiansen
Comment 4
2011-06-05 09:06:54 PDT
As always would be nice with No'am's input
Kenneth Rohde Christiansen
Comment 5
2011-06-05 09:08:23 PDT
Comment on
attachment 95762
[details]
Fix style error View in context:
https://bugs.webkit.org/attachment.cgi?id=95762&action=review
> Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:421 > +void GraphicsLayerTextureMapper::setGraphicsLayerFactory(GraphicsLayerFactory factory)
What is this set method needed for?
Noam Rosenthal
Comment 6
2011-06-05 09:12:49 PDT
(In reply to
comment #4
)
> As always would be nice with No'am's input
I'm working closely with Slava on all of these patches.
Kenneth Rohde Christiansen
Comment 7
2011-06-05 09:14:10 PDT
(In reply to
comment #6
)
> (In reply to
comment #4
) > > As always would be nice with No'am's input > > I'm working closely with Slava on all of these patches.
Having noted in the bug report that you are ok with the change would be nice :-)
Noam Rosenthal
Comment 8
2011-06-05 09:15:56 PDT
(In reply to
comment #5
)
> (From update of
attachment 95762
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=95762&action=review
> > > Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:421 > > +void GraphicsLayerTextureMapper::setGraphicsLayerFactory(GraphicsLayerFactory factory) > > What is this set method needed for?
The WebProcess uses a different GraphicsLayer implementation than the UI process or WebKit1. So the idea is that the WebProcess would call this function on its startup to override the default GraphicsLayer::create.
Noam Rosenthal
Comment 9
2011-06-08 19:19:41 PDT
I feel like the factory function should be in GraphicsLayer and not in GraphicsLayerTextureMapper. I'll post a patch soon.
Noam Rosenthal
Comment 10
2011-06-08 21:42:06 PDT
Created
attachment 96543
[details]
Patch Moved the implementation from GraphicsLayerTextureMapper to GraphicsLayer. This will allow other ports that want to use GraphicsLayer across processes to use this factory, without relying on TextureMapper.
Noam Rosenthal
Comment 11
2011-06-08 23:03:36 PDT
The build failure of windows is a problem with the test bot.
Simon Fraser (smfr)
Comment 12
2011-06-08 23:14:08 PDT
Comment on
attachment 96543
[details]
Patch Can't you just declare a static GraphicsLayer::create() method, and have the implementation in each platform's impl file?
Noam Rosenthal
Comment 13
2011-06-08 23:20:24 PDT
(In reply to
comment #12
)
> (From update of
attachment 96543
[details]
) > Can't you just declare a static GraphicsLayer::create() method, and have the implementation in each platform's impl file?
It's a bit more complicated... We need a different implementation if we're in the web process vs. if we are in the UI process.
Noam Rosenthal
Comment 14
2011-06-08 23:22:06 PDT
(In reply to
comment #13
)
> (In reply to
comment #12
) > > (From update of
attachment 96543
[details]
[details]) > > Can't you just declare a static GraphicsLayer::create() method, and have the implementation in each platform's impl file? > > It's a bit more complicated... > We need a different implementation if we're in the web process vs. if we are in the UI process.
I mean, a different implementation if we're in the web process vs. if we're in WebKit1. This is the only way we can use GraphicsLayers in this way with WebCore being compiled once for WebKit2 and WebKit1.
Simon Fraser (smfr)
Comment 15
2011-06-09 06:45:10 PDT
Comment on
attachment 96543
[details]
Patch Are you going to convert GraphicsLayer::create() to go through the factory for everyone, or just Qt?
Noam Rosenthal
Comment 16
2011-06-09 07:23:36 PDT
(In reply to
comment #15
)
> (From update of
attachment 96543
[details]
) > Are you going to convert GraphicsLayer::create() to go through the factory for everyone, or just Qt?
Just Qt. I considered doing that for everyone but it's too complicated, since people might call GraphicsLayer::create from within their code.
Noam Rosenthal
Comment 17
2011-06-09 07:29:53 PDT
Created
attachment 96586
[details]
Patch Revised the patch, added more information in the ChangeLog.
Simon Fraser (smfr)
Comment 18
2011-06-09 11:27:08 PDT
I think the factory stuff should be #ifdeffed for Qt then.
Noam Rosenthal
Comment 19
2011-06-09 12:02:05 PDT
(In reply to
comment #18
)
> I think the factory stuff should be #ifdeffed for Qt then.
OK, I'll do that, and if other ports want to use the factory they can add it to the #ifdef.
Noam Rosenthal
Comment 20
2011-06-09 20:22:24 PDT
Created
attachment 96693
[details]
Patch based on smfr's comments
Kenneth Rohde Christiansen
Comment 21
2011-06-10 01:37:59 PDT
Comment on
attachment 96693
[details]
Patch based on smfr's comments View in context:
https://bugs.webkit.org/attachment.cgi?id=96693&action=review
> Source/WebCore/platform/graphics/GraphicsLayer.h:372 > + typedef PassOwnPtr<GraphicsLayer> GraphicsLayerFactory(GraphicsLayerClient*); > + static void setGraphicsLayerFactory(GraphicsLayerFactory);
We need a comment here explaining what it is for as that is not totally obvious - at least to me.
Noam Rosenthal
Comment 22
2011-06-10 04:39:49 PDT
Created
attachment 96733
[details]
Patch with an additional comment
WebKit Review Bot
Comment 23
2011-06-10 04:55:34 PDT
The commit-queue encountered the following flaky tests while processing
attachment 96733
[details]
: http/tests/local/stylesheet-and-script-load-order.html
bug 62450
(author:
koivisto@iki.fi
) The commit-queue is continuing to process your patch.
WebKit Review Bot
Comment 24
2011-06-10 04:56:48 PDT
Comment on
attachment 96733
[details]
Patch with an additional comment Clearing flags on attachment: 96733 Committed
r88541
: <
http://trac.webkit.org/changeset/88541
>
WebKit Review Bot
Comment 25
2011-06-10 04:56:54 PDT
All reviewed patches have been landed. Closing bug.
Noam Rosenthal
Comment 26
2011-06-12 20:00:47 PDT
Created
attachment 96911
[details]
Patch: Use GraphicsLayerFactory in TextureMapper
WebKit Review Bot
Comment 27
2011-06-13 09:17:07 PDT
Comment on
attachment 96911
[details]
Patch: Use GraphicsLayerFactory in TextureMapper Clearing flags on attachment: 96911 Committed
r88643
: <
http://trac.webkit.org/changeset/88643
>
WebKit Review Bot
Comment 28
2011-06-13 09:17:13 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