New issue
Advanced search Search tips

Issue 716911 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 775030



Sign in to add a comment

Reduce usage or eliminate CompositorFrameMetadata

Project Member Reported by fsam...@chromium.org, Apr 30 2017

Issue description

CompositorFrameMetadata contains a lot of information that is not directly related to compositing, and are not generic compositing concepts such as:

root_scroll_offset
page_scale_factor
scrollable_viewport_size;
root_layer_size;
min_page_scale_factor
max_page_scale_factor
root_overflow_x_hidden
root_overflow_y_hidden
 may_contain_video
top_controls_height
top_controls_shown_ratio
bottom_controls_height
bottom_controls_shown_ratio
selection

etc.

This fields are bundled with CompositorFrames so that they're synchronized with CompositorFrames. Let's solve this synchronization problem in general so that browser-specific or app-specific fields aren't special cased in mus/viz
 
RenderWidgetHostImpl::SubmitCompositorFrame has the following block of code:

  bool is_mobile_optimized = IsMobileOptimizedFrame(frame.metadata);
  input_router_->NotifySiteIsMobileOptimized(is_mobile_optimized);
  if (touch_emulator_)
    touch_emulator_->SetDoubleTapSupportForPageEnabled(!is_mobile_optimized);


This seems a bit inappropriate to place in viz.


Perhaps this code can be moved to a separate IPC and we can use the frame token for synchronization. I believe that would eliminate a number of fields in CompositorFrameMetadata...
Cc: sky@chromium.org

Comment 3 Deleted

Cc: weiliangc@chromium.org
Cc: varkha@chromium.org
Owner: sadrul@chromium.org
Status: Assigned (was: Available)
Owner: samans@chromium.org
Blocking: -601863 732572
Components: -Internals>MUS
Cc: -mfomitchev@chromium.org
Blocking: -732572 775030
Cc: -varkha@chromium.org -jbau...@chromium.org
Project Member

Comment 12 by bugdroid1@chromium.org, Mar 7 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f27d6caeb8f4b14a3651eebc429684d9f9bd5b34

commit f27d6caeb8f4b14a3651eebc429684d9f9bd5b34
Author: yiyix <yiyix@chromium.org>
Date: Wed Mar 07 23:55:40 2018

Update RenderFrameMetadataProvider creation time

RenderFrameMetadataProvider(RFMP) is not available until calling
RWHI::RequestCompositorFrameSink, that is no observer can be added before
that point, which may not be convenient for all observers. In this patch,
RenderFrameMetadataProvider will be created in RenderWidgetHostImpl
constructor and the ready to receive and send information after calling
RequestCompositorFrameSink.

For Example: RenderWidgetHostViewAura is created and start to observe changes
in RFM before calling RWHI::RequestCompositorFrameSink.

Bug: 716911

Change-Id: Icac9d5ff44a24b2a828bb7946202917f79c93147
Reviewed-on: https://chromium-review.googlesource.com/952200
Commit-Queue: Yi Xu <yiyix@chromium.org>
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Reviewed-by: Jonathan Ross <jonross@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541645}
[modify] https://crrev.com/f27d6caeb8f4b14a3651eebc429684d9f9bd5b34/content/browser/renderer_host/render_frame_metadata_provider_impl.cc
[modify] https://crrev.com/f27d6caeb8f4b14a3651eebc429684d9f9bd5b34/content/browser/renderer_host/render_frame_metadata_provider_impl.h
[modify] https://crrev.com/f27d6caeb8f4b14a3651eebc429684d9f9bd5b34/content/browser/renderer_host/render_widget_host_impl.cc
[modify] https://crrev.com/f27d6caeb8f4b14a3651eebc429684d9f9bd5b34/content/browser/renderer_host/render_widget_host_impl.h

Project Member

Comment 13 by bugdroid1@chromium.org, Mar 16 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cb1fbc4f33bcbea505cd87103ac557c355ed185e

commit cb1fbc4f33bcbea505cd87103ac557c355ed185e
Author: yiyix <yiyix@chromium.org>
Date: Fri Mar 16 19:54:08 2018

Update RenderWidgetHostViewBase constructor

