WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
84909
Background tabs are fuzzy until repaint when deviceScaleFactor > 1
https://bugs.webkit.org/show_bug.cgi?id=84909
Summary
Background tabs are fuzzy until repaint when deviceScaleFactor > 1
Beth Dakin
Reported
2012-04-25 17:00:48 PDT
In WebKit2, if you open background tabs with a deviceScaleFactor > 1, they will appear fuzzy at first when you bring them to the foreground. A repaint fixes the problem. <
rdar://problem/11312064
> Patch forthcoming.
Attachments
Patch
(6.64 KB, patch)
2012-04-25 17:09 PDT
,
Beth Dakin
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Beth Dakin
Comment 1
2012-04-25 17:09:06 PDT
Created
attachment 138903
[details]
Patch
Darin Adler
Comment 2
2012-04-25 17:26:52 PDT
Comment on
attachment 138903
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=138903&action=review
> Source/WebKit2/Platform/cg/CGUtilities.h:32 > +void paintBitmapContext(CGContextRef, CGContextRef bitmapContext, CGPoint destination, CGRect source, float scaleFactor);
Why float instead of CGFloat?
> Source/WebKit2/UIProcess/mac/BackingStoreMac.mm:101 > + IntSize scrolledRectSize = m_scrolledRect.size(); > + scrolledRectSize.scale(m_deviceScaleFactor);
I think it’s a little unclear to have a local variable named scrolledRectSize that is not the same as m_scrolledRect.size(). Maybe its should be named scrolledRectPixelsSize or scaledSize or something like that?
> Source/WebKit2/UIProcess/mac/BackingStoreMac.mm:109 > - CGContextTranslateCTM(context.get(), 0, m_scrolledRect.size().height()); > + CGContextTranslateCTM(context.get(), 0, m_scrolledRect.height());
This change seems to be unneeded. I am guessing you changed this to use scrolledRectSize and then later changed it back.
Beth Dakin
Comment 3
2012-04-25 17:39:41 PDT
(In reply to
comment #2
)
> (From update of
attachment 138903
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=138903&action=review
> > > Source/WebKit2/Platform/cg/CGUtilities.h:32 > > +void paintBitmapContext(CGContextRef, CGContextRef bitmapContext, CGPoint destination, CGRect source, float scaleFactor); > > Why float instead of CGFloat? >
No good reason. Will fix.
> > Source/WebKit2/UIProcess/mac/BackingStoreMac.mm:101 > > + IntSize scrolledRectSize = m_scrolledRect.size(); > > + scrolledRectSize.scale(m_deviceScaleFactor); > > I think it’s a little unclear to have a local variable named scrolledRectSize that is not the same as m_scrolledRect.size(). Maybe its should be named scrolledRectPixelsSize or scaledSize or something like that? >
Will change.
> > Source/WebKit2/UIProcess/mac/BackingStoreMac.mm:109 > > - CGContextTranslateCTM(context.get(), 0, m_scrolledRect.size().height()); > > + CGContextTranslateCTM(context.get(), 0, m_scrolledRect.height()); > > This change seems to be unneeded. I am guessing you changed this to use scrolledRectSize and then later changed it back.
Good catch. Will fix. Thanks!
Beth Dakin
Comment 4
2012-04-25 17:45:58 PDT
Committed change:
http://trac.webkit.org/changeset/115266
Darin Adler
Comment 5
2012-04-25 17:52:51 PDT
Comment on
attachment 138903
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=138903&action=review
>>> Source/WebKit2/Platform/cg/CGUtilities.h:32 >>> void paintImage(CGContextRef, CGImageRef, CGFloat scaleFactor, CGPoint destination, CGRect source); >>> -void paintBitmapContext(CGContextRef, CGContextRef bitmapContext, CGPoint destination, CGRect source); >>> +void paintBitmapContext(CGContextRef, CGContextRef bitmapContext, CGPoint destination, CGRect source, float scaleFactor); >> >> Why float instead of CGFloat? > > No good reason. Will fix.
On further reflection, it might make more sense to keep the argument order the same for these two functions. As a follow-up cleanup patch we could move the scale factor back before the destination rect to match paintImage.
Beth Dakin
Comment 6
2012-04-25 18:07:04 PDT
(In reply to
comment #5
)
> On further reflection, it might make more sense to keep the argument order the same for these two functions. As a follow-up cleanup patch we could move the scale factor back before the destination rect to match paintImage.
Done:
http://trac.webkit.org/changeset/115270
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