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

Issue 880743002: Plumb ViewportMetrics change notifications around the world and back. (Closed)

Created:
5 years, 11 months ago by eseidel
Modified:
5 years, 10 months ago
Reviewers:
sky, abarth-chromium
CC:
abarth-chromium, Aaron Boodman, ben+mojo_chromium.org, darin (slow to review), esprehn, mojo-reviews_chromium.org, ojan, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
git@github.com:domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Plumb ViewportMetrics change notifications around the world and back. This fixes the race which is seen where mojo_shell will sometimes launch with the wrong viewport metrics since the DisplayManager will happily respond to GetViewportMetrics with default values before the NativeViewport has fully booted and told it what the actual values are. I considered making DisplayManager hang until the NativeViewport was ready, but I decided that it does make sense for the ViewportMetrics (device pixel ratio, mostly) to change for a view if it were to move between displays (as exists on desktop OSes today). R=abarth@chromium.org, sky@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/2b961563d09c1972d8fafe91d9de5c1a38d546e6

Patch Set 1 #

Total comments: 10

Patch Set 2 : Plumbing will continue until morale improves #

Patch Set 3 : Tell children #

Patch Set 4 : Does something on linux, but doesn't work on android yet :/ #

Patch Set 5 : Still doesn't seem to work #

Patch Set 6 : works! #

Patch Set 7 : Ready for review #

Patch Set 8 : Now without skydb changes #

Total comments: 11

Patch Set 9 : ServerView doesn't need to store metrics #

Patch Set 10 : Fix typo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+138 lines, -9 lines) Patch
M mojo/services/view_manager/public/cpp/lib/view.cc View 1 2 3 4 5 6 3 chunks +20 lines, -0 lines 0 comments Download
M mojo/services/view_manager/public/cpp/lib/view_manager_client_impl.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M mojo/services/view_manager/public/cpp/lib/view_manager_client_impl.cc View 1 2 3 4 5 6 7 8 9 2 chunks +22 lines, -1 line 0 comments Download
M mojo/services/view_manager/public/cpp/lib/view_private.h View 1 chunk +3 lines, -2 lines 0 comments Download
M mojo/services/view_manager/public/cpp/lib/view_private.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M mojo/services/view_manager/public/cpp/view.h View 1 chunk +2 lines, -0 lines 0 comments Download
M mojo/services/view_manager/public/cpp/view_observer.h View 1 chunk +5 lines, -0 lines 0 comments Download
M mojo/services/view_manager/public/interfaces/view_manager.mojom View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -1 line 0 comments Download
M services/view_manager/connection_manager.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M services/view_manager/connection_manager.cc View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -0 lines 0 comments Download
M services/view_manager/display_manager.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M services/view_manager/server_view_delegate.h View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M services/view_manager/test_change_tracker.h View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -0 lines 0 comments Download
M services/view_manager/test_change_tracker.cc View 1 2 3 4 5 6 7 8 2 chunks +13 lines, -0 lines 0 comments Download
M services/view_manager/view_manager_service_apptest.cc View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -0 lines 0 comments Download
M services/view_manager/view_manager_service_impl.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M services/view_manager/view_manager_service_impl.cc View 1 2 3 4 5 6 7 8 1 chunk +8 lines, -0 lines 0 comments Download
M services/view_manager/view_manager_service_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -0 lines 0 comments Download
M sky/viewer/document_view.h View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -0 lines 0 comments Download
M sky/viewer/document_view.cc View 1 2 3 4 5 6 7 8 2 chunks +15 lines, -4 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
eseidel
Just uploading this to sanity check it with sky before pouring more time into typing. ...
5 years, 11 months ago (2015-01-27 00:48:26 UTC) #1
sky
https://codereview.chromium.org/880743002/diff/1/mojo/services/view_manager/public/cpp/lib/view.cc File mojo/services/view_manager/public/cpp/lib/view.cc (right): https://codereview.chromium.org/880743002/diff/1/mojo/services/view_manager/public/cpp/lib/view.cc#newcode492 mojo/services/view_manager/public/cpp/lib/view.cc:492: void View::LocalSetViewportMetrics(const ViewportMetrics& old_metrics, Why does this need to ...
5 years, 11 months ago (2015-01-27 16:35:08 UTC) #2
eseidel
https://codereview.chromium.org/880743002/diff/1/mojo/services/view_manager/public/cpp/lib/view.cc File mojo/services/view_manager/public/cpp/lib/view.cc (right): https://codereview.chromium.org/880743002/diff/1/mojo/services/view_manager/public/cpp/lib/view.cc#newcode492 mojo/services/view_manager/public/cpp/lib/view.cc:492: void View::LocalSetViewportMetrics(const ViewportMetrics& old_metrics, On 2015/01/27 16:35:08, sky wrote: ...
5 years, 11 months ago (2015-01-27 18:50:05 UTC) #3
eseidel
I thought I was done, but it doesn't seem to work yet.
5 years, 11 months ago (2015-01-27 20:45:02 UTC) #4
eseidel
This should be ready for review.
5 years, 11 months ago (2015-01-27 22:43:13 UTC) #5
eseidel
https://codereview.chromium.org/880743002/diff/140001/mojo/services/view_manager/public/cpp/lib/view.cc File mojo/services/view_manager/public/cpp/lib/view.cc (right): https://codereview.chromium.org/880743002/diff/140001/mojo/services/view_manager/public/cpp/lib/view.cc#newcode387 mojo/services/view_manager/public/cpp/lib/view.cc:387: ViewportMetricsPtr CreateEmptyViewportMetrics() { This is unfortunate, but makes it ...
5 years, 11 months ago (2015-01-27 22:46:58 UTC) #6
abarth-chromium
sky/viewer/ LGTM
5 years, 11 months ago (2015-01-27 22:47:36 UTC) #7
sky
https://codereview.chromium.org/880743002/diff/140001/mojo/services/view_manager/public/cpp/lib/view_manager_client_impl.cc File mojo/services/view_manager/public/cpp/lib/view_manager_client_impl.cc (right): https://codereview.chromium.org/880743002/diff/140001/mojo/services/view_manager/public/cpp/lib/view_manager_client_impl.cc#newcode304 mojo/services/view_manager/public/cpp/lib/view_manager_client_impl.cc:304: View* view = GetViewById(view_id); It's possible view isn't around ...
5 years, 11 months ago (2015-01-27 23:40:23 UTC) #8
eseidel
ptal
5 years, 10 months ago (2015-01-28 21:14:56 UTC) #9
sky
LGTM
5 years, 10 months ago (2015-01-28 21:38:16 UTC) #10
eseidel
Committed patchset #10 (id:180001) manually as 2b961563d09c1972d8fafe91d9de5c1a38d546e6 (presubmit successful).
5 years, 10 months ago (2015-01-28 21:43:35 UTC) #11
eseidel
5 years, 10 months ago (2015-01-28 21:58:40 UTC) #12
Message was sent while issue was closed.
This broke the tree due to a typo.  Fixed in
d60312f362cd6ed618293259f3df6e5f4128b820

Powered by Google App Engine
This is Rietveld 408576698