Bug 63766

Summary: [WebKit2] Consider scale factor when allocating backing store
Product: WebKit Reporter: Darin Adler <darin>
Component: WebKit2Assignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, dbates, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: All   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

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>