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

Issue 2324163002: Add FakeDisplayDelegate for off device usage. (Closed)

Created:
4 years, 3 months ago by kylechar
Modified:
4 years, 3 months ago
Reviewers:
rjkroege, msw, oshima
CC:
chromium-reviews, rjkroege, kalyank, oshima+watch_chromium.org, ozone-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add FakeDisplayDelegate for off device usage. Add a NativeDisplayDelegate implementation that handles fake displays. Fake displays mimic physical displays when running off device. Allow user the specify initial display state with command line flag and provide API to programatically change display state at runtime. Except for changing the attached displays other NativeDisplayDelegate functionality is a noop. Add FakeDisplaySnapshot to store the fake display state. For now it's very simple but I intend to add a builder to make it easy to construct more complex displays. Add FakeDisplayController interface and method on NativeDisplayDelegate to get one. This interface will allow changing display state at runtime if implemented. Only FakeDisplayDelegate will implement it for now. Fake isn't the best term to describe "not real" displays but there are already virtual displays implemented for casting. BUG=611475 Committed: https://crrev.com/b77b33d434ddf9fbb31193c559d9907df2020db1 Cr-Commit-Position: refs/heads/master@{#419505}

Patch Set 1 #

Patch Set 2 : Rebase and expand. #

Total comments: 5

Patch Set 3 : Rename virtual to fake. #

Patch Set 4 : Fix typo. #

Patch Set 5 : Rebase and remove some debug logging. #

Total comments: 8

Patch Set 6 : Address rjkroege comments. #

Total comments: 8

Patch Set 7 : Address msw comments. #

Total comments: 2

Patch Set 8 : Address oshima comments. #

Patch Set 9 : Fix int64_t printf. #

Patch Set 10 : Fix windows compile error. #

