Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Issue 413523004: content: Remove RendererPreferences font-rendering enums. (Closed)

Created:
6 years, 5 months ago by Daniel Erat
Modified:
6 years, 5 months ago
CC:
chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, jam, nasko+codewatch_chromium.org
Project:
chromium
Visibility:
Public.

Description

content: Remove RendererPreferences font-rendering enums. Make the RendererPreferences message struct use enums from gfx::FontRenderParams instead of defining its own. This also drops the SYSTEM_DEFAULT values for hinting and subpixel rendering. They weren't getting used anywhere. BUG=393243 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=285145

Patch Set 1 #

Total comments: 10

Patch Set 2 : use matching, more-conservative defaults between FontRenderParams and RendererPreferences #

Patch Set 3 : fix android compile, hopefully #

Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -188 lines) Patch
M android_webview/native/aw_settings.cc View 1 2 2 chunks +2 lines, -43 lines 0 comments Download
M chrome/browser/renderer_preferences_util.cc View 2 chunks +2 lines, -47 lines 0 comments Download
M content/common/view_messages.h View 1 chunk +2 lines, -2 lines 0 comments Download
M content/public/common/renderer_preferences.h View 3 chunks +3 lines, -19 lines 0 comments Download
M content/public/common/renderer_preferences.cc View 1 2 chunks +4 lines, -4 lines 0 comments Download
M content/renderer/render_view_linux.cc View 2 chunks +47 lines, -69 lines 0 comments Download
M ui/gfx/font_render_params.cc View 1 1 chunk +4 lines, -4 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
Daniel Erat
msw: code review, please jochen: approval for content and chrome jln: security review for view_messages.h
6 years, 5 months ago (2014-07-22 19:57:04 UTC) #1
Daniel Erat
https://codereview.chromium.org/413523004/diff/1/content/renderer/render_view_linux.cc File content/renderer/render_view_linux.cc (right): https://codereview.chromium.org/413523004/diff/1/content/renderer/render_view_linux.cc#newcode19 content/renderer/render_view_linux.cc:19: // When anti-aliasing is off, GTK maps all non-zero ...
6 years, 5 months ago (2014-07-22 19:58:56 UTC) #2
msw
https://codereview.chromium.org/413523004/diff/1/content/public/common/renderer_preferences.cc File content/public/common/renderer_preferences.cc (right): https://codereview.chromium.org/413523004/diff/1/content/public/common/renderer_preferences.cc#newcode25 content/public/common/renderer_preferences.cc:25: hinting(gfx::FontRenderParams::HINTING_SLIGHT), RendererPreferencesToSkiaHinting used Normal for default previously, is this ...
6 years, 5 months ago (2014-07-22 20:58:35 UTC) #3
Daniel Erat
https://codereview.chromium.org/413523004/diff/1/content/public/common/renderer_preferences.cc File content/public/common/renderer_preferences.cc (right): https://codereview.chromium.org/413523004/diff/1/content/public/common/renderer_preferences.cc#newcode25 content/public/common/renderer_preferences.cc:25: hinting(gfx::FontRenderParams::HINTING_SLIGHT), On 2014/07/22 20:58:35, msw wrote: > RendererPreferencesToSkiaHinting used ...
6 years, 5 months ago (2014-07-22 21:15:50 UTC) #4
msw
lgtm with an optional nit to change the unused default subpixel rendering setting to _NONE. ...
6 years, 5 months ago (2014-07-22 21:45:07 UTC) #5
Daniel Erat
Bo, can you let me know what your plans are here? android_webview/native/aw_settings.cc has its own ...
6 years, 5 months ago (2014-07-23 00:06:32 UTC) #6
Daniel Erat
https://codereview.chromium.org/413523004/diff/1/content/public/common/renderer_preferences.cc File content/public/common/renderer_preferences.cc (right): https://codereview.chromium.org/413523004/diff/1/content/public/common/renderer_preferences.cc#newcode28 content/public/common/renderer_preferences.cc:28: subpixel_rendering(gfx::FontRenderParams::SUBPIXEL_RENDERING_RGB), On 2014/07/22 21:45:07, msw wrote: > On 2014/07/22 ...
6 years, 5 months ago (2014-07-23 00:10:23 UTC) #7
boliu
On 2014/07/23 00:06:32, Daniel Erat wrote: > Bo, can you let me know what your ...
6 years, 5 months ago (2014-07-23 00:10:44 UTC) #8
jochen (gone - plz use gerrit)
lgtm
6 years, 5 months ago (2014-07-23 07:01:50 UTC) #9
jln (very slow on Chromium)
content/common/view_messages.h lgtm
6 years, 5 months ago (2014-07-23 19:04:13 UTC) #10
Daniel Erat
The CQ bit was checked by derat@chromium.org
6 years, 5 months ago (2014-07-23 19:55:04 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/derat@chromium.org/413523004/40001
6 years, 5 months ago (2014-07-23 19:58:00 UTC) #12
commit-bot: I haz the power
Change committed as 285145
6 years, 5 months ago (2014-07-24 03:43:16 UTC) #13
johnme
A revert of this CL has been created in https://codereview.chromium.org/410413008/ by johnme@chromium.org. The reason for ...
6 years, 5 months ago (2014-07-24 15:54:24 UTC) #14
Daniel Erat
On 2014/07/24 15:54:24, johnme wrote: > A revert of this CL has been created in ...
6 years, 5 months ago (2014-07-24 15:58:30 UTC) #15
Daniel Erat
On 2014/07/24 15:58:30, Daniel Erat wrote: > On 2014/07/24 15:54:24, johnme wrote: > > A ...
6 years, 5 months ago (2014-07-24 16:51:25 UTC) #16
Daniel Erat
6 years, 5 months ago (2014-07-24 17:46:17 UTC) #17
Message was sent while issue was closed.
On 2014/07/24 16:51:25, Daniel Erat wrote:
> On 2014/07/24 15:58:30, Daniel Erat wrote:
> > On 2014/07/24 15:54:24, johnme wrote:
> > > A revert of this CL has been created in
> > > https://codereview.chromium.org/410413008/ by
> > https://mail.google.com/mail/?view=cm&fs=1&tf=1&to=johnme@chromium.org.
> > > 
> > > The reason for reverting is: This caused* the following 3 layout tests to
> > > regress[1] on WebKit Android (Nexus4).
> > > 
> > > - css1/font_properties/font_variant.html
> > > - fast/text/chromium-linux-fontconfig-renderstyle.html
> > > - svg/W3C-SVG-1.1-SE/coords-dom-02-f.svg
> > > 
> > > Specifically the results[2] show that the text rendering has changed
> slightly,
> > > and from manual inspection the hinting seems worse (e.g. some 1 pixel wide
> > black
> > > lines have become spread into 2-pixel wide gray lines).
> > > 
> > > *: (it's the only font-related patch on the blamelist[3])
> > > 
> > > [1]:
> > >
> >
>
http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Android%20(Nexu...
> > > 
> > > [2]:
> > >
> >
>
https://storage.googleapis.com/chromium-layout-test-archives/WebKit_Android__...
> > > 
> > > [3]:
> > >
> >
>
http://build.chromium.org/f/chromium/perf/dashboard/ui/changelog.html?url=%2F....
> > 
> > i'll bet that the problem is that we run layout tests in a configuration
where
> > some settings are unconfigured in Fontconfig, resulting in the changes to
the
> > defaults here showing up.
> 
> actually, it's not entirely clear to me what's happening here:
> 
> ui/gfx/font_render_params_android.cc sets all of the FontRenderParams members,
> so i wouldn't expect my changes to FontRenderParams's defaults to have any
> effect on android. i don't see default-constructed FontRenderParams getting
used
> anywhere.
> 
> android_webview/native/aw_settings.cc updates all of RendererPreferences's
> font-related members based on FontRenderParams, so the change to
> RendererPreferences's defaults shouldn't have any effect on this piece of
code,
> either. my other theory was that we could be using a default-constructed
> RendererPreferences somewhere for android layout tests, but the old code used
> RENDERER_PREFERENCES_HINTING_SYSTEM_DEFAULT, which would later get mapped to
> SkPaint::kNormal_Hinting. i changed the default to
> gfx::FontRenderParams::HINTING_MEDIUM, which also gets mapped to
> SkPaint::kNormal_Hinting.
> 
> looking closely at the images from the failed tests, it seems like subpixel
> positioning actually changed -- i believe that it's not enabled in the
expected
> images but is enabled in the actual images.
> 
> my change also changed RendererPreferences::use_subpixel_positioning's default
> from false to true to match FontRenderParam's default. perhaps that change to
> the default is somehow making it through into blink. blink generally disables
> subpixel positioning for layout tests, but i think that that behavior can be
> overridden from the browser.
> 
> i'll try just changing just RendererPreferences::use_subpixel_positioning's
> default back.

https://codereview.chromium.org/417953006/ is the change to reland this.

Powered by Google App Engine
This is Rietveld 408576698