Closed Bug 1711211 Opened 3 years ago Closed 3 years ago

Restoring app results in black foreground tab (swiggle issue, pixel 3)

Categories

(Core :: Graphics: WebRender, defect)

ARM64
Android
defect

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: jimm, Assigned: jnicol)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

Str:

  1. open nightly, load a web page
  2. minimize the app
  3. restore

Results: see screenshot

Scrolling will usually clear the issue up. I often see the old content briefly before the tab paints black.

Application Basics

Name: Firefox Nightly
Version: 90.0a1
Build ID: 20210510093555
Distribution ID:
User Agent: Mozilla/5.0 (Android 11; Mobile; rv:90.0) Gecko/90.0 Firefox/90.0
OS: Linux 30 #0 SMP PREEMPT Tue Feb 2 09:08:14 UTC 2021
Multiprocess Windows: 0/0
Fission Windows: 0/0 Disabled by default
Remote Processes: 2
Google Location Service Key: Found
Google Safebrowsing Key: Found
Mozilla Location Service Key: Found
Safe Mode: false

Crash Reports for the Last 3 Days

Nightly Features

Remote Processes

Type: Web Content
Count: 2 / 2

Add-ons

Name: HTTPS Everywhere
Type: extension
Version: 2021.4.15
Enabled: true
ID: https-everywhere@eff.org

Name: Mozilla Android Components - Ads
Type: extension
Version: 90.0.20210510143050.0511170633
Enabled: true
ID: ads@mozac.org

Name: Mozilla Android Components - Browser Icons
Type: extension
Version: 90.0.20210510143050.0510143825
Enabled: true
ID: icons@mozac.org

Name: Mozilla Android Components - Cookies
Type: extension
Version: 90.0.20210510143050.0511170633
Enabled: true
ID: cookies@mozac.org

Name: Mozilla Android Components - Firefox Accounts WebChannel
Type: extension
Version: 90.0.20210510143050.0510143828
Enabled: true
ID: fxa@mozac.org

Name: Mozilla Android Components - ReaderView
Type: extension
Version: 90.0.20210510143050.0510143817
Enabled: true
ID: readerview@mozac.org

Name: Mozilla Android Components - Web Compatibility Interventions
Type: extension
Version: 22.0.0
Enabled: true
ID: webcompat@mozilla.org

Name: Mozilla Android Components - WebCompat Reporter
Type: extension
Version: 2.0.1
Enabled: true
ID: webcompat-reporter@mozilla.org

Name: Search by Image
Type: extension
Version: 3.6.2
Enabled: true
ID: {2e5ff8c8-32fe-46d0-9fc8-6b8986621f3c}

Graphics

