Bug 98048

Summary: Don't allow compositing to be disabled in forced compositing mode
Product: WebKit Reporter: Balazs Kelemen <kbalazs>
Component: Tools / TestsAssignee: Balazs Kelemen <kbalazs>
Status: RESOLVED INVALID    
Severity: Normal CC: abarth, aroben, gustavo, jamesr, jturcotte, mrobinson, philn, simon.fraser, vangelis, xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 94800    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

Balazs Kelemen
Reported 2012-10-01 10:59:59 PDT
... because it makes the whole system confused. It brakes the syncronisation between UI and web process rendering, giving me empty pixel dumps with the patch applied from bug 95992. In fact we don't support the non-accelerated path so don't pretend that we do.
Attachments
Patch (2.10 KB, patch)
2012-10-01 11:12 PDT, Balazs Kelemen
no flags
Patch (2.43 KB, patch)
2012-10-03 01:52 PDT, Balazs Kelemen
no flags
Patch (2.98 KB, patch)
2012-10-03 05:13 PDT, Balazs Kelemen
no flags
Patch (2.70 KB, patch)
2012-10-03 05:43 PDT, Balazs Kelemen
no flags
Patch (3.79 KB, patch)
2012-10-03 06:04 PDT, Balazs Kelemen
no flags
Patch (5.22 KB, patch)
2012-10-03 06:15 PDT, Balazs Kelemen
no flags
Patch (7.63 KB, patch)
2012-10-04 05:53 PDT, Balazs Kelemen
no flags
Balazs Kelemen
Comment 1 2012-10-01 11:12:37 PDT
Balazs Kelemen
Comment 2 2012-10-01 11:15:01 PDT
For example css3/filters tests would broke after bug 95992 lands because of this.
Jocelyn Turcotte
Comment 3 2012-10-02 02:43:10 PDT
Comment on attachment 166508 [details] Patch This feels a bit hidden in a corner and I think this doesn't need to be restricted to layout tests. What about making sure that this setting has no effect and gets overridden if forceCompositingMode() == true in DrawingAreaImpl?
Simon Fraser (smfr)
Comment 4 2012-10-02 11:47:08 PDT
(In reply to comment #3) > (From update of attachment 166508 [details]) > This feels a bit hidden in a corner and I think this doesn't need to be restricted to layout tests. What about making sure that this setting has no effect and gets overridden if forceCompositingMode() == true in DrawingAreaImpl? Agreed. Seems like the wrong place to enforce this.
Balazs Kelemen
Comment 5 2012-10-03 01:52:13 PDT
Build Bot
Comment 6 2012-10-03 02:14:48 PDT
Jocelyn Turcotte
Comment 7 2012-10-03 02:29:30 PDT
Comment on attachment 166829 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=166829&action=review > Source/WebCore/page/Settings.h:512 > - void setForceCompositingMode(bool flag) { m_forceCompositingMode = flag; } > + void setForceCompositingMode(bool flag) > + { Settings.h is pretty clean already, I would send this to the .cpp if you expand it. > Source/WebCore/page/Settings.h:513 > + setAcceleratedCompositingEnabled(true); I wouldn't call this if flag == false. > Source/WebCore/page/Settings.h:514 > + m_forceCompositingMode = flag; Since setAcceleratedCompositingEnabled depends on m_forceCompositingMode, I would set this before calling setAcceleratedCompositingEnabled, just to be clean in case somebody updates this code in the future.
Balazs Kelemen
Comment 8 2012-10-03 05:13:30 PDT
Build Bot
Comment 9 2012-10-03 05:26:10 PDT
Balazs Kelemen
Comment 10 2012-10-03 05:43:47 PDT
Created attachment 166871 [details] Patch Rather not bothering with the constness here as it affects exported symbols.
Build Bot
Comment 11 2012-10-03 05:53:38 PDT
Balazs Kelemen
Comment 12 2012-10-03 05:57:43 PDT
I was wrong, this is about the setForceCompositingMode became non-inline so it should been exported.
Balazs Kelemen
Comment 13 2012-10-03 06:04:05 PDT
Balazs Kelemen
Comment 14 2012-10-03 06:07:02 PDT
Comment on attachment 166873 [details] Patch Ops, forget about gtk...
Balazs Kelemen
Comment 15 2012-10-03 06:15:21 PDT
Build Bot
Comment 16 2012-10-03 06:48:36 PDT
Comment on attachment 166874 [details] Patch Attachment 166874 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/14152115 New failing tests: http/tests/workers/terminate-during-sync-operation.html
Build Bot
Comment 17 2012-10-03 06:48:40 PDT
Balazs Kelemen
Comment 18 2012-10-03 07:15:09 PDT
Could you help me fixing the build? Things that I don't know: * I added the new symbol to symbol.filters but the Gtk build is still not happy. Is the symbol I added correct? I constructed the mandled by cloning it from another function with the same signature and changed the name. Should I edit any other file for the Gtk build? * Which file should I edit for the Windows build? Both platforms want to use setAcceleratedCompositingEnabled from InternalSettings.cpp (libWebCoreTestSupport).
Balazs Kelemen
Comment 19 2012-10-04 01:38:48 PDT
(In reply to comment #18) > Could you help me fixing the build? Things that I don't know: > > * I added the new symbol to symbol.filters but the Gtk build is still not happy. Is the symbol I added correct? I constructed the mangled name by cloning it from another function with the same signature and changed the name. Should I edit any other file for the Gtk build? > * Which file should I edit for the Windows build? > > Both platforms want to use setAcceleratedCompositingEnabled from InternalSettings.cpp (libWebCoreTestSupport). Added more people in hope that they could help me with this :)
Jocelyn Turcotte
Comment 20 2012-10-04 02:45:26 PDT
(In reply to comment #18) > * I added the new symbol to symbol.filters but the Gtk build is still not happy. Is the symbol I added correct? I constructed the mandled by cloning it from another function with the same signature and changed the name. Should I edit any other file for the Gtk build? setMockScrollbarsEnabled is static, it's not the same signature. By looking at methods present in both symbols.filter and WebCore.exp.in it seems like the only difference in mangling is the extra underscore at the beginning. > * Which file should I edit for the Windows build? > I'm just guessing but it seems to be Source/WebKit2/win/WebKit2.def and Source/WebKit2/win/WebKit2CFLite.def. The WebKit2 dll seems to links in their WebKit1 API as well.
Balazs Kelemen
Comment 21 2012-10-04 05:53:25 PDT
Balazs Kelemen
Comment 22 2012-10-04 06:41:58 PDT
Comment on attachment 167087 [details] Patch Clearing flags on attachment: 167087 Committed r130389: <http://trac.webkit.org/changeset/130389>
Balazs Kelemen
Comment 23 2012-10-04 06:42:04 PDT
All reviewed patches have been landed. Closing bug.
James Robinson
Comment 24 2012-10-11 16:09:10 PDT
This broke chromium.
Vangelis Kokkevis
Comment 25 2012-10-11 16:20:38 PDT
(In reply to comment #24) > This broke chromium. It's also a bad idea to change the value of one setting based on that of another. There's logic in RenderLayerCompositor::cacheAcceleratedCompositingFlags() to set the value of m_forceCompositingMode based on a handful of conditions (including the isAcceleratedCompositingEnabled Setting). This seems like an awkward fix to a problem that lies elsewhere in the code.
Balazs Kelemen
Comment 26 2012-10-12 02:00:24 PDT
(In reply to comment #24) > This broke chromium. Give some info about how it broke it, please!
Balazs Kelemen
Comment 27 2012-10-12 02:11:46 PDT
(In reply to comment #25) > (In reply to comment #24) > > This broke chromium. > > It's also a bad idea to change the value of one setting based on that of another. There's logic in RenderLayerCompositor::cacheAcceleratedCompositingFlags() to set the value of m_forceCompositingMode based on a handful of conditions (including the isAcceleratedCompositingEnabled Setting). > > This seems like an awkward fix to a problem that lies elsewhere in the code. This function only sets m_forceCompositingMode to true if acceleratedCompositingEnabled is true so I think it doesn't conflict with the patch. This patch can break things in two cases: * if you set forceCompositingMode somewhere and expect that acceleratedCompositing is not necessarily true * if you want to disable acceleratedCompositing while forceCompositingMode is true Both situations seem to be a bit strange. Anyway, I'm going to roll out the patch because it seems to be a bad idea to add such logic to Settings instead of letting it's users handle that.
Balazs Kelemen
Comment 28 2012-10-12 02:25:44 PDT
Vangelis Kokkevis
Comment 29 2012-10-12 09:35:14 PDT
(In reply to comment #28) > Reverted in http://trac.webkit.org/changeset/131162 Thank you for reverting! Chrome uses the two flags independently and isAcceleratedCompositingEnabled is somewhat of a master switch (most often triggered by our GPU blacklist) to turn all other compositing off.
Note You need to log in before you can comment on or make changes to this bug.