diff options
author | alexst <alexst@chromium.org> | 2015-04-15 15:28:42 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-15 22:29:08 +0000 |
commit | b47c9f5fb6b669b27e055ab8b305309170849732 (patch) | |
tree | 96ba5c801cf9e15efe057b17ff4b632c1486c9c3 /ui/ozone/platform/drm/gpu/gbm_surfaceless.cc | |
parent | 3a725956aff76414de8ecec2dcaa773b21fc8fe5 (diff) | |
download | chromium_src-b47c9f5fb6b669b27e055ab8b305309170849732.zip chromium_src-b47c9f5fb6b669b27e055ab8b305309170849732.tar.gz chromium_src-b47c9f5fb6b669b27e055ab8b305309170849732.tar.bz2 |
[ozone] Keep track of pending frames on drm_window when hardware display controller is disabled or when in headless mode.
When display controller is disabled, it used to stop tracking which buffer was the considered front. Surface would fast ack all incoming buffers without presenting them, which means that any one of them could be getting painted into while display controller is off. Upon wakeup, the controller would grab what it thought was the last front buffer, but in practice it was not because of the fast acks. Net result is that it may try to modeset with the buffer GL is painting into, making it hang on a fence in the driver.
This patch removes all knowledge of front buffers from the display controller and explicitly sets it on the window, which tracks it while the controller is off.
BUG=473831
Review URL: https://codereview.chromium.org/1078183003
Cr-Commit-Position: refs/heads/master@{#325326}
Diffstat (limited to 'ui/ozone/platform/drm/gpu/gbm_surfaceless.cc')
-rw-r--r-- | ui/ozone/platform/drm/gpu/gbm_surfaceless.cc | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/ui/ozone/platform/drm/gpu/gbm_surfaceless.cc b/ui/ozone/platform/drm/gpu/gbm_surfaceless.cc index 138d207..c906cfd 100644 --- a/ui/ozone/platform/drm/gpu/gbm_surfaceless.cc +++ b/ui/ozone/platform/drm/gpu/gbm_surfaceless.cc @@ -34,23 +34,13 @@ bool GbmSurfaceless::ResizeNativeWindow(const gfx::Size& viewport_size) { } bool GbmSurfaceless::OnSwapBuffers() { - HardwareDisplayController* controller = window_delegate_->GetController(); - if (!controller) - return true; - - return controller->SchedulePageFlip(true /* is_sync */, - base::Bind(&base::DoNothing)); + return window_delegate_->SchedulePageFlip(true /* is_sync */, + base::Bind(&base::DoNothing)); } bool GbmSurfaceless::OnSwapBuffersAsync( const SwapCompletionCallback& callback) { - HardwareDisplayController* controller = window_delegate_->GetController(); - if (!controller) { - callback.Run(); - return true; - } - - return controller->SchedulePageFlip(false /* is_sync */, callback); + return window_delegate_->SchedulePageFlip(false /* is_sync */, callback); } scoped_ptr<gfx::VSyncProvider> GbmSurfaceless::CreateVSyncProvider() { |