Features
Compositing: WebRender (Software OpenGL)
Asynchronous Pan/Zoom: touch input enabled; autoscroll enabled; smooth pinch-zoom enabled
WebGL 1 Driver WSI Info: EGL_VENDOR: Android EGL_VERSION: 1.5 Android META-EGL EGL_EXTENSIONS: EGL_KHR_get_all_proc_addresses EGL_ANDROID_presentation_time EGL_KHR_swap_buffers_with_damage EGL_ANDROID_get_native_client_buffer EGL_ANDROID_front_buffer_auto_refresh EGL_ANDROID_get_frame_timestamps EGL_EXT_surface_SMPTE2086_metadata EGL_EXT_surface_CTA861_3_metadata EGL_EXT_gl_colorspace_scrgb EGL_EXT_gl_colorspace_scrgb_linear EGL_EXT_gl_colorspace_display_p3_linear EGL_EXT_gl_colorspace_display_p3 EGL_EXT_gl_colorspace_display_p3_passthrough EGL_EXT_gl_colorspace_bt2020_linear EGL_EXT_gl_colorspace_bt2020_pq EGL_KHR_image EGL_KHR_image_base EGL_EXT_image_gl_colorspace EGL_KHR_lock_surface EGL_KHR_gl_colorspace EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_reusable_sync EGL_KHR_fence_sync EGL_KHR_create_context EGL_KHR_surfaceless_context EGL_EXT_create_context_robustness EGL_ANDROID_image_native_buffer EGL_KHR_wait_sync EGL_ANDROID_recordable EGL_KHR_partial_update EGL_EXT_pixel_format_float EGL_KHR_create_context_no_error EGL_KHR_mutable_render_buffer EGL_EXT_yuv_surface EGL_EXT_protected_content EGL_IMG_context_priority EGL_KHR_no_config_context IsWebglOutOfProcessEnabled: 0
WebGL 1 Driver Renderer: Qualcomm -- Adreno (TM) 630
WebGL 1 Driver Version: OpenGL ES 3.2 V@0490.0 (GIT@781e7d0, I46ff5fc46f, 1606819536) (Date:12/01/20)
WebGL 1 Driver Extensions: GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_vertex_half_float GL_OES_framebuffer_object GL_OES_rgb8_rgba8 GL_OES_compressed_ETC1_RGB8_texture GL_AMD_compressed_ATC_texture GL_KHR_texture_compression_astc_ldr GL_KHR_texture_compression_astc_hdr GL_OES_texture_compression_astc GL_OES_texture_npot GL_EXT_texture_filter_anisotropic GL_EXT_texture_format_BGRA8888 GL_EXT_read_format_bgra GL_OES_texture_3D GL_EXT_color_buffer_float GL_EXT_color_buffer_half_float GL_QCOM_alpha_test GL_OES_depth24 GL_OES_packed_depth_stencil GL_OES_depth_texture GL_OES_depth_texture_cube_map GL_EXT_sRGB GL_OES_texture_float GL_OES_texture_float_linear GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_EXT_texture_type_2_10_10_10_REV GL_EXT_texture_sRGB_decode GL_EXT_texture_format_sRGB_override GL_OES_element_index_uint GL_EXT_copy_image GL_EXT_geometry_shader GL_EXT_tessellation_shader GL_OES_texture_stencil8 GL_EXT_shader_io_blocks GL_OES_shader_image_atomic GL_OES_sample_variables GL_EXT_texture_border_clamp GL_EXT_EGL_image_external_wrap_modes GL_EXT_multisampled_render_to_texture GL_EXT_multisampled_render_to_texture2 GL_OES_shader_multisample_interpolation GL_EXT_texture_cube_map_array GL_EXT_draw_buffers_indexed GL_EXT_gpu_shader5 GL_EXT_robustness GL_EXT_texture_buffer GL_EXT_shader_framebuffer_fetch GL_ARM_shader_framebuffer_fetch_depth_stencil GL_OES_texture_storage_multisample_2d_array GL_OES_sample_shading GL_OES_get_program_binary GL_EXT_debug_label GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_QCOM_tiled_rendering GL_ANDROID_extension_pack_es31a GL_EXT_primitive_bounding_box GL_OES_standard_derivatives GL_OES_vertex_array_object GL_EXT_disjoint_timer_query GL_KHR_debug GL_EXT_YUV_target GL_EXT_sRGB_write_control GL_EXT_texture_norm16 GL_EXT_discard_framebuffer GL_OES_surfaceless_context GL_OVR_multiview GL_OVR_multiview2 GL_EXT_texture_sRGB_R8 GL_KHR_no_error GL_EXT_debug_marker GL_OES_EGL_image_external_essl3 GL_OVR_multiview_multisampled_render_to_texture GL_EXT_buffer_storage GL_EXT_external_buffer GL_EXT_blit_framebuffer_params GL_EXT_clip_cull_distance GL_EXT_protected_textures GL_EXT_shader_non_constant_global_initializers GL_QCOM_texture_foveated GL_QCOM_texture_foveated_subsampled_layout GL_QCOM_shader_framebuffer_fetch_noncoherent GL_QCOM_shader_framebuffer_fetch_rate GL_EXT_memory_object GL_EXT_memory_object_fd GL_EXT_EGL_image_array GL_NV_shader_noperspective_interpolation GL_KHR_robust_buffer_access_behavior GL_EXT_EGL_image_storage GL_EXT_blend_func_extended GL_EXT_clip_control GL_OES_texture_view GL_EXT_fragment_invocation_density GL_QCOM_YUV_texture_gather
WebGL 1 Extensions: ANGLE_instanced_arrays EXT_blend_minmax EXT_color_buffer_half_float EXT_float_blend EXT_sRGB EXT_texture_filter_anisotropic MOZ_debug OES_element_index_uint OES_fbo_render_mipmap OES_standard_derivatives OES_texture_float OES_texture_float_linear OES_texture_half_float OES_texture_half_float_linear OES_vertex_array_object WEBGL_color_buffer_float WEBGL_compressed_texture_astc WEBGL_compressed_texture_etc WEBGL_compressed_texture_etc1 WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_depth_texture WEBGL_lose_context
WebGL 2 Driver WSI Info: EGL_VENDOR: Android EGL_VERSION: 1.5 Android META-EGL EGL_EXTENSIONS: EGL_KHR_get_all_proc_addresses EGL_ANDROID_presentation_time EGL_KHR_swap_buffers_with_damage EGL_ANDROID_get_native_client_buffer EGL_ANDROID_front_buffer_auto_refresh EGL_ANDROID_get_frame_timestamps EGL_EXT_surface_SMPTE2086_metadata EGL_EXT_surface_CTA861_3_metadata EGL_EXT_gl_colorspace_scrgb EGL_EXT_gl_colorspace_scrgb_linear EGL_EXT_gl_colorspace_display_p3_linear EGL_EXT_gl_colorspace_display_p3 EGL_EXT_gl_colorspace_display_p3_passthrough EGL_EXT_gl_colorspace_bt2020_linear EGL_EXT_gl_colorspace_bt2020_pq EGL_KHR_image EGL_KHR_image_base EGL_EXT_image_gl_colorspace EGL_KHR_lock_surface EGL_KHR_gl_colorspace EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_reusable_sync EGL_KHR_fence_sync EGL_KHR_create_context EGL_KHR_surfaceless_context EGL_EXT_create_context_robustness EGL_ANDROID_image_native_buffer EGL_KHR_wait_sync EGL_ANDROID_recordable EGL_KHR_partial_update EGL_EXT_pixel_format_float EGL_KHR_create_context_no_error EGL_KHR_mutable_render_buffer EGL_EXT_yuv_surface EGL_EXT_protected_content EGL_IMG_context_priority EGL_KHR_no_config_context IsWebglOutOfProcessEnabled: 0
WebGL 2 Driver Renderer: Qualcomm -- Adreno (TM) 630
WebGL 2 Driver Version: OpenGL ES 3.2 V@0490.0 (GIT@781e7d0, I46ff5fc46f, 1606819536) (Date:12/01/20)
WebGL 2 Driver Extensions: GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_vertex_half_float GL_OES_framebuffer_object GL_OES_rgb8_rgba8 GL_OES_compressed_ETC1_RGB8_texture GL_AMD_compressed_ATC_texture GL_KHR_texture_compression_astc_ldr GL_KHR_texture_compression_astc_hdr GL_OES_texture_compression_astc GL_OES_texture_npot GL_EXT_texture_filter_anisotropic GL_EXT_texture_format_BGRA8888 GL_EXT_read_format_bgra GL_OES_texture_3D GL_EXT_color_buffer_float GL_EXT_color_buffer_half_float GL_QCOM_alpha_test GL_OES_depth24 GL_OES_packed_depth_stencil GL_OES_depth_texture GL_OES_depth_texture_cube_map GL_EXT_sRGB GL_OES_texture_float GL_OES_texture_float_linear GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_EXT_texture_type_2_10_10_10_REV GL_EXT_texture_sRGB_decode GL_EXT_texture_format_sRGB_override GL_OES_element_index_uint GL_EXT_copy_image GL_EXT_geometry_shader GL_EXT_tessellation_shader GL_OES_texture_stencil8 GL_EXT_shader_io_blocks GL_OES_shader_image_atomic GL_OES_sample_variables GL_EXT_texture_border_clamp GL_EXT_EGL_image_external_wrap_modes GL_EXT_multisampled_render_to_texture GL_EXT_multisampled_render_to_texture2 GL_OES_shader_multisample_interpolation GL_EXT_texture_cube_map_array GL_EXT_draw_buffers_indexed GL_EXT_gpu_shader5 GL_EXT_robustness GL_EXT_texture_buffer GL_EXT_shader_framebuffer_fetch GL_ARM_shader_framebuffer_fetch_depth_stencil GL_OES_texture_storage_multisample_2d_array GL_OES_sample_shading GL_OES_get_program_binary GL_EXT_debug_label GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_QCOM_tiled_rendering GL_ANDROID_extension_pack_es31a GL_EXT_primitive_bounding_box GL_OES_standard_derivatives GL_OES_vertex_array_object GL_EXT_disjoint_timer_query GL_KHR_debug GL_EXT_YUV_target GL_EXT_sRGB_write_control GL_EXT_texture_norm16 GL_EXT_discard_framebuffer GL_OES_surfaceless_context GL_OVR_multiview GL_OVR_multiview2 GL_EXT_texture_sRGB_R8 GL_KHR_no_error GL_EXT_debug_marker GL_OES_EGL_image_external_essl3 GL_OVR_multiview_multisampled_render_to_texture GL_EXT_buffer_storage GL_EXT_external_buffer GL_EXT_blit_framebuffer_params GL_EXT_clip_cull_distance GL_EXT_protected_textures GL_EXT_shader_non_constant_global_initializers GL_QCOM_texture_foveated GL_QCOM_texture_foveated_subsampled_layout GL_QCOM_shader_framebuffer_fetch_noncoherent GL_QCOM_shader_framebuffer_fetch_rate GL_EXT_memory_object GL_EXT_memory_object_fd GL_EXT_EGL_image_array GL_NV_shader_noperspective_interpolation GL_KHR_robust_buffer_access_behavior GL_EXT_EGL_image_storage GL_EXT_blend_func_extended GL_EXT_clip_control GL_OES_texture_view GL_EXT_fragment_invocation_density GL_QCOM_YUV_texture_gather
WebGL 2 Extensions: EXT_color_buffer_float EXT_float_blend EXT_texture_filter_anisotropic MOZ_debug OES_texture_float_linear OVR_multiview2 WEBGL_compressed_texture_astc WEBGL_compressed_texture_etc WEBGL_compressed_texture_etc1 WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_lose_context
Uses Tiling: true
Uses Tiling (Content): true
Target Frame Rate: 60
GPU #1
Active: Yes
Description: Model: Pixel 3, Product: blueline, Manufacturer: Google, Hardware: blueline, OpenGL: Qualcomm -- Adreno (TM) 630 -- OpenGL ES 3.2 V@0490.0 (GIT@781e7d0, I46ff5fc46f, 1606819536) (Date:12/01/20)
Vendor ID: Qualcomm
Device ID: Adreno (TM) 630
Driver Version: OpenGL ES 3.2 V@0490.0 (GIT@781e7d0, I46ff5fc46f, 1606819536) (Date:12/01/20)
RAM: 0

