Bug 63766 - [WebKit2] Consider scale factor when allocating backing store
Summary: [WebKit2] Consider scale factor when allocating backing store
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac All
: P2 Normal
Assignee: Darin Adler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-30 16:01 PDT by Darin Adler
Modified: 2011-07-16 22:46 PDT (History)
3 users (show)

See Also:


Attachments
Patch (26.17 KB, patch)
2011-06-30 16:18 PDT, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (26.32 KB, patch)
2011-06-30 16:18 PDT, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (14.46 KB, patch)
2011-06-30 18:09 PDT, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (14.46 KB, patch)
2011-06-30 18:21 PDT, Darin Adler
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Adler 2011-06-30 16:01:55 PDT
[WebKit2] Consider scale factor when allocating backing store
Comment 1 Darin Adler 2011-06-30 16:18:00 PDT
Created attachment 99392 [details]
Patch
Comment 2 Darin Adler 2011-06-30 16:18:57 PDT
Created attachment 99393 [details]
Patch
Comment 3 Anders Carlsson 2011-06-30 16:38:50 PDT
Comment on attachment 99393 [details]
Patch

I don't think we should complicate ShareableBitmap by introducing the notion of a scale factor into the design. The ShareableBitmap is intended to be pixel-based and not know anything about scale factors.
Comment 4 Darin Adler 2011-06-30 17:04:56 PDT
(In reply to comment #3)
> I don't think we should complicate ShareableBitmap by introducing the notion of a scale factor into the design. The ShareableBitmap is intended to be pixel-based and not know anything about scale factors.

I did that because ShareableBitmap is both the class that is making the graphics context for drawing into the bitmap and the class that is doing the painting from the bitmap. If I try to do this at another level, I expect I’ll have to modify multiple classes. But I’ll give it a shot.
Comment 5 Darin Adler 2011-06-30 18:09:10 PDT
Created attachment 99408 [details]
Patch
Comment 6 Darin Adler 2011-06-30 18:10:20 PDT
This patch handles less then the previous version. It does not take the backing scale factor into account when dealing with the find indicator. It was easier to share code for that when it was handled at the bitmap level. But I can do the find indicator separately.
Comment 7 Darin Adler 2011-06-30 18:21:39 PDT
Created attachment 99412 [details]
Patch
Comment 8 Darin Adler 2011-06-30 18:22:20 PDT
This new one is just the previous patch rebased. I assume that was needed to make it apply on Qt, for example. Given what EWS now says, I guess I was wrong.
Comment 9 WebKit Review Bot 2011-06-30 20:06:57 PDT
Comment on attachment 99412 [details]
Patch

Clearing flags on attachment: 99412

Committed r90198: <http://trac.webkit.org/changeset/90198>
Comment 10 WebKit Review Bot 2011-06-30 20:07:02 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Daniel Bates 2011-07-16 22:46:19 PDT
For completeness, the scale factor overloaded ShareableBitmap::paint() will need to be implemented for Qt, GTK, and Cairo.

Filed bugs:

Qt: <https://bugs.webkit.org/show_bug.cgi?id=64663>
GTK: <https://bugs.webkit.org/show_bug.cgi?id=64664>
Cairo: <https://bugs.webkit.org/show_bug.cgi?id=64665>