WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
127438
WebKit2 View Gestures (Swipe): Add a simple cache of view snapshots
https://bugs.webkit.org/show_bug.cgi?id=127438
Summary
WebKit2 View Gestures (Swipe): Add a simple cache of view snapshots
Tim Horton
Reported
2014-01-22 11:49:58 PST
This is a cache of bitmap snapshots of the WKView, for use in the forthcoming fluid swipe implementation. For now, it just stores all snapshots forever.
https://bugs.webkit.org/show_bug.cgi?id=127389
and
https://bugs.webkit.org/show_bug.cgi?id=127390
track improvements.
Attachments
patch
(24.59 KB, patch)
2014-01-22 12:06 PST
,
Tim Horton
no flags
Details
Formatted Diff
Diff
patch disabled by default
(25.68 KB, patch)
2014-01-22 13:04 PST
,
Tim Horton
no flags
Details
Formatted Diff
Diff
patch
(29.50 KB, patch)
2014-01-23 18:00 PST
,
Tim Horton
sam
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Tim Horton
Comment 1
2014-01-22 12:06:53 PST
Created
attachment 221887
[details]
patch
Tim Horton
Comment 2
2014-01-22 12:20:58 PST
Errm, I need a way to make us not take snapshots if swiping isn't enabled.
Tim Horton
Comment 3
2014-01-22 13:04:09 PST
Created
attachment 221897
[details]
patch disabled by default
Sam Weinig
Comment 4
2014-01-22 21:10:16 PST
Comment on
attachment 221897
[details]
patch disabled by default View in context:
https://bugs.webkit.org/attachment.cgi?id=221897&action=review
> Source/WebKit2/UIProcess/mac/ViewSnapshotStore.h:48 > + CGImageRef getSnapshotAndRenderTreeSize(WebBackForwardListItem*, uint64_t& renderTreeSize);
This should return a std::pair<RetainPtr<CGImageRef>, uint64_t>
> Source/WebKit2/UIProcess/mac/ViewSnapshotStore.mm:76 > + WKView *wkView = webPageProxy.wkView();
This class should not know about WKView! Instead, takeSnapshot() should really do all its work through the PageClient interface. Is there a WebCore image type we could use for this kind of thing instead of CGImageRef directly?
Tim Horton
Comment 5
2014-01-23 01:26:17 PST
(In reply to
comment #4
)
> (From update of
attachment 221897
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=221897&action=review
> > > Source/WebKit2/UIProcess/mac/ViewSnapshotStore.h:48 > > + CGImageRef getSnapshotAndRenderTreeSize(WebBackForwardListItem*, uint64_t& renderTreeSize); > > This should return a std::pair<RetainPtr<CGImageRef>, uint64_t>
So much better.
> > Source/WebKit2/UIProcess/mac/ViewSnapshotStore.mm:76 > > + WKView *wkView = webPageProxy.wkView(); > > This class should not know about WKView! Instead, takeSnapshot() should really do all its work through the PageClient interface.
OK.
> Is there a WebCore image type we could use for this kind of thing instead of CGImageRef directly?
I didn't want to get too locked into something like that until we figure out the purgeability story.
Sam Weinig
Comment 6
2014-01-23 11:27:30 PST
> > Is there a WebCore image type we could use for this kind of thing instead of CGImageRef directly? > > I didn't want to get too locked into something like that until we figure out the purgeability story.
Ok.
Anders Carlsson
Comment 7
2014-01-23 11:29:14 PST
(In reply to
comment #5
)
> > > > This class should not know about WKView! Instead, takeSnapshot() should really do all its work through the PageClient interface. >
For classes that are Mac only I see no problem exposing the view directly. Maybe this is not a Mac only class though.
Sam Weinig
Comment 8
2014-01-23 11:35:57 PST
(In reply to
comment #7
)
> (In reply to
comment #5
) > > > > > > This class should not know about WKView! Instead, takeSnapshot() should really do all its work through the PageClient interface. > > > > For classes that are Mac only I see no problem exposing the view directly. Maybe this is not a Mac only class though.
I have been trying to keep a division still. If something wants to know about the WKView, it should be in UIProcess/API/Cocoa or UIProcess/API/Mac.
Anders Carlsson
Comment 9
2014-01-23 12:03:05 PST
(In reply to
comment #8
)
> (In reply to
comment #7
) > > (In reply to
comment #5
) > > > > > > > > This class should not know about WKView! Instead, takeSnapshot() should really do all its work through the PageClient interface. > > > > > > > For classes that are Mac only I see no problem exposing the view directly. Maybe this is not a Mac only class though. > > I have been trying to keep a division still. If something wants to know about the WKView, it should be in UIProcess/API/Cocoa or UIProcess/API/Mac.
And that's why PageClient is a clusterfuck of random unrelated functions...
Tim Horton
Comment 10
2014-01-23 18:00:13 PST
Created
attachment 222054
[details]
patch
Tim Horton
Comment 11
2014-01-24 10:52:17 PST
http://trac.webkit.org/changeset/162710
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