Diagnostics
AzureCanvasBackend: skia
AzureContentBackend: skia
AzureFallbackCanvasBackend: skia
CMSOutputProfile: Empty profile data
Display0: 1080x2160
DisplayCount: 1
TileHeight: 512
TileWidth: 512
Device Reset: Trigger Device Reset
Decision Log
HW_COMPOSITING:
available by default
force_enabled by user: Force-enabled by pref
OPENGL_COMPOSITING:
available by default
force_enabled by user: Force-enabled by pref
WEBRENDER:
available by default
disabled by user: User force-enabled software WR
WEBRENDER_QUALIFIED:
available by default
WEBRENDER_COMPOSITOR:
disabled by default: Disabled by default
WEBRENDER_PARTIAL:
available by default
WEBRENDER_SHADER_CACHE:
available by default
unavailable by runtime: WebRender disabled
WEBRENDER_OPTIMIZED_SHADERS:
available by default
unavailable by runtime: WebRender disabled
WEBRENDER_ANGLE:
available by default
unavailable by env: OS not supported
WEBRENDER_DCOMP_PRESENT:
available by default
disabled by user: User disabled via pref
unavailable by env: Requires Windows 10 or later
unavailable by runtime: Requires ANGLE
WEBRENDER_SOFTWARE:
available by default
force_enabled by user: Force enabled by pref
blocklisted by env: No qualified hardware
OMTP:
disabled by default: Disabled by default
WEBGPU:
disabled by default: Disabled by default

