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

Issue 805774 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug

Blocking:
issue 772576



Sign in to add a comment

mac: Enable surface synchronization

Project Member Reported by ccameron@chromium.org, Jan 25 2018

Issue description

This feature is launching on Aura and need to be supported on Mac as well.
 
Blocking: 772576
Project Member

Comment 2 by bugdroid1@chromium.org, Jan 29 2018

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

commit 5545b33782e2bc68548c0bdc12bc9ff6bc5e43e4
Author: Christopher Cameron <ccameron@chromium.org>
Date: Mon Jan 29 08:39:12 2018

viz/mac: Merge surface sync and non surface sync behavior

On Mac, the browser's ui::Compositor is always the same size
as the renderer's ui::Compositor.

In non-viz and non-surface-sync mode, this is done by resizing
the ui::Compositor to match the renderer frame size at
SubmitCompositorFrame.

This isn't suitable anymore, since SubmitCompositorFrame is
going away.

Change this so that the ui::Compositor is resized to match the
surface size, at OnFirstSurfaceActivation. Add a method to
DelegatedFrameHostClient to plumb this signal through to the
BrowserCompositorViewMac. Also rename WasResized to
OnNSViewWasResized, to be more clear.

This mechanism works with and without surface synchronization
enabled.

Bug:  805774 
Change-Id: I7a85b2e4eba8c962ef1c67446b38425637fdeb62
Reviewed-on: https://chromium-review.googlesource.com/887966
Commit-Queue: ccameron <ccameron@chromium.org>
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532351}
[modify] https://crrev.com/5545b33782e2bc68548c0bdc12bc9ff6bc5e43e4/content/browser/renderer_host/browser_compositor_view_mac.h
[modify] https://crrev.com/5545b33782e2bc68548c0bdc12bc9ff6bc5e43e4/content/browser/renderer_host/browser_compositor_view_mac.mm
[modify] https://crrev.com/5545b33782e2bc68548c0bdc12bc9ff6bc5e43e4/content/browser/renderer_host/delegated_frame_host.cc
[modify] https://crrev.com/5545b33782e2bc68548c0bdc12bc9ff6bc5e43e4/content/browser/renderer_host/delegated_frame_host.h
[modify] https://crrev.com/5545b33782e2bc68548c0bdc12bc9ff6bc5e43e4/content/browser/renderer_host/delegated_frame_host_client_aura.cc
[modify] https://crrev.com/5545b33782e2bc68548c0bdc12bc9ff6bc5e43e4/content/browser/renderer_host/delegated_frame_host_client_aura.h
[modify] https://crrev.com/5545b33782e2bc68548c0bdc12bc9ff6bc5e43e4/content/browser/renderer_host/render_widget_host_view_mac.mm

Project Member

Comment 3 by bugdroid1@chromium.org, Jan 31 2018

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

commit 43debccc30cb77befb808b7a02fa195fe7f14d2a
Author: Christopher Cameron <ccameron@chromium.org>
Date: Wed Jan 31 03:16:43 2018

viz/mac: Add autoresize functionality

Add a mechanism for allowing an autoresize frame to resize the
renderer's surface.

When in auto-resize, make BrowserCompositorMac not update its size
based on the NSView size.

Bug:  805774 
Change-Id: Ibc0b8b14ec7c1f4bdef30ac815d759f5894ab315
Reviewed-on: https://chromium-review.googlesource.com/892288
Commit-Queue: ccameron <ccameron@chromium.org>
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533183}
[modify] https://crrev.com/43debccc30cb77befb808b7a02fa195fe7f14d2a/content/browser/renderer_host/browser_compositor_view_mac.h
[modify] https://crrev.com/43debccc30cb77befb808b7a02fa195fe7f14d2a/content/browser/renderer_host/browser_compositor_view_mac.mm
[modify] https://crrev.com/43debccc30cb77befb808b7a02fa195fe7f14d2a/content/browser/renderer_host/render_widget_host_view_mac.h
[modify] https://crrev.com/43debccc30cb77befb808b7a02fa195fe7f14d2a/content/browser/renderer_host/render_widget_host_view_mac.mm

There are still a handful of test failures with surface sync enabled. Hoping to get them fixed in next couple of days.
Project Member

Comment 5 by bugdroid1@chromium.org, Feb 8 2018

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

commit 9214e8cae6886dbdcba840111af3d1a81b7ded82
Author: Christopher Cameron <ccameron@chromium.org>
Date: Thu Feb 08 02:34:26 2018