Patch Set 11 : Fix windows compile problems. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+552 lines, -183 lines) Patch
M services/ui/display/platform_screen_ozone.h View 1 2 3 4 5 6 2 chunks +9 lines, -0 lines 0 comments Download
M services/ui/display/platform_screen_ozone.cc View 1 2 3 4 5 6 4 chunks +21 lines, -18 lines 0 comments Download
M services/ui/display/platform_screen_ozone_unittests.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M ui/display/BUILD.gn View 1 2 3 4 5 3 chunks +18 lines, -25 lines 0 comments Download
M ui/display/chromeos/test/test_native_display_delegate.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M ui/display/chromeos/test/test_native_display_delegate.cc View 1 2 2 chunks +7 lines, -2 lines 0 comments Download
M ui/display/chromeos/x11/native_display_delegate_x11.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M ui/display/chromeos/x11/native_display_delegate_x11.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M ui/display/display_switches.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M ui/display/display_switches.cc View 1 2 3 4 5 6 7 1 chunk +15 lines, -11 lines 0 comments Download
A ui/display/fake_display_delegate.h View 1 2 3 4 5 1 chunk +108 lines, -0 lines 0 comments Download
A ui/display/fake_display_delegate.cc View 1 2 3 4 5 6 7 8 9 1 chunk +195 lines, -0 lines 0 comments Download
A ui/display/fake_display_snapshot.h View 1 2 3 4 5 1 chunk +42 lines, -0 lines 0 comments Download
A ui/display/fake_display_snapshot.cc View 1 2 3 4 5 6 7 8 9 1 chunk +55 lines, -0 lines 0 comments Download
M ui/display/types/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
A ui/display/types/fake_display_controller.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +36 lines, -0 lines 0 comments Download
M ui/display/types/native_display_delegate.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +13 lines, -8 lines 0 comments Download
A + ui/display/types/native_display_delegate.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M ui/ozone/DEPS View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M ui/ozone/common/native_display_delegate_ozone.h View 1 2 1 chunk +1 line, -5 lines 0 comments Download
M ui/ozone/common/native_display_delegate_ozone.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M ui/ozone/platform/drm/host/drm_native_display_delegate.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M ui/ozone/platform/drm/host/drm_native_display_delegate.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M ui/ozone/platform/headless/BUILD.gn View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M ui/ozone/platform/headless/ozone_platform_headless.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M ui/ozone/platform/x11/BUILD.gn View 1 2 3 4 2 chunks +1 line, -2 lines 0 comments Download
D ui/ozone/platform/x11/native_display_delegate_ozone_x11.h View 1 chunk +0 lines, -38 lines 0 comments Download
D ui/ozone/platform/x11/native_display_delegate_ozone_x11.cc View 1 chunk +0 lines, -65 lines 0 comments Download
M ui/ozone/platform/x11/ozone_platform_x11.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 41 (23 generated)
kylechar
oshima: ui/display/* rjkroege: ui/ozone/*
4 years, 3 months ago (2016-09-09 14:01:54 UTC) #3
rjkroege
Maybe correct the typo in the description? https://codereview.chromium.org/2324163002/diff/20001/ui/display/display_switches.cc File ui/display/display_switches.cc (right): https://codereview.chromium.org/2324163002/diff/20001/ui/display/display_switches.cc#newcode15 ui/display/display_switches.cc:15: const char ...
4 years, 3 months ago (2016-09-12 20:31:06 UTC) #5
kylechar
https://codereview.chromium.org/2324163002/diff/20001/ui/display/display_switches.cc File ui/display/display_switches.cc (right): https://codereview.chromium.org/2324163002/diff/20001/ui/display/display_switches.cc#newcode15 ui/display/display_switches.cc:15: const char kDisplayBounds[] = "display-bounds"; On 2016/09/12 20:31:05, rjkroege ...
4 years, 3 months ago (2016-09-13 14:15:01 UTC) #6
kylechar
I've been doing a bit of digging into the original reason DisplaySnapshotVirtual was added and ...
4 years, 3 months ago (2016-09-13 15:31:22 UTC) #7
kylechar
I've updated the CL and used "fake display" instead of "virtual display". It's not perfect ...
4 years, 3 months ago (2016-09-13 18:37:48 UTC) #10
kylechar
Ping. Will you have time to look this week oshima/rjkroege?
4 years, 3 months ago (2016-09-14 20:44:55 UTC) #12
rjkroege
lgtm with some nits/comments that could be addressed mostly with TODOs. https://codereview.chromium.org/2324163002/diff/100001/ui/display/display_switches.h File ui/display/display_switches.h (right): ...
4 years, 3 months ago (2016-09-15 00:52:46 UTC) #13
kylechar
+msw for services/ui/* https://codereview.chromium.org/2324163002/diff/100001/ui/display/display_switches.h File ui/display/display_switches.h (right): https://codereview.chromium.org/2324163002/diff/100001/ui/display/display_switches.h#newcode18 ui/display/display_switches.h:18: DISPLAY_EXPORT extern const char kHostWindowBounds[]; On ...
4 years, 3 months ago (2016-09-15 17:31:55 UTC) #15
msw
services/ui lgtm with some very optional nits https://codereview.chromium.org/2324163002/diff/120001/services/ui/display/platform_screen_ozone.cc File services/ui/display/platform_screen_ozone.cc (right): https://codereview.chromium.org/2324163002/diff/120001/services/ui/display/platform_screen_ozone.cc#newcode79 services/ui/display/platform_screen_ozone.cc:79: wait_for_display_update_ = ...
4 years, 3 months ago (2016-09-15 19:30:08 UTC) #16
kylechar
https://codereview.chromium.org/2324163002/diff/120001/services/ui/display/platform_screen_ozone.cc File services/ui/display/platform_screen_ozone.cc (right): https://codereview.chromium.org/2324163002/diff/120001/services/ui/display/platform_screen_ozone.cc#newcode79 services/ui/display/platform_screen_ozone.cc:79: wait_for_display_update_ = true; On 2016/09/15 19:30:08, msw wrote: > ...
4 years, 3 months ago (2016-09-15 21:35:40 UTC) #17
msw
lgtm
4 years, 3 months ago (2016-09-15 22:38:32 UTC) #18
oshima
lgtm https://codereview.chromium.org/2324163002/diff/140001/ui/display/display_switches.cc File ui/display/display_switches.cc (right): https://codereview.chromium.org/2324163002/diff/140001/ui/display/display_switches.cc#newcode39 ui/display/display_switches.cc:39: const char kUseFirstDisplayAsInternal[] = "ash-use-first-display-as-internal"; you may remove ...
4 years, 3 months ago (2016-09-16 20:50:00 UTC) #19
kylechar
Thanks oshima! https://codereview.chromium.org/2324163002/diff/140001/ui/display/display_switches.cc File ui/display/display_switches.cc (right): https://codereview.chromium.org/2324163002/diff/140001/ui/display/display_switches.cc#newcode39 ui/display/display_switches.cc:39: const char kUseFirstDisplayAsInternal[] = "ash-use-first-display-as-internal"; On 2016/09/16 ...
4 years, 3 months ago (2016-09-16 20:59:15 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2324163002/160001
4 years, 3 months ago (2016-09-16 21:00:02 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_android on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/cast_shell_android/builds/130131)
4 years, 3 months ago (2016-09-16 21:08:19 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2324163002/240001
4 years, 3 months ago (2016-09-19 18:06:46 UTC) #37
commit-bot: I haz the power
Committed patchset #11 (id:240001)
4 years, 3 months ago (2016-09-19 18:12:27 UTC) #39
commit-bot: I haz the power
4 years, 3 months ago (2016-09-19 18:14:00 UTC) #41
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/b77b33d434ddf9fbb31193c559d9907df2020db1
Cr-Commit-Position: refs/heads/master@{#419505}

Powered by Google App Engine
This is Rietveld 408576698