Add RenderWidgetHost(RWH) to the RenderWidgetHostViewBase(RWHVB)
constructor, so that each child class does not need to store its
own RWH.

Bug:716911

Change-Id: I10728cef663807e687a986f0f131f9decb067b67
Reviewed-on: https://chromium-review.googlesource.com/959456
Commit-Queue: Yi Xu <yiyix@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543792}
[modify] https://crrev.com/cb1fbc4f33bcbea505cd87103ac557c355ed185e/content/browser/android/synchronous_compositor_host.cc
[modify] https://crrev.com/cb1fbc4f33bcbea505cd87103ac557c355ed185e/content/browser/browser_plugin/browser_plugin_guest.cc
[modify] https://crrev.com/cb1fbc4f33bcbea505cd87103ac557c355ed185e/content/browser/frame_host/cross_process_frame_connector.cc
[modify] https://crrev.com/cb1fbc4f33bcbea505cd87103ac557c355ed185e/content/browser/frame_host/render_widget_host_view_guest.cc
[modify] https://crrev.com/cb1fbc4f33bcbea505cd87103ac557c355ed185e/content/browser/renderer_host/frame_connector_delegate.cc
[modify] https://crrev.com/cb1fbc4f33bcbea505cd87103ac557c355ed185e/content/browser/renderer_host/input/mouse_wheel_phase_handler.cc
[modify] https://crrev.com/cb1fbc4f33bcbea505cd87103ac557c355ed185e/content/browser/renderer_host/input/touch_selection_controller_client_aura.cc
[modify] https://crrev.com/cb1fbc4f33bcbea505cd87103ac557c355ed185e/content/browser/renderer_host/input/touch_selection_controller_client_child_frame.cc
[modify] https://crrev.com/cb1fbc4f33bcbea505cd87103ac557c355ed185e/content/browser/renderer_host/render_widget_host_input_event_router.cc
[modify] https://crrev.com/cb1fbc4f33bcbea505cd87103ac557c355ed185e/content/browser/renderer_host/render_widget_host_view_android.cc
[modify] https://crrev.com/cb1fbc4f33bcbea505cd87103ac557c355ed185e/content/browser/renderer_host/render_widget_host_view_android.h
[modify] https://crrev.com/cb1fbc4f33bcbea505cd87103ac557c355ed185e/content/browser/renderer_host/render_widget_host_view_aura.cc
[modify] https://crrev.com/cb1fbc4f33bcbea505cd87103ac557c355ed185e/content/browser/renderer_host/render_widget_host_view_aura.h
[modify] https://crrev.com/cb1fbc4f33bcbea505cd87103ac557c355ed185e/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
[modify] https://crrev.com/cb1fbc4f33bcbea505cd87103ac557c355ed185e/content/browser/renderer_host/render_widget_host_view_base.cc
[modify] https://crrev.com/cb1fbc4f33bcbea505cd87103ac557c355ed185e/content/browser/renderer_host/render_widget_host_view_base.h
[modify] https://crrev.com/cb1fbc4f33bcbea505cd87103ac557c355ed185e/content/browser/renderer_host/render_widget_host_view_child_frame.cc
[modify] https://crrev.com/cb1fbc4f33bcbea505cd87103ac557c355ed185e/content/browser/renderer_host/render_widget_host_view_child_frame.h
[modify] https://crrev.com/cb1fbc4f33bcbea505cd87103ac557c355ed185e/content/browser/renderer_host/render_widget_host_view_mac.h
[modify] https://crrev.com/cb1fbc4f33bcbea505cd87103ac557c355ed185e/content/browser/renderer_host/render_widget_host_view_mac.mm
[modify] https://crrev.com/cb1fbc4f33bcbea505cd87103ac557c355ed185e/content/browser/renderer_host/render_widget_targeter.cc
[modify] https://crrev.com/cb1fbc4f33bcbea505cd87103ac557c355ed185e/content/browser/web_contents/web_contents_impl.cc
[modify] https://crrev.com/cb1fbc4f33bcbea505cd87103ac557c355ed185e/content/test/test_render_view_host.cc
[modify] https://crrev.com/cb1fbc4f33bcbea505cd87103ac557c355ed185e/content/test/test_render_view_host.h