mac: Set surface ids for views

This patch makes all of views_unittests pass. It also makes secoundary
UI (which is powered by views) show up when surface sync is enabled.

Bug:  805774 
Change-Id: Id74313b7de4ca86fe1f1b9bf97035844e6572703
Reviewed-on: https://chromium-review.googlesource.com/907177
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Reviewed-by: Trent Apted <tapted@chromium.org>
Commit-Queue: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535270}
[modify] https://crrev.com/9214e8cae6886dbdcba840111af3d1a81b7ded82/ui/views/cocoa/bridged_native_widget.h
[modify] https://crrev.com/9214e8cae6886dbdcba840111af3d1a81b7ded82/ui/views/cocoa/bridged_native_widget.mm

Project Member

Comment 6 by bugdroid1@chromium.org, Feb 8 2018

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

commit f5beaf48bb825e6b79cfc739360119555f1ea6e3
Author: Christopher Cameron <ccameron@chromium.org>
Date: Thu Feb 08 07:02:50 2018

mac: Fix lock status with surface sync

This starts as a fix for the one failing test in content_unittests, and
picks up some other cleanup on the way.

Note that "Suspend" in the context of this patch should be viewed as
equivalent to "Lock".

The ui::Compositor should start as suspended unless there is a saved
frame from the DelegatedFrameHost available. It should be unsuspended
as soon as a new surface is activated.

While we're here, this should happen for resize as well. Suspend the
compositor when the DelegatedFrameHost's surface size schanges, and
unsuspend at the next surface activation. (This could potentially be
updated to include pipelines of active resizes, but this gets us to a
good place and is simple).

Also fix a longstanding bug where the DelegatedFrameHost would report
that it was not visible if the ui::Compositor was suspended (this
happens on macOS when the window is occluded). The DelegatedFrameHost
in this situation is still potentially-visible.

Bug:  805774 
Change-Id: I489166c07d2620df5c3bd948d9ce176a5acf4c2f
Reviewed-on: https://chromium-review.googlesource.com/908053
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Commit-Queue: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535323}
[modify] https://crrev.com/f5beaf48bb825e6b79cfc739360119555f1ea6e3/content/browser/renderer_host/browser_compositor_view_mac.mm

Project Member

Comment 7 by bugdroid1@chromium.org, Feb 8 2018

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

commit 93e0a41de62d32c31cf5b81fef8b0e65fe04aab0
Author: Christopher Cameron <ccameron@chromium.org>
Date: Thu Feb 08 17:55:25 2018

mac: Enable surface synchronization by default

Bug:  805774 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I9975cfcaada3304d4d5ded6de66e2270a97d934e
Reviewed-on: https://chromium-review.googlesource.com/907501
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Commit-Queue: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535432}
[modify] https://crrev.com/93e0a41de62d32c31cf5b81fef8b0e65fe04aab0/components/viz/common/features.cc

Status: Fixed (was: Assigned)
Let's see if it sticks!
Project Member

Comment 9 by bugdroid1@chromium.org, Feb 12 2018

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

commit 27ecbe56d89bc343463f3401079da22dccca3322
Author: ccameron <ccameron@chromium.org>
Date: Mon Feb 12 19:55:59 2018

Revert "mac: Enable surface synchronization by default"

This reverts commit 93e0a41de62d32c31cf5b81fef8b0e65fe04aab0.

Reason for revert: https://crbug.com/810724

Original change's description:
> mac: Enable surface synchronization by default
> 
> Bug:  805774 
> Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
> Change-Id: I9975cfcaada3304d4d5ded6de66e2270a97d934e
> Reviewed-on: https://chromium-review.googlesource.com/907501
> Reviewed-by: Fady Samuel <fsamuel@chromium.org>
> Commit-Queue: ccameron <ccameron@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#535432}

TBR=ccameron@chromium.org,fsamuel@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug:  805774 
Change-Id: I4c1382435d734037101384bd7c05d7c30d85fae9
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Reviewed-on: https://chromium-review.googlesource.com/913651
Reviewed-by: ccameron <ccameron@chromium.org>
Commit-Queue: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536163}
[modify] https://crrev.com/27ecbe56d89bc343463f3401079da22dccca3322/components/viz/common/features.cc

Project Member

Comment 10 by bugdroid1@chromium.org, Feb 13 2018

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

