New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 707979 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Fonts become blurry above 80px when GPU rasterization is on

Project Member Reported by sdy@chromium.org, Apr 3 2017

Issue description

Chrome Version: 59.0.3061.0
OS: macOS 10.12.4

What steps will reproduce the problem?
(1) Visit this URL, which shows an exaggerated form of the problem:
    data:text/html,<body style="font-size: 120px; -webkit-font-smoothing:none">Hello.

What is the expected result?
Crisp text.

What happens instead?
Even though font smoothing is off, the edges of the letters are blurry. If I remove `-webkit-font-smoothing: none`, the text has subpixel AA and looks subtly wrong to me — there's unexpected color fringing that suggests that there's still some kind of blur happening.

All text rendered above 80px is subtly blurry. At 80px, text is crisp and subpixel AA seems to be off even if I specify `-webkit-font-smoothing: subpixel-antialiased` (not sure if that's the expected behavior, just an observation).

Turning off GPU rasterization makes the problem go away.

## about:gpu

Graphics Feature Status
Canvas: Hardware accelerated
Flash: Hardware accelerated
Flash Stage3D: Hardware accelerated
Flash Stage3D Baseline profile: Hardware accelerated
Compositing: Hardware accelerated
Multiple Raster Threads: Enabled
Native GpuMemoryBuffers: Hardware accelerated
Rasterization: Hardware accelerated
Video Decode: Hardware accelerated
Video Encode: Hardware accelerated
VPx Video Decode: Hardware accelerated
WebGL: Hardware accelerated
WebGL2: Hardware accelerated
Driver Bug Workarounds
add_and_true_to_loop_condition
adjust_src_dst_region_for_blitframebuffer
decode_encode_srgb_for_generatemipmap
disable_framebuffer_cmaa
disable_multimonitor_multisampling
disable_webgl_rgb_multisampling_usage
emulate_abs_int_function
emulate_isnan_on_float
get_frag_data_info_bug
init_two_cube_map_levels_before_copyteximage
msaa_is_slow
pack_parameters_workaround_with_pack_buffer
rebind_transform_feedback_before_resume
regenerate_struct_names
remove_invariant_and_centroid_for_essl3
rewrite_texelfetchoffset_to_texelfetch
scalarize_vec_and_mat_constructor_args
set_zero_level_before_generating_mipmap
unfold_short_circuit_as_ternary_operation
unpack_alignment_workaround_with_unpack_buffer
unpack_image_height_workaround_with_unpack_buffer
use_intermediary_for_copy_texture_image
use_unused_standard_shared_blocks
Problems Detected
Multisampling is buggy on OSX when multiple monitors are connected: 237931
Applied Workarounds: disable_multimonitor_multisampling
Unfold short circuit on Mac OS X: 307751
Applied Workarounds: unfold_short_circuit_as_ternary_operation
Always rewrite vec/mat constructors to be consistent: 398694
Applied Workarounds: scalarize_vec_and_mat_constructor_args
Mac drivers handle struct scopes incorrectly: 403957
Applied Workarounds: regenerate_struct_names
On Intel GPUs MSAA performance is not acceptable for GPU rasterization: 527565
Applied Workarounds: msaa_is_slow
glGenerateMipmap fails if the zero texture level is not set on some Mac drivers: 560499
Applied Workarounds: set_zero_level_before_generating_mipmap
Pack parameters work incorrectly with pack buffer bound: 563714
Applied Workarounds: pack_parameters_workaround_with_pack_buffer
Alignment works incorrectly with unpack buffer bound: 563714
Applied Workarounds: unpack_alignment_workaround_with_unpack_buffer
copyTexImage2D fails when reading from IOSurface on multiple GPU types.: 581777
Applied Workarounds: use_intermediary_for_copy_texture_image
Multisample renderbuffers with format GL_RGB8 have performance issues on Intel GPUs.: 607130
Applied Workarounds: disable_webgl_rgb_multisampling_usage
Limited enabling of Chromium GL_INTEL_framebuffer_CMAA: 535198
Applied Workarounds: disable_framebuffer_cmaa
glGetFragData{Location|Index} works incorrectly on Max: 638340
Applied Workarounds: get_frag_data_info_bug
glResumeTransformFeedback works incorrectly on Intel GPUs: 638514
Applied Workarounds: rebind_transform_feedback_before_resume
Result of abs(i) where i is an integer in vertex shader is wrong: 642227
Applied Workarounds: emulate_abs_int_function
Rewrite texelFetchOffset to texelFetch for Intel Mac: 642605
Applied Workarounds: rewrite_texelfetchoffset_to_texelfetch
Rewrite condition in for and while loops for Intel Mac: 644669
Applied Workarounds: add_and_true_to_loop_condition
Emulate GLSL function isnan() on Intel Mac: 650547
Applied Workarounds: emulate_isnan_on_float
Decode and encode before generateMipmap for srgb format textures on macosx: 634519
Applied Workarounds: decode_encode_srgb_for_generatemipmap
Init first two levels before CopyTexImage2D for cube map texture on Intel Mac 10.12: 648197
Applied Workarounds: init_two_cube_map_levels_before_copyteximage
Insert statements to reference all members in unused std140/shared blocks on Mac: 618464
Applied Workarounds: use_unused_standard_shared_blocks
Tex(Sub)Image3D performs incorrectly when uploading from unpack buffer with GL_UNPACK_IMAGE_HEIGHT greater than zero on Intel Macs: 654258
Applied Workarounds: unpack_image_height_workaround_with_unpack_buffer
adjust src/dst region if blitting pixels outside read framebuffer on Mac: 644740
Applied Workarounds: adjust_src_dst_region_for_blitframebuffer
Mac driver GL 4.1 requires invariant and centroid to match between shaders: 639760, 641129
Applied Workarounds: remove_invariant_and_centroid_for_essl3
Disable KHR_blend_equation_advanced until cc shaders are updated: 661715
Version Information
Data exported	4/3/2017, 7:09:33 PM
Chrome version	Chrome/59.0.3061.0
Operating system	Mac OS X 10.12.4
Software rendering list version	13.0
Driver bug list version	10.0
ANGLE commit id	fe48632f2f47
2D graphics backend	Skia/59 e074b03677e5fe92660a23f25b328ed558b8e198
Command Line Args	Chrome Canary.app/Contents/MacOS/Google Chrome Canary --flag-switches-begin --flag-switches-end
Driver Information
Initialization time	40
In-process GPU	false
Passthrough Command Decoder	false
Supports overlays	false
Sandboxed	true
GPU0	VENDOR = 0x1002, DEVICE= 0x67ef
GPU1	VENDOR = 0x8086, DEVICE= 0x191b *ACTIVE*
Optimus	false
Optimus	false
AMD switchable	true
Driver vendor	
Driver version	10.24.45
Driver date	
Pixel shader version	4.10
Vertex shader version	4.10
Max. MSAA samples	16
Machine model name	MacBookPro
Machine model version	13.3
GL_VENDOR	Intel Inc.
GL_RENDERER	Intel(R) HD Graphics 530
GL_VERSION	4.1 INTEL-10.24.45
GL_EXTENSIONS	GL_ARB_blend_func_extended GL_ARB_draw_buffers_blend GL_ARB_draw_indirect GL_ARB_ES2_compatibility GL_ARB_explicit_attrib_location GL_ARB_gpu_shader_fp64 GL_ARB_gpu_shader5 GL_ARB_instanced_arrays GL_ARB_internalformat_query GL_ARB_occlusion_query2 GL_ARB_sample_shading GL_ARB_sampler_objects GL_ARB_separate_shader_objects GL_ARB_shader_bit_encoding GL_ARB_shader_subroutine GL_ARB_shading_language_include GL_ARB_tessellation_shader GL_ARB_texture_buffer_object_rgb32 GL_ARB_texture_cube_map_array GL_ARB_texture_gather GL_ARB_texture_query_lod GL_ARB_texture_rgb10_a2ui GL_ARB_texture_storage GL_ARB_texture_swizzle GL_ARB_timer_query GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 GL_ARB_vertex_attrib_64bit GL_ARB_vertex_type_2_10_10_10_rev GL_ARB_viewport_array GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_framebuffer_multisample_blit_scaled GL_EXT_texture_compression_s3tc GL_EXT_texture_filter_anisotropic GL_EXT_texture_sRGB_decode GL_APPLE_client_storage GL_APPLE_container_object_shareable GL_APPLE_flush_render GL_APPLE_object_purgeable GL_APPLE_rgb_422 GL_APPLE_row_bytes GL_APPLE_texture_range GL_ATI_texture_mirror_once GL_NV_texture_barrier
Disabled Extensions	GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent
Window system binding vendor	
Window system binding version	
Window system binding extensions	
Direct rendering	Yes
Reset notification strategy	0x0000
GPU process crash count	0
Compositor Information
Tile Update Mode	Zero-copy
Partial Raster	Enabled
GpuMemoryBuffers Status
ATC	Software only
ATCIA	Software only
DXT1	Software only
DXT5	Software only
ETC1	Software only
R_8	GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT
RG_88	Software only
BGR_565	Software only
RGBA_4444	Software only
RGBX_8888	Software only
RGBA_8888	GPU_READ, SCANOUT, SCANOUT_CPU_READ_WRITE
BGRX_8888	GPU_READ, SCANOUT, SCANOUT_CPU_READ_WRITE
BGRA_8888	GPU_READ, SCANOUT, SCANOUT_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT
YVU_420	Software only
YUV_420_BIPLANAR	GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT
UYVY_422	GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT
 

Comment 1 by sdy@chromium.org, Apr 4 2017

Forgot screenshots.
crbug_707979_bad.png
19.7 KB View Download
crbug_707979_good.png
18.4 KB View Download
normal_text_80px.png
97.2 KB View Download
normal_text_81px.png
100 KB View Download
Cc: -jvanverth@chromium.org
Owner: jvanverth@chromium.org
Status: Assigned (was: Available)
I'll take a look.
Project Member

Comment 3 by bugdroid1@chromium.org, Jul 6 2017

The following revision refers to this bug:
  https://skia.googlesource.com/skia/+/90e89b366a7dc90111c861ba76c492ce1743a0d1

commit 90e89b366a7dc90111c861ba76c492ce1743a0d1
Author: Jim Van Verth <jvanverth@google.com>
Date: Thu Jul 06 21:24:17 2017

Add proper aliased support for SDF text

Previously, when asked to render aliased text with distance fields,
we would get the aliased glyph from the cache and then try to
anti-alias the edge. This change instead grabs the anti-aliased glyph,
then deliberately aliases the edge.

Bug:  chromium:707979 
Change-Id: I05766af17d7ae58bca27aaffd9e08e5c586e789c
Reviewed-on: https://skia-review.googlesource.com/21728
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>

[modify] https://crrev.com/90e89b366a7dc90111c861ba76c492ce1743a0d1/src/gpu/ops/GrAtlasTextOp.cpp
[modify] https://crrev.com/90e89b366a7dc90111c861ba76c492ce1743a0d1/src/gpu/text/GrTextUtils.cpp
[modify] https://crrev.com/90e89b366a7dc90111c861ba76c492ce1743a0d1/src/gpu/text/GrAtlasTextBlob.h
[modify] https://crrev.com/90e89b366a7dc90111c861ba76c492ce1743a0d1/src/gpu/effects/GrDistanceFieldGeoProc.h
[modify] https://crrev.com/90e89b366a7dc90111c861ba76c492ce1743a0d1/src/gpu/ops/GrAtlasTextOp.h
[modify] https://crrev.com/90e89b366a7dc90111c861ba76c492ce1743a0d1/src/gpu/text/GrAtlasTextBlob.cpp
[modify] https://crrev.com/90e89b366a7dc90111c861ba76c492ce1743a0d1/src/gpu/effects/GrDistanceFieldGeoProc.cpp

Status: Fixed (was: Assigned)

Sign in to add a comment