Project Member

Comment 14 by bugdroid1@chromium.org, Mar 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/380375bf58399888d84eb1d8d4559c53dc3794bf

commit 380375bf58399888d84eb1d8d4559c53dc3794bf
Author: yiyix <yiyix@chromium.org>
Date: Mon Mar 19 21:48:17 2018

Adding a |root_background_color| to RenderFrameMetadata

Added |root_background_color| to RenderFrameMetadata. Since
|root_background_color| does not change with every frame,it's added
to low frequency fields.

One use case is added together with this change:
RenderWidgetHostViewAura::SubmitCompositorFrame is used to sniff the
|root_background_color| from the CompositorFrame, after this change,
RWHVA listens to RenderFrameMetadataProvider and updates the background
color when the RenderFrameMetadata changes.

Bug: 716911
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I6857d0096fe3662b53410e2a7dc8a1682c0544c5
Reviewed-on: https://chromium-review.googlesource.com/952303
Commit-Queue: Yi Xu <yiyix@chromium.org>
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544172}
[modify] https://crrev.com/380375bf58399888d84eb1d8d4559c53dc3794bf/cc/trees/layer_tree_host_impl.cc
[modify] https://crrev.com/380375bf58399888d84eb1d8d4559c53dc3794bf/cc/trees/render_frame_metadata.cc
[modify] https://crrev.com/380375bf58399888d84eb1d8d4559c53dc3794bf/cc/trees/render_frame_metadata.h
[modify] https://crrev.com/380375bf58399888d84eb1d8d4559c53dc3794bf/content/browser/renderer_host/render_frame_metadata_provider_impl.cc
[modify] https://crrev.com/380375bf58399888d84eb1d8d4559c53dc3794bf/content/browser/renderer_host/render_frame_metadata_provider_impl.h
[modify] https://crrev.com/380375bf58399888d84eb1d8d4559c53dc3794bf/content/browser/renderer_host/render_widget_host_impl.h
[modify] https://crrev.com/380375bf58399888d84eb1d8d4559c53dc3794bf/content/browser/renderer_host/render_widget_host_view_aura.cc
[modify] https://crrev.com/380375bf58399888d84eb1d8d4559c53dc3794bf/content/browser/renderer_host/render_widget_host_view_aura.h
[modify] https://crrev.com/380375bf58399888d84eb1d8d4559c53dc3794bf/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
[modify] https://crrev.com/380375bf58399888d84eb1d8d4559c53dc3794bf/content/browser/renderer_host/render_widget_host_view_base.cc
[modify] https://crrev.com/380375bf58399888d84eb1d8d4559c53dc3794bf/content/browser/renderer_host/render_widget_host_view_base.h
[modify] https://crrev.com/380375bf58399888d84eb1d8d4559c53dc3794bf/content/browser/renderer_host/render_widget_host_view_child_frame.cc
[modify] https://crrev.com/380375bf58399888d84eb1d8d4559c53dc3794bf/content/common/render_frame_metadata.mojom
[modify] https://crrev.com/380375bf58399888d84eb1d8d4559c53dc3794bf/content/common/render_frame_metadata_struct_traits.cc
[modify] https://crrev.com/380375bf58399888d84eb1d8d4559c53dc3794bf/content/common/render_frame_metadata_struct_traits.h

Project Member

Comment 15 by bugdroid1@chromium.org, Mar 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/02bd1f2acd5d4ebb3b0fa1585f7878640ce78532

commit 02bd1f2acd5d4ebb3b0fa1585f7878640ce78532
Author: Alexander Potapenko <glider@chromium.org>
Date: Tue Mar 20 12:11:53 2018

Revert "Adding a |root_background_color| to RenderFrameMetadata"

This reverts commit 380375bf58399888d84eb1d8d4559c53dc3794bf.

Reason for revert: MSan reports on buildbots and Clusterfuzz, see https://bugs.chromium.org/p/chromium/issues/detail?id=823654

