WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 200093
[FTW] Use IWICBitmap (rather than ID2D1Bitmap) for NativeImagePtr
https://bugs.webkit.org/show_bug.cgi?id=200093
Summary
[FTW] Use IWICBitmap (rather than ID2D1Bitmap) for NativeImagePtr
Brent Fulgham
Reported
2019-07-24 12:11:59 PDT
When I wrote the original Direct2D code, I did not realize that the backing memory for the ID2D1Bitmap was inaccessible since it is effectively a representation of GPU memory. There is no API to access or modify the pixels. Instead, MSDN documentation indicates that we should be using IWICBitmap objects, which are converted to ID2D1Bitmap objects when things are ready to be rendered. This makes it possible to use the TextureMapper backend to do efficient compositing and tile drawing, since the data backing the bitmap can now be accessed and manipulated, allowing us to support filters and other effects. This initial naive patch makes the transition, which allows these features to work. There is a lot of room for performance improvements. It's likely that WebKit bitmaps should be handled more efficiently than this initial patch, and I look forward to DirectX experts to help me do so! (Help, Sony People!)
Attachments
WIP Patch
(67.63 KB, patch)
2019-07-24 14:22 PDT
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
WIP Patch
(65.63 KB, patch)
2019-07-24 16:08 PDT
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
Patch
(60.30 KB, patch)
2019-07-24 19:53 PDT
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
Patch
(59.72 KB, patch)
2019-07-24 20:02 PDT
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Brent Fulgham
Comment 1
2019-07-24 14:22:18 PDT
Created
attachment 374809
[details]
WIP Patch
Brent Fulgham
Comment 2
2019-07-24 14:23:12 PDT
This initial WIP patch is just to see if I broke WinCairo or AppleWin ports. I would appreciate input from DirectX experts, though.
Brent Fulgham
Comment 3
2019-07-24 16:08:56 PDT
Created
attachment 374824
[details]
WIP Patch
Brent Fulgham
Comment 4
2019-07-24 19:53:02 PDT
Created
attachment 374851
[details]
Patch
Brent Fulgham
Comment 5
2019-07-24 20:02:43 PDT
Created
attachment 374855
[details]
Patch
WebKit Commit Bot
Comment 6
2019-07-25 15:02:06 PDT
Comment on
attachment 374855
[details]
Patch Clearing flags on attachment: 374855 Committed
r247841
: <
https://trac.webkit.org/changeset/247841
>
WebKit Commit Bot
Comment 7
2019-07-25 15:02:08 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 8
2019-07-25 15:03:19 PDT
<
rdar://problem/53561473
>
Brent Fulgham
Comment 9
2019-08-21 16:30:23 PDT
It turns out that this change is horrible for performance (MotionMark dropped from ~200 down to 4). I'll be backing a large portion of these changes out in a follow-up.
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