Media

Audio Backend: opensl
Max Channels: 2
Preferred Sample Rate: 48000
Roundtrip latency (standard deviation): ...
Output Devices
Name: Group
Default audio output device:
Input Devices
Name: Group
Default audio input device:
Media Capabilities
Enumerate database

Environment Variables

Important Modified Preferences

browser.cache.disk.amount_written: 740188
browser.cache.disk.capacity: 524288
browser.cache.disk.filesystem_reported: 1
browser.cache.disk.hashstats_reported: 1
dom.presentation.device.name: Pixel 3
dom.w3c_pointer_events.enabled: true
extensions.lastAppVersion: 90.0a1
gfx.webrender.enabled: true
gfx.webrender.software: true
idle.lastDailyNotification: 1620995898
media.gmp.storage.version.observed: 1
network.predictor.cleaned-up: true
network.trr.blocklist_cleanup_done: true
privacy.purge_trackers.date_in_cookie_database: 0
privacy.purge_trackers.last_purge: 1620995900025
security.remote_settings.crlite_filters.checked: 1620995417
security.remote_settings.intermediates.checked: 1620995417
storage.vacuum.last.index: 0

Important Locked Preferences

fission.autostart.session: false

Accessibility

Activated: false
Prevent Accessibility: 0

Library Versions

