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

Unified Diff: ui/ozone/platform/dri/screen_manager.cc

Issue 838633002: [Ozone-DRI] Reuse framebuffer when re-enabling CRTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 11 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
Index: ui/ozone/platform/dri/screen_manager.cc
diff --git a/ui/ozone/platform/dri/screen_manager.cc b/ui/ozone/platform/dri/screen_manager.cc
index d4d0ddba113cfe80c271412e4865f2080d566f20..6305830688da5c1d9d7c7ffb1e3fde280370ed7e 100644
--- a/ui/ozone/platform/dri/screen_manager.cc
+++ b/ui/ozone/platform/dri/screen_manager.cc
@@ -109,8 +109,19 @@ bool ScreenManager::ConfigureDisplayController(uint32_t crtc,
// If nothing changed just enable the controller. Note, we perform an exact
// comparison on the mode since the refresh rate may have changed.
if (SameMode(mode, controller->get_mode()) &&
- origin == controller->origin() && !controller->IsDisabled())
+ origin == controller->origin()) {
+ if (controller->IsDisabled()) {
+ HardwareDisplayControllers::iterator mirror =
+ FindActiveDisplayControllerByLocation(modeset_bounds);
+ // If there is an active controller at the same location then start mirror
+ // mode.
+ if (mirror != controllers_.end())
+ return HandleMirrorMode(it, mirror, crtc, connector);
+ }
+
+ // Just re-enable the controller to re-use the current state.
return controller->Enable();
+ }
// Either the mode or the location of the display changed, so exit mirror
// mode and configure the display independently. If the caller still wants
« no previous file with comments | « ui/ozone/platform/dri/hardware_display_controller.cc ('k') | ui/ozone/platform/dri/screen_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698