WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
146294
Use CoreAnimation fences instead of synchronous IPC to synchronize resize
https://bugs.webkit.org/show_bug.cgi?id=146294
Summary
Use CoreAnimation fences instead of synchronous IPC to synchronize resize
Tim Horton
Reported
2015-06-24 15:45:28 PDT
Use CoreAnimation fences instead of synchronous IPC to synchronize resize
Attachments
Patch
(16.63 KB, patch)
2015-06-24 15:46 PDT
,
Tim Horton
no flags
Details
Formatted Diff
Diff
Patch
(26.20 KB, patch)
2015-07-09 00:38 PDT
,
Tim Horton
no flags
Details
Formatted Diff
Diff
fix the build
(26.21 KB, patch)
2015-07-09 00:56 PDT
,
Tim Horton
no flags
Details
Formatted Diff
Diff
Patch
(26.15 KB, patch)
2015-07-09 01:41 PDT
,
Tim Horton
no flags
Details
Formatted Diff
Diff
tiny followup
(2.19 KB, patch)
2015-07-10 15:02 PDT
,
Tim Horton
andersca
: review+
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Tim Horton
Comment 1
2015-06-24 15:46:15 PDT
Created
attachment 255521
[details]
Patch
Darin Adler
Comment 2
2015-06-27 14:42:03 PDT
Comment on
attachment 255521
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=255521&action=review
Looks OK. Some problems that need to be fixed before landing.
> Source/WebKit2/UIProcess/API/mac/WKView.mm:4438 > + // This SPI is only used on 10.9 and below, and is incompatible with the fence-based drawing area size synchronization in 10.10+.
Maybe ASSERT_NOT_REACHED?
> Source/WebKit2/UIProcess/API/mac/WKView.mm:4439 > +#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1090
Given the comment above, maybe #if !HAVE(COREANIMATION_FENCES) is a better thing to write here?
> Source/WebKit2/UIProcess/API/mac/WKView.mm:4454 > + // This SPI is only used on 10.9 and below, and is incompatible with the fence-based drawing area size synchronization in 10.10+.
Maybe ASSERT_NOT_REACHED?
> Source/WebKit2/UIProcess/API/mac/WKView.mm:4455 > +#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1090
Given the comment above, maybe #if !HAVE(COREANIMATION_FENCES) is a better thing to write here?
> Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:168 > + m_webPageProxy.process().send(Messages::DrawingArea::UpdateGeometry(m_size, m_layerPosition, true, fencePort), m_webPageProxy.pageID()); > + > }
Stray blank line here. I suggest omitting it.
> Source/WebKit2/WebProcess/WebPage/DrawingArea.h:35 > +#include <WebCore/MachSendRight.h>
This needs to be inside PLATFORM(COCOA) to avoid breaking GTK and EFL builds. I think it would be better just to forward declare as "class MachSendRight", since we only need to compile "const WebCore::MachSendRight&", and a forward declaration is sufficient for that. And those don’t necessarily need to be guarded with PLATFORM(COCOA). I don’t mind leaving the #if out, although some prefer that because they think it’s worth the extra complexity and ugliness to guarantee a compile time error if we try to use the type name at all.
Tim Horton
Comment 3
2015-07-09 00:38:54 PDT
Created
attachment 256467
[details]
Patch
Tim Horton
Comment 4
2015-07-09 00:41:15 PDT
> > Source/WebKit2/UIProcess/API/mac/WKView.mm:4439 > > +#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1090 > > Given the comment above, maybe #if !HAVE(COREANIMATION_FENCES) is a better > thing to write here?
I didn't do this because the code is really not used on 10.10, and leaving it this way means we'll get to delete it sooner :) I made all your other changes, and added a lot more code re: the invalidation of the fences if a sync message arrives. I think this needs an andersca review because of the IPC changes.
WebKit Commit Bot
Comment 5
2015-07-09 00:42:09 PDT
Attachment 256467
[details]
did not pass style-queue: ERROR: Source/WebKit2/Platform/IPC/Connection.h:203: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/Platform/IPC/Connection.h:310: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/Platform/IPC/Connection.cpp:708: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 3 in 20 files If any of these errors are false positives, please file a bug against check-webkit-style.
Tim Horton
Comment 6
2015-07-09 00:56:04 PDT
Created
attachment 256468
[details]
fix the build
WebKit Commit Bot
Comment 7
2015-07-09 00:57:36 PDT
Attachment 256468
[details]
did not pass style-queue: ERROR: Source/WebKit2/Platform/IPC/Connection.h:203: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/Platform/IPC/Connection.h:310: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/Platform/IPC/Connection.cpp:708: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 3 in 20 files If any of these errors are false positives, please file a bug against check-webkit-style.
Tim Horton
Comment 8
2015-07-09 01:41:47 PDT
Created
attachment 256471
[details]
Patch
WebKit Commit Bot
Comment 9
2015-07-09 01:44:17 PDT
Attachment 256471
[details]
did not pass style-queue: ERROR: Source/WebKit2/Platform/IPC/Connection.h:203: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/Platform/IPC/Connection.h:310: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/Platform/IPC/Connection.cpp:708: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 3 in 20 files If any of these errors are false positives, please file a bug against check-webkit-style.
Anders Carlsson
Comment 10
2015-07-09 19:51:30 PDT
Comment on
attachment 256471
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=256471&action=review
> Source/WebCore/platform/cocoa/MachSendRight.h:38 > + WEBCORE_EXPORT MachSendRight() = default;
This doesn't need WEBCORE_EXPORT.
> Source/WebKit2/Platform/IPC/Connection.cpp:221 > + , m_incomingSyncMessageCallbackQueue(WorkQueue::create("com.apple.WebKit.IPC.IncomingSyncMessageCallbackQueue"))
This should be made on demand, there's no point in creating it for all the various connections that don't use this feature.
> Source/WebKit2/Platform/IPC/Connection.cpp:713 > + std::lock_guard<std::mutex> lock(m_incomingSyncMessageCallbackMutex); > + m_incomingSyncMessageCallbacks.add(m_nextIncomingSyncMessageCallbackID, callback); > + > + return m_nextIncomingSyncMessageCallbackID++;
Please change this to get the callback ID before incrementing it so you can make it start at 0.
> Source/WebKit2/Platform/IPC/Connection.cpp:732 > + for (auto it = m_incomingMessages.begin(), end = m_incomingMessages.end(); it != end; ++it) { > + std::unique_ptr<MessageDecoder>& message = *it; > + if (message->isSyncMessage()) > + hasIncomingSyncMessage = true; > + }
Modern for-loop please!
> Source/WebKit2/Platform/IPC/Connection.h:312 > + uint64_t m_nextIncomingSyncMessageCallbackID { 1 };
Should start at zero here.
Tim Horton
Comment 11
2015-07-09 20:46:52 PDT
http://trac.webkit.org/changeset/186662
Tim Horton
Comment 12
2015-07-10 15:02:30 PDT
Reopening to attach new patch.
Tim Horton
Comment 13
2015-07-10 15:02:33 PDT
Created
attachment 256617
[details]
tiny followup
Tim Horton
Comment 14
2015-07-10 15:30:47 PDT
And
http://trac.webkit.org/changeset/186693
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