NSPR
Expected minimum version: 4.31 Beta
Version in use: 4.31 Beta

NSS
Expected minimum version: 3.65 Beta
Version in use: 3.65 Beta

NSSSMIME
Expected minimum version: 3.65 Beta
Version in use: 3.65 Beta

NSSSSL
Expected minimum version: 3.65 Beta
Version in use: 3.65 Beta

NSSUTIL
Expected minimum version: 3.65 Beta
Version in use: 3.65 Beta

Startup Cache

Disk Cache Path: /data/user/0/org.mozilla.fenix/files/mozilla/miq0sg7i.default/startupCache/startupCache.8.little
Ignore Disk Cache: false
Found Disk Cache on Init: true
Wrote to Disk Cache: false

Internationalization & Localization

Application Settings
Requested Locales: ["en-US"]
Available Locales: ["an","ar","ast","az","be","bg","bn","br","bs","ca","cak","cs","cy","da","de","dsb","el","en-CA","en-GB","en-US","eo","es-AR","es-CL","es-ES","es-MX","et","eu","fa","ff","fi","fr","fy-NL","ga-IE","gd","gl","gn","gu-IN","he","hi-IN","hr","hsb","hu","hy-AM","id","is","it","ja","ka","kab","kk","kn","ko","lij","lo","lt","lv","ml","mr","ms","my","nb-NO","ne-NP","nl","nn-NO","oc","pa-IN","pl","pt-BR","pt-PT","rm","ro","ru","sk","sl","son","sq","sr","sv-SE","ta","te","th","tr","trs","uk","ur","uz","vi","wo","xh","zam","zh-CN","zh-TW"]
App Locales: ["en-US","en-CA","en-GB"]
Regional Preferences: ["en-US"]
Default Locale: "en-US"
Operating System
System Locales: ["en-US"]
Regional Preferences: ["en-US"]

Remote Debugging (Chromium Protocol)

Accepting Connections: false
URL:

Tab thumbnails are also impacted. This has been around for a while, but seems to have gotten worse in recent releases.

Additionally, when switching tabs, I'll often see the previous tab content first, then black, then proper content. See screenshot and note the url.

Flags: needinfo?(jnicol)
Summary: Restoring app results in black foreground tab (swiggle issue, pixel 2) → Restoring app results in black foreground tab (swiggle issue, pixel 3)

The issue here is that when the EGL surface is recreated we need to make sure we do a "full render" because the previous contents of the framebuffer has been lost. RenderCompositorOGLSWGL does not override RequestFullRender(), therefore always returns false because of the base class implementation. Without requesting the full render, webrender's calculate_dirty_rects() calculates an empty rect for the combined_dirty_rect, because none of the picture cache tiles' content has changed since the tab switch or minimizing and restoring the app. RenderCompositorOGLSWGL therefore skips compositing, and the screen remains blank or keeps its previous contents (from the previous tab).

Currently it appears that (unless the dirty region is empty) we render the entire screen with OGLSWGL, and use the dirty rect only for eglSwapBuffersWithDamage(). (If this is not the case, then it is an error if we are only rendering part of the screen without doing proper buffer age and damage tracking. Lee seemed to think we did indeed use the dirty rect for more, but I could not see where.) In bug 1696101 we plan to add proper partial present support. When that is done, the buffer age being zero will be used automatically by webrender to make it perform a full render. In the meantime, we can make RenderCompositorOGLSWGL override RequestFullRender() and return true for the subsequent render after the EGL surface being recreated.

Flags: needinfo?(jnicol)
See Also: → 1696101

RenderCompositorOGLSWGL will currently skip compositing if webrender
decides that the dirty rect for a frame is empty. However, in cases
where the EGL surface has been recreated we must perform a full
composite, as the previous contents of the framebuffer has been
lost. Not doing so is resulting in black screens being shown after
restoring the app on android, or the contents of the previous tab
being shown after switching to a new tab.

In the future we will add proper partial rendering support by tracking
buffer age and damage regions, and webrender will be able to force a
full render when the buffer age is zero. Until that time, we can fix
this bug by making RenderCompositorOGLSWGL::RequestFullRender() return
true for the subsequent frame after the surface has been recreated.

Assignee: nobody → jnicol
Status: NEW → ASSIGNED
Pushed by jnicol@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1273a2970c98
Ensure RenderCompositorOGLSWGL does a full render after EGL surface creation. r=sotaro
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: