Bug 201706

Summary: [FTW] Improve Bitmap handling performance
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: WebKit Misc.Assignee: Brent Fulgham <bfulgham>
Status: NEW    
Severity: Normal CC: achristensen, bfulgham, dino, don.olmstead, Hironori.Fujii
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Brent Fulgham
Reported 2019-09-11 17:05:10 PDT
The ImageBufferData implementation does complicated copying of data from GPU ID2D1Bitmap -> CPU ID2D1Bitmap1 and back when the render targets are not compatible. But Direct2D already has a mechanism for sharing between multiple render targets on the same device. This patch makes the following changes: 1. If the render target requested when drawing does not match the target used to create the bitmap, use the CreateSharedBitmap API to create a new bitmap that shares GPU memory with the original bitmap. 2. Since all of our rendering is to an IDXGISurface1, don't bother creating an HWND-backed temporary surface (since it has to be moved to the DXGI surface anyway). Start with the IDXGISurface as the backing store. These changes improve motion mark from 98.07 -> 120.66.
Attachments
Patch (5.62 KB, patch)
2019-09-11 17:12 PDT, Brent Fulgham
no flags
Brent Fulgham
Comment 1 2019-09-11 17:12:20 PDT
Brent Fulgham
Comment 2 2019-09-11 22:04:35 PDT
Comment on attachment 378603 [details] Patch This patch isn't quite right. I see the SharedBitmap sometimes being blank, which is wrong.
Note You need to log in before you can comment on or make changes to this bug.