Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1)

Issue 6501050: Using the device scale factor for glyph positioning (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years ago by tdanderson
Modified:
14 years ago
CC:
skia-review_googlegroups.com, rjkroege, rbyers
Base URL:
http://git.chromium.org/external/skia/src.git@master
Visibility:
Public.

Description

Using the device scale factor for glyph positioning Patch for initial discussion only. This seems to work correctly and have the same effect as the patch for https://bugs.webkit.org/show_bug.cgi?id=94028 . The master bug is http://code.google.com/p/chromium/issues/detail?id=138101 . behdad@ suggested that the changes in SkFontHost_FreeType::SkFontHost_FreeType() would work provided that we had access to the device scale factor. However, this constructor gets called on both the layout and rendering paths, and we only want to use the scale factor for the rendering path (otherwise the scale factor should be 1). Based on tracing the two code paths, I believe this patch demonstrates that the approach will work. Note that the changes in https://codereview.appspot.com/6493048 should also be included in this CL (for some reason my src/ and include/ directories were in different repos so I had to upload these as separate CLs). BUG=

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -24 lines) Patch
M core/SkGlyphCache.h View 3 chunks +4 lines, -4 lines 0 comments Download
M core/SkGlyphCache.cpp View 3 chunks +4 lines, -4 lines 0 comments Download
M core/SkPaint.cpp View 4 chunks +15 lines, -7 lines 1 comment Download
M core/SkScalerContext.h View 1 chunk +1 line, -1 line 0 comments Download
M core/SkScalerContext.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M ports/SkFontHost_FreeType.cpp View 4 chunks +11 lines, -6 lines 0 comments Download

Messages

Total messages: 9
wjmaclean
LGTM in general, no obvious red flags ... https://codereview.appspot.com/6501050/diff/1/core/SkPaint.cpp File core/SkPaint.cpp (right): https://codereview.appspot.com/6501050/diff/1/core/SkPaint.cpp#newcode1862 core/SkPaint.cpp:1862: scaleFactor ...
14 years ago (2012-08-28 21:00:15 UTC) #1
behdad
LGTM in general.
14 years ago (2012-08-29 14:16:01 UTC) #2
reed1
The change seems to be: Have the hinted metrics ignore the device scale (which is ...
14 years ago (2012-08-29 17:36:49 UTC) #3
behdad
On 2012/08/29 17:36:49, reed1 wrote: > The change seems to be: Have the hinted metrics ...
14 years ago (2012-08-29 17:51:26 UTC) #4
reed1
If that proves out, we will need a 3rd approach, as we can't change skia ...
14 years ago (2012-08-29 17:53:13 UTC) #5
behdad
On 2012/08/29 17:53:13, reed1 wrote: > If that proves out, we will need a 3rd ...
14 years ago (2012-08-29 17:54:45 UTC) #6
reed1
On 2012/08/29 17:54:45, behdad wrote: > On 2012/08/29 17:53:13, reed1 wrote: > > If that ...
14 years ago (2012-08-29 17:55:25 UTC) #7
behdad
On 2012/08/29 17:55:25, reed1 wrote: > On 2012/08/29 17:54:45, behdad wrote: > > On 2012/08/29 ...
14 years ago (2012-08-31 02:55:25 UTC) #8
tdanderson
14 years ago (2012-09-07 20:22:00 UTC) #9
On 2012/08/31 02:55:25, behdad wrote:
> On 2012/08/29 17:55:25, reed1 wrote:
> > On 2012/08/29 17:54:45, behdad wrote:
> > > On 2012/08/29 17:53:13, reed1 wrote:
> > > > If that proves out, we will need a 3rd approach, as we can't change skia
> to
> > > > never give the composed hinted metrics, as this CL does.
> > > 
> > > Humm?  I thought a scaleFactor of 1.0 would make the code behave as it
> > currently
> > > does?
> > 
> > If there is a scale on the matrix, we will not pass 1.0
> 
> My bad.  I didn't notice how the patch works.  Terry is working on a proper
> solution.
> 
> In the meantime, here's a document explaining what is to be achieved:
> 
>   http://go/high-dpi

The approach in this CL is no longer being pursued. See
https://codereview.appspot.com/6495089/ instead.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b