OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ui/ozone/platform/drm/gpu/drm_window_proxy.h" |
| 6 |
| 7 #include "ui/ozone/platform/drm/gpu/drm_thread.h" |
| 8 #include "ui/ozone/platform/drm/gpu/overlay_plane.h" |
| 9 #include "ui/ozone/platform/drm/gpu/proxy_helpers.h" |
| 10 #include "ui/ozone/platform/drm/gpu/scanout_buffer.h" |
| 11 |
| 12 namespace ui { |
| 13 |
| 14 DrmWindowProxy::DrmWindowProxy(gfx::AcceleratedWidget widget, |
| 15 DrmThread* drm_thread) |
| 16 : widget_(widget), drm_thread_(drm_thread) {} |
| 17 |
| 18 DrmWindowProxy::~DrmWindowProxy() {} |
| 19 |
| 20 void DrmWindowProxy::SchedulePageFlip(const std::vector<OverlayPlane>& planes, |
| 21 const SwapCompletionCallback& callback) { |
| 22 drm_thread_->task_runner()->PostTask( |
| 23 FROM_HERE, |
| 24 base::Bind(&DrmThread::SchedulePageFlip, base::Unretained(drm_thread_), |
| 25 widget_, planes, CreateSafeCallback(callback))); |
| 26 } |
| 27 |
| 28 void DrmWindowProxy::GetVSyncParameters( |
| 29 const gfx::VSyncProvider::UpdateVSyncCallback& callback) { |
| 30 drm_thread_->task_runner()->PostTask( |
| 31 FROM_HERE, |
| 32 base::Bind(&DrmThread::GetVSyncParameters, base::Unretained(drm_thread_), |
| 33 widget_, CreateSafeCallback(callback))); |
| 34 } |
| 35 |
| 36 } // namespace ui |
OLD | NEW |