commit fb701e10c9ce380342948c302310708f8443e5f6
Author: Christopher Cameron <ccameron@chromium.org>
Date: Tue Feb 13 19:32:23 2018

Delete duplicate display::Display to content::ScreenInfo conversion

This is the first step in the great content::ScreenInfo refactor.

There are four nearly-identical implementations of WebContentsView's
GetScreenInfo and GetDefaultScreenInfo functions. This is likely
because this code was written before display::Display was added
as the cross-platform representation of screen info. Merge these
instances into a single DisplayUtil implementation, keeping the
idiosyncracies of the implementations intact with ifdefs.

Remove WebContentsViewDelegate::OverrideDisplayColorSpace, because it
has been un-shipped and should not constrain this refactoring.

Subsequent patches will make the flow of screen info updates possible
to reason about, and will clarify and/or eliminate the roles of the
GetScreenInfo methods of RenderWidgetHost, RenderWidgetHostView,
RenderWidgetHostViewDelegate, WebContentsView, and various
subclasses.

Bug:  805774 
Change-Id: I59b24a4731e24912f3e50aac2cf65c38a6587147
Reviewed-on: https://chromium-review.googlesource.com/915427
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Tao Bai <michaelbai@chromium.org>
Commit-Queue: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536425}
[modify] https://crrev.com/fb701e10c9ce380342948c302310708f8443e5f6/android_webview/browser/aw_web_contents_view_delegate.cc
[modify] https://crrev.com/fb701e10c9ce380342948c302310708f8443e5f6/android_webview/browser/aw_web_contents_view_delegate.h
[modify] https://crrev.com/fb701e10c9ce380342948c302310708f8443e5f6/content/browser/BUILD.gn
[modify] https://crrev.com/fb701e10c9ce380342948c302310708f8443e5f6/content/browser/frame_host/interstitial_page_impl.cc
[add] https://crrev.com/fb701e10c9ce380342948c302310708f8443e5f6/content/browser/renderer_host/display_util.cc
[add] https://crrev.com/fb701e10c9ce380342948c302310708f8443e5f6/content/browser/renderer_host/display_util.h
[modify] https://crrev.com/fb701e10c9ce380342948c302310708f8443e5f6/content/browser/renderer_host/render_widget_host_view_base.cc
[modify] https://crrev.com/fb701e10c9ce380342948c302310708f8443e5f6/content/browser/renderer_host/render_widget_host_view_base.h
[modify] https://crrev.com/fb701e10c9ce380342948c302310708f8443e5f6/content/browser/renderer_host/render_widget_host_view_base_unittest.cc
[modify] https://crrev.com/fb701e10c9ce380342948c302310708f8443e5f6/content/browser/web_contents/web_contents_view_android.cc
[modify] https://crrev.com/fb701e10c9ce380342948c302310708f8443e5f6/content/browser/web_contents/web_contents_view_aura.cc
[modify] https://crrev.com/fb701e10c9ce380342948c302310708f8443e5f6/content/browser/web_contents/web_contents_view_child_frame.cc
[modify] https://crrev.com/fb701e10c9ce380342948c302310708f8443e5f6/content/browser/web_contents/web_contents_view_guest.cc
[modify] https://crrev.com/fb701e10c9ce380342948c302310708f8443e5f6/content/browser/web_contents/web_contents_view_mac.mm
[modify] https://crrev.com/fb701e10c9ce380342948c302310708f8443e5f6/content/public/browser/web_contents_view_delegate.cc
[modify] https://crrev.com/fb701e10c9ce380342948c302310708f8443e5f6/content/public/browser/web_contents_view_delegate.h
[modify] https://crrev.com/fb701e10c9ce380342948c302310708f8443e5f6/content/test/mock_render_widget_host_delegate.cc

Project Member

Comment 11 by bugdroid1@chromium.org, Feb 13 2018

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

commit 07f666b1fad38281441d63d1046bb02cc5368575
Author: Christopher Cameron <ccameron@chromium.org>
Date: Tue Feb 13 23:41:19 2018

Some RenderWidgetHostDelegate cleanup

This is step two in the great content::ScreenInfo refactor.

The method RenderWidgetHostDelegate::ScreenInfoChanged is only used
by test code. Remove it.

The method RenderWidgetHostDelegate::RenderWidgetWasResized
re-computes the (hopefully same) ScreenInfo that was computed by the
caller. Don't re-compute it -- pass the ScreenInfo that the caller
used.