Original change's description:
> Adding a |root_background_color| to RenderFrameMetadata
> 
> Added |root_background_color| to RenderFrameMetadata. Since
> |root_background_color| does not change with every frame,it's added
> to low frequency fields.
> 
> One use case is added together with this change:
> RenderWidgetHostViewAura::SubmitCompositorFrame is used to sniff the
> |root_background_color| from the CompositorFrame, after this change,
> RWHVA listens to RenderFrameMetadataProvider and updates the background
> color when the RenderFrameMetadata changes.
> 
> Bug: 716911
> Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
> Change-Id: I6857d0096fe3662b53410e2a7dc8a1682c0544c5
> Reviewed-on: https://chromium-review.googlesource.com/952303
> Commit-Queue: Yi Xu <yiyix@chromium.org>
> Reviewed-by: Fady Samuel <fsamuel@chromium.org>
> Reviewed-by: Tom Sepez <tsepez@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#544172}

TBR=fsamuel@chromium.org,tsepez@chromium.org,yiyix@chromium.org

Change-Id: I5d079dbd1ddc84e4c938a253aa105e68c5b279d4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 716911
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Reviewed-on: https://chromium-review.googlesource.com/970405
Reviewed-by: Alexander Potapenko <glider@chromium.org>
Commit-Queue: Alexander Potapenko <glider@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544333}
[modify] https://crrev.com/02bd1f2acd5d4ebb3b0fa1585f7878640ce78532/cc/trees/layer_tree_host_impl.cc
[modify] https://crrev.com/02bd1f2acd5d4ebb3b0fa1585f7878640ce78532/cc/trees/render_frame_metadata.cc
[modify] https://crrev.com/02bd1f2acd5d4ebb3b0fa1585f7878640ce78532/cc/trees/render_frame_metadata.h
[modify] https://crrev.com/02bd1f2acd5d4ebb3b0fa1585f7878640ce78532/content/browser/renderer_host/render_frame_metadata_provider_impl.cc
[modify] https://crrev.com/02bd1f2acd5d4ebb3b0fa1585f7878640ce78532/content/browser/renderer_host/render_frame_metadata_provider_impl.h
[modify] https://crrev.com/02bd1f2acd5d4ebb3b0fa1585f7878640ce78532/content/browser/renderer_host/render_widget_host_impl.h
[modify] https://crrev.com/02bd1f2acd5d4ebb3b0fa1585f7878640ce78532/content/browser/renderer_host/render_widget_host_view_aura.cc
[modify] https://crrev.com/02bd1f2acd5d4ebb3b0fa1585f7878640ce78532/content/browser/renderer_host/render_widget_host_view_aura.h
[modify] https://crrev.com/02bd1f2acd5d4ebb3b0fa1585f7878640ce78532/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
[modify] https://crrev.com/02bd1f2acd5d4ebb3b0fa1585f7878640ce78532/content/browser/renderer_host/render_widget_host_view_base.cc
[modify] https://crrev.com/02bd1f2acd5d4ebb3b0fa1585f7878640ce78532/content/browser/renderer_host/render_widget_host_view_base.h
[modify] https://crrev.com/02bd1f2acd5d4ebb3b0fa1585f7878640ce78532/content/browser/renderer_host/render_widget_host_view_child_frame.cc
[modify] https://crrev.com/02bd1f2acd5d4ebb3b0fa1585f7878640ce78532/content/common/render_frame_metadata.mojom
[modify] https://crrev.com/02bd1f2acd5d4ebb3b0fa1585f7878640ce78532/content/common/render_frame_metadata_struct_traits.cc
[modify] https://crrev.com/02bd1f2acd5d4ebb3b0fa1585f7878640ce78532/content/common/render_frame_metadata_struct_traits.h

Project Member

Comment 16 by bugdroid1@chromium.org, Mar 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4fb015da5c4a2cbb03b85a4e083164516b22c48a

commit 4fb015da5c4a2cbb03b85a4e083164516b22c48a
Author: yiyix <yiyix@chromium.org>
Date: Tue Mar 20 21:19:01 2018

RELAND: Adding a |root_background_color| to RenderFrameMetadata

Added |root_background_color| to RenderFrameMetadata. Since
|root_background_color| does not change with every frame,it's added
to low frequency fields.

