Bug 170653 - WTR: Avoid conversion from platform image to WKImage and then to platform image again when dumping pixel results
Summary: WTR: Avoid conversion from platform image to WKImage and then to platform ima...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-09 01:46 PDT by Carlos Garcia Campos
Modified: 2017-04-10 03:16 PDT (History)
5 users (show)

See Also:


Attachments
Patch (15.24 KB, patch)
2017-04-09 01:55 PDT, Carlos Garcia Campos
thorton: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews124 for ios-simulator-wk2 (350.96 KB, application/zip)
2017-04-09 03:08 PDT, Build Bot
no flags Details
Patch for landing (15.70 KB, patch)
2017-04-10 00:57 PDT, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff
Patch for landing (15.73 KB, patch)
2017-04-10 01:58 PDT, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2017-04-09 01:46:03 PDT
When dumping pixels from a web view snapshot, we create a platform image that is then converted to a WKImage, which is a ShareableBitmap, so the image is rendered into a graphics context. Then we immediately extract the platform image back from the WKImage to dump the pixels. We could avoid that conversion by taking the web snapshot from TestInvocation::dumpPixelsAndCompareWithExpected().
Comment 1 Carlos Garcia Campos 2017-04-09 01:55:13 PDT
Created attachment 306611 [details]
Patch
Comment 2 Build Bot 2017-04-09 03:08:32 PDT
Comment on attachment 306611 [details]
Patch

Attachment 306611 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/3505055

Number of test failures exceeded the failure limit.
Comment 3 Build Bot 2017-04-09 03:08:33 PDT
Created attachment 306615 [details]
Archive of layout-test-results from ews124 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews124  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.6
Comment 4 Carlos Garcia Campos 2017-04-09 23:30:41 PDT
hmm, it seems the iOS changes are not correct, I'll try to figure out
Comment 5 Carlos Garcia Campos 2017-04-10 00:57:46 PDT
Created attachment 306668 [details]
Patch for landing

I think the problem in iOS is that we were releasing CARenderServerBufferRef too early, so I've added a callback to CGDataProviderCreateWithData and moved the call to CARenderServerDestroyBuffer there.
Comment 6 Carlos Garcia Campos 2017-04-10 01:58:02 PDT
Created attachment 306672 [details]
Patch for landing
Comment 7 WebKit Commit Bot 2017-04-10 03:16:29 PDT
Comment on attachment 306672 [details]
Patch for landing

Clearing flags on attachment: 306672

Committed r215176: <http://trac.webkit.org/changeset/215176>
Comment 8 WebKit Commit Bot 2017-04-10 03:16:31 PDT
All reviewed patches have been landed.  Closing bug.