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

Unified Diff: chromeos/display/output_configurator.cc

Issue 12388090: Matching modes for mirroring should preserve interlacing. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Review Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/display/output_configurator.cc
diff --git a/chromeos/display/output_configurator.cc b/chromeos/display/output_configurator.cc
index 4357b1a827af1deb2692f805c8694832ae7a63f6..c460114699a15093dfb11e3d4149b48f833c0531 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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698