One use case is added together with this change:
RenderWidgetHostViewAura::SubmitCompositorFrame is used to sniff the
|root_background_color| from the CompositorFrame, after this change,
RWHVA listens to RenderFrameMetadataProvider and updates the background
color when the RenderFrameMetadata changes.

TBR=tsepez@chromium.org

Bug: 716911
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I9a0b14fd5d9b81c1945e97d1e0174883284af475
Reviewed-on: https://chromium-review.googlesource.com/971541
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Commit-Queue: Yi Xu <yiyix@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544521}
[modify] https://crrev.com/4fb015da5c4a2cbb03b85a4e083164516b22c48a/cc/trees/layer_tree_host_impl.cc
[modify] https://crrev.com/4fb015da5c4a2cbb03b85a4e083164516b22c48a/cc/trees/render_frame_metadata.cc
[modify] https://crrev.com/4fb015da5c4a2cbb03b85a4e083164516b22c48a/cc/trees/render_frame_metadata.h
[modify] https://crrev.com/4fb015da5c4a2cbb03b85a4e083164516b22c48a/content/browser/renderer_host/render_frame_metadata_provider_impl.cc
[modify] https://crrev.com/4fb015da5c4a2cbb03b85a4e083164516b22c48a/content/browser/renderer_host/render_frame_metadata_provider_impl.h
[modify] https://crrev.com/4fb015da5c4a2cbb03b85a4e083164516b22c48a/content/browser/renderer_host/render_widget_host_impl.h
[modify] https://crrev.com/4fb015da5c4a2cbb03b85a4e083164516b22c48a/content/browser/renderer_host/render_widget_host_view_aura.cc
[modify] https://crrev.com/4fb015da5c4a2cbb03b85a4e083164516b22c48a/content/browser/renderer_host/render_widget_host_view_aura.h
[modify] https://crrev.com/4fb015da5c4a2cbb03b85a4e083164516b22c48a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
[modify] https://crrev.com/4fb015da5c4a2cbb03b85a4e083164516b22c48a/content/browser/renderer_host/render_widget_host_view_base.cc
[modify] https://crrev.com/4fb015da5c4a2cbb03b85a4e083164516b22c48a/content/browser/renderer_host/render_widget_host_view_base.h
[modify] https://crrev.com/4fb015da5c4a2cbb03b85a4e083164516b22c48a/content/browser/renderer_host/render_widget_host_view_child_frame.cc
[modify] https://crrev.com/4fb015da5c4a2cbb03b85a4e083164516b22c48a/content/common/render_frame_metadata.mojom
[modify] https://crrev.com/4fb015da5c4a2cbb03b85a4e083164516b22c48a/content/common/render_frame_metadata_struct_traits.cc
[modify] https://crrev.com/4fb015da5c4a2cbb03b85a4e083164516b22c48a/content/common/render_frame_metadata_struct_traits.h

Project Member

Comment 17 by bugdroid1@chromium.org, Mar 29 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/dae40d733338a3c54add2a9385674e9094cd04bb

commit dae40d733338a3c54add2a9385674e9094cd04bb
Author: yiyix <yiyix@chromium.org>
Date: Thu Mar 29 02:22:12 2018

VIZ: use |root_background_color| from RFM in RWHVMac

RenderWidgetHostViewMac are used to sniff the |root_background_color|
in SubmitCompositorFrame. After this change, both RWHVMac listen to
RenderFrameMetadataProvider and update its
|last_frame_root_background_color_|

Bug:716911

Change-Id: Iafa466919c9d29185a59994ca74206fa205335f8
Reviewed-on: https://chromium-review.googlesource.com/982576
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Commit-Queue: Yi Xu <yiyix@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546703}
[modify] https://crrev.com/dae40d733338a3c54add2a9385674e9094cd04bb/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
[modify] https://crrev.com/dae40d733338a3c54add2a9385674e9094cd04bb/content/browser/renderer_host/render_widget_host_view_mac.h
[modify] https://crrev.com/dae40d733338a3c54add2a9385674e9094cd04bb/content/browser/renderer_host/render_widget_host_view_mac.mm

Sign in to add a comment