diff options
author | ynovikov@chromium.org <ynovikov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-05 19:39:49 +0000 |
---|---|---|
committer | ynovikov@chromium.org <ynovikov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-05 19:39:49 +0000 |
commit | c21470a80f21c322054000c70ed8218f6c13ffdc (patch) | |
tree | 63b098f392515f911d07bfb7fbb90d1ead2a801a /chromeos/display/output_configurator.cc | |
parent | fe215da7c1385d11ccec59f058c8c7ea315fd0c1 (diff) | |
download | chromium_src-c21470a80f21c322054000c70ed8218f6c13ffdc.zip chromium_src-c21470a80f21c322054000c70ed8218f6c13ffdc.tar.gz chromium_src-c21470a80f21c322054000c70ed8218f6c13ffdc.tar.bz2 |
Matching modes for mirroring should preserve interlacing.
Add a condition when searching for modes for mirroring -
both modes must either be interlaced or progressive scan.
Also, as internal panels don't support interlacing,
do not attempt to panel fit interlaced modes on them.
BUG=179207
TEST=Manually disabled modes, making interlaced one the preferred,
then verified that this mode is not picked for mirroring,
but the next one. Steps in the bug should also work,
but I don't have the necessary hardware.
Review URL: https://chromiumcodereview.appspot.com/12388090
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186231 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/display/output_configurator.cc')
-rw-r--r-- | chromeos/display/output_configurator.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/chromeos/display/output_configurator.cc b/chromeos/display/output_configurator.cc index 4357b1a..c460114 100644 --- a/chromeos/display/output_configurator.cc +++ b/chromeos/display/output_configurator.cc @@ -1070,8 +1070,11 @@ bool OutputConfigurator::FindOrCreateMirrorMode(Display* display, for (int j = 0; j < internal_info->nmode; j++) { internal_mode_id = internal_info->modes[j]; XRRModeInfo* internal_mode = ModeInfoForID(screen, internal_mode_id); + bool is_internal_interlaced = internal_mode->modeFlags & RR_Interlace; + bool is_external_interlaced = external_mode->modeFlags & RR_Interlace; if (internal_mode->width == external_mode->width && - internal_mode->height == external_mode->height) { + internal_mode->height == external_mode->height && + is_internal_interlaced == is_external_interlaced) { *internal_mirror_mode = internal_mode_id; *external_mirror_mode = external_mode_id; return true; // Mirror mode found @@ -1082,9 +1085,11 @@ bool OutputConfigurator::FindOrCreateMirrorMode(Display* display, if (try_creating) { // We can downscale by 1.125, and upscale indefinitely // Downscaling looks ugly, so, can fit == can upscale + // Also, internal panels don't support fitting interlaced modes bool can_fit = internal_native_mode->width >= external_mode->width && - internal_native_mode->height >= external_mode->height; + internal_native_mode->height >= external_mode->height && + !(external_mode->modeFlags & RR_Interlace); if (can_fit) { XRRAddOutputMode(display, internal_output_id, external_mode_id); *internal_mirror_mode = *external_mirror_mode = external_mode_id; |