| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/ozone/platform/drm/gpu/gbm_surfaceless.h" | 5 #include "ui/ozone/platform/drm/gpu/gbm_surfaceless.h" |
| 6 | 6 |
| 7 #include "ui/ozone/platform/drm/gpu/drm_device.h" | 7 #include "ui/ozone/platform/drm/gpu/drm_device.h" |
| 8 #include "ui/ozone/platform/drm/gpu/drm_vsync_provider.h" | 8 #include "ui/ozone/platform/drm/gpu/drm_vsync_provider.h" |
| 9 #include "ui/ozone/platform/drm/gpu/drm_window_proxy.h" | 9 #include "ui/ozone/platform/drm/gpu/drm_window_proxy.h" |
| 10 #include "ui/ozone/platform/drm/gpu/gbm_surface_factory.h" | 10 #include "ui/ozone/platform/drm/gpu/gbm_surface_factory.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 bool GbmSurfaceless::ResizeNativeWindow(const gfx::Size& viewport_size) { | 34 bool GbmSurfaceless::ResizeNativeWindow(const gfx::Size& viewport_size) { |
| 35 return true; | 35 return true; |
| 36 } | 36 } |
| 37 | 37 |
| 38 bool GbmSurfaceless::OnSwapBuffers() { | 38 bool GbmSurfaceless::OnSwapBuffers() { |
| 39 NOTREACHED(); | 39 NOTREACHED(); |
| 40 return false; | 40 return false; |
| 41 } | 41 } |
| 42 | 42 |
| 43 bool GbmSurfaceless::OnSwapBuffersAsync( | 43 void GbmSurfaceless::OnSwapBuffersAsync( |
| 44 const SwapCompletionCallback& callback) { | 44 const SwapCompletionCallback& callback) { |
| 45 window_->SchedulePageFlip(planes_, callback); | 45 window_->SchedulePageFlip(planes_, callback); |
| 46 planes_.clear(); | 46 planes_.clear(); |
| 47 return true; | |
| 48 } | 47 } |
| 49 | 48 |
| 50 scoped_ptr<gfx::VSyncProvider> GbmSurfaceless::CreateVSyncProvider() { | 49 scoped_ptr<gfx::VSyncProvider> GbmSurfaceless::CreateVSyncProvider() { |
| 51 return make_scoped_ptr(new DrmVSyncProvider(window_.get())); | 50 return make_scoped_ptr(new DrmVSyncProvider(window_.get())); |
| 52 } | 51 } |
| 53 | 52 |
| 54 bool GbmSurfaceless::IsUniversalDisplayLinkDevice() { | 53 bool GbmSurfaceless::IsUniversalDisplayLinkDevice() { |
| 55 return planes_.empty() ? false : planes_[0].buffer->RequiresGlFinish(); | 54 return planes_.empty() ? false : planes_[0].buffer->RequiresGlFinish(); |
| 56 } | 55 } |
| 57 | 56 |
| 58 } // namespace ui | 57 } // namespace ui |
| OLD | NEW |