Bug:  805774 
Change-Id: Ie3e67bd27e6f8bc1c56570a8e7c57387779d4599
Reviewed-on: https://chromium-review.googlesource.com/915845
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536552}
[modify] https://crrev.com/07f666b1fad38281441d63d1046bb02cc5368575/content/browser/renderer_host/render_widget_host_delegate.h
[modify] https://crrev.com/07f666b1fad38281441d63d1046bb02cc5368575/content/browser/renderer_host/render_widget_host_impl.cc
[modify] https://crrev.com/07f666b1fad38281441d63d1046bb02cc5368575/content/browser/renderer_host/render_widget_host_impl.h
[modify] https://crrev.com/07f666b1fad38281441d63d1046bb02cc5368575/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
[modify] https://crrev.com/07f666b1fad38281441d63d1046bb02cc5368575/content/browser/web_contents/web_contents_impl.cc
[modify] https://crrev.com/07f666b1fad38281441d63d1046bb02cc5368575/content/browser/web_contents/web_contents_impl.h
[modify] https://crrev.com/07f666b1fad38281441d63d1046bb02cc5368575/content/test/mock_render_widget_host_delegate.cc
[modify] https://crrev.com/07f666b1fad38281441d63d1046bb02cc5368575/content/test/mock_render_widget_host_delegate.h

Project Member

Comment 12 by bugdroid1@chromium.org, Feb 15 2018

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

commit ef9e9fc39c2002c1735dde5584096f9c8fd1f01b
Author: Christopher Cameron <ccameron@chromium.org>
Date: Thu Feb 15 07:19:34 2018

Remove GetScreenInfo from WebContents and WebContentsView

It is necessary to be precise about the ScreenInfo that is to be sent
to a RenderWidget, because failing to be consistent will result in
violations of surface invarients (size and scale factor of the surface).

The RenderWidgetHostView is the source of truth about the surface
id and size, but it is not consistently the source of truth about the
device scale factor.

The device scale factor comes from the ScreenInfo which comes from
RenderWidgetHostDelegate->WebContentsImpl->WebContentsView, which
may or may not match the RenderWidgetHostView surface info.

Remove the GetScreenInfo method from WebContents and WebContentsView,
and restore RenderWidgetHostView as the one true source of ScreenInfo.

Bug:  805774 
Change-Id: Id0d962a49ceb9ad91de783faf3fb1215c1333083
Reviewed-on: https://chromium-review.googlesource.com/917202
Reviewed-by: ccameron <ccameron@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: James MacLean <wjmaclean@chromium.org>
Commit-Queue: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536959}
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/browser/devtools/protocol/page_handler.cc
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/browser/frame_host/interstitial_page_impl.cc
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/browser/frame_host/interstitial_page_impl.h
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/browser/frame_host/navigation_controller_impl_browsertest.cc
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/browser/frame_host/render_widget_host_view_guest.cc
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/browser/frame_host/render_widget_host_view_guest.h
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/browser/renderer_host/render_widget_host_delegate.cc
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/browser/renderer_host/render_widget_host_delegate.h
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/browser/renderer_host/render_widget_host_impl.cc
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/browser/renderer_host/render_widget_host_unittest.cc
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/browser/renderer_host/render_widget_host_view_base.cc
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/browser/renderer_host/render_widget_host_view_base.h
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/browser/renderer_host/render_widget_host_view_child_frame.cc
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/browser/renderer_host/render_widget_host_view_child_frame.h
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/browser/web_contents/web_contents_impl.cc
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/browser/web_contents/web_contents_impl.h
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/browser/web_contents/web_contents_view.h
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/browser/web_contents/web_contents_view_android.cc
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/browser/web_contents/web_contents_view_android.h
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/browser/web_contents/web_contents_view_aura.cc
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/browser/web_contents/web_contents_view_aura.h
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/browser/web_contents/web_contents_view_aura_unittest.cc
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/browser/web_contents/web_contents_view_child_frame.cc
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/browser/web_contents/web_contents_view_child_frame.h
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/browser/web_contents/web_contents_view_guest.cc
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/browser/web_contents/web_contents_view_guest.h
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/browser/web_contents/web_contents_view_mac.h
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/browser/web_contents/web_contents_view_mac.mm
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/public/browser/render_widget_host_view.h
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/test/mock_render_widget_host_delegate.cc
[modify] https://crrev.com/ef9e9fc39c2002c1735dde5584096f9c8fd1f01b/content/test/mock_render_widget_host_delegate.h

