Bug 170653

Summary: WTR: Avoid conversion from platform image to WKImage and then to platform image again when dumping pixel results
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, commit-queue, lforschler, simon.fraser, thorton
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
thorton: review+, buildbot: commit-queue-
Archive of layout-test-results from ews124 for ios-simulator-wk2
none
Patch for landing
none
Patch for landing none

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.