Project Member

Comment 13 by bugdroid1@chromium.org, Feb 21 2018

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

commit 045d218e483ac576fc7b779fbf74856d939bb121
Author: Christopher Cameron <ccameron@chromium.org>
Date: Wed Feb 21 18:19:37 2018

mac: Enable surface synchronization by default

TBR=fsamuel

Bug:  805774 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I9ca26eb48b0a4cb9f41fe58cbf16a8a9a2fd684b
Reviewed-on: https://chromium-review.googlesource.com/928183
Reviewed-by: ccameron <ccameron@chromium.org>
Commit-Queue: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538152}
[modify] https://crrev.com/045d218e483ac576fc7b779fbf74856d939bb121/components/viz/common/features.cc

Project Member

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

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

commit 615f354b286f4e9acdcc6c42fdb2dc640577640d
Author: Christopher Cameron <ccameron@chromium.org>
Date: Thu Mar 01 13:49:19 2018

Make LayerTreeHost::SetViewportSizeAndScale set painted DSF

The device_scale_factor_ and painted_device_scale_factor_
members of LayerTreeHost are mutually exclusive -- a tree
will either use one or the other (and leave the unused member
as 1). Prior to this cleanup we would call SetDeviceScaleFactor
or SetPaintedDeviceScaleFactor to update these variables.

Add a LayerTreeSettings member to select the device scale factor
mode, and make LayerTreeHost::SetViewportSizeAndScale update
the specified variable.

Remove the remaining calls to SetPaintedDeviceScaleFactor (from
Android's compositor) and remove the function.

Remove RenderWidgetCompositor::SetDeviceScaleFactor, and several
related WebKit functions that called this. The call was only
necessary to work around a bug where we did not specify the
"original" (aka "non-emulated") device scale factor in
RenderWidget::UpdateCompositorSurface non-IsUseZoomForDSFEnabled
mode.

R=dgozman,piman,fsamuel
TBR=pdr (for public/)

Bug:  805774 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I233727da320b14b041bb48515da3cfb0d2be1ea4
Reviewed-on: https://chromium-review.googlesource.com/938958
Commit-Queue: ccameron <ccameron@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540147}
[modify] https://crrev.com/615f354b286f4e9acdcc6c42fdb2dc640577640d/cc/trees/layer_tree_host.cc
[modify] https://crrev.com/615f354b286f4e9acdcc6c42fdb2dc640577640d/cc/trees/layer_tree_host.h
[modify] https://crrev.com/615f354b286f4e9acdcc6c42fdb2dc640577640d/cc/trees/layer_tree_host_unittest.cc
[modify] https://crrev.com/615f354b286f4e9acdcc6c42fdb2dc640577640d/cc/trees/layer_tree_settings.h
[modify] https://crrev.com/615f354b286f4e9acdcc6c42fdb2dc640577640d/content/browser/renderer_host/compositor_impl_android.cc
[modify] https://crrev.com/615f354b286f4e9acdcc6c42fdb2dc640577640d/content/renderer/gpu/render_widget_compositor.cc
[modify] https://crrev.com/615f354b286f4e9acdcc6c42fdb2dc640577640d/content/renderer/gpu/render_widget_compositor.h
[modify] https://crrev.com/615f354b286f4e9acdcc6c42fdb2dc640577640d/content/renderer/render_widget.cc
[modify] https://crrev.com/615f354b286f4e9acdcc6c42fdb2dc640577640d/third_party/WebKit/Source/core/exported/WebViewImpl.cpp
[modify] https://crrev.com/615f354b286f4e9acdcc6c42fdb2dc640577640d/third_party/WebKit/Source/core/exported/WebViewImpl.h
[modify] https://crrev.com/615f354b286f4e9acdcc6c42fdb2dc640577640d/third_party/WebKit/Source/core/frame/WebFrameWidgetImpl.cpp
[modify] https://crrev.com/615f354b286f4e9acdcc6c42fdb2dc640577640d/third_party/WebKit/Source/core/frame/WebFrameWidgetImpl.h
[modify] https://crrev.com/615f354b286f4e9acdcc6c42fdb2dc640577640d/third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.cpp
[modify] https://crrev.com/615f354b286f4e9acdcc6c42fdb2dc640577640d/third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.h
[modify] https://crrev.com/615f354b286f4e9acdcc6c42fdb2dc640577640d/third_party/WebKit/public/platform/WebLayerTreeView.h

Sign in to add a comment