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
3 // found in the LICENSE file.
5 #include "ui/ozone/platform/dri/gbm_surfaceless.h"
7 #include "ui/ozone/platform/dri/dri_vsync_provider.h"
8 #include "ui/ozone/platform/dri/gbm_buffer.h"
12 GbmSurfaceless::GbmSurfaceless(
13 const base::WeakPtr<HardwareDisplayController>& controller)
14 : controller_(controller) {}
16 GbmSurfaceless::~GbmSurfaceless() {}
18 intptr_t GbmSurfaceless::GetNativeWindow() {
23 bool GbmSurfaceless::ResizeNativeWindow(const gfx::Size& viewport_size) {
28 bool GbmSurfaceless::OnSwapBuffers() {
32 bool success = controller_->SchedulePageFlip();
33 controller_->WaitForPageFlipEvent();
38 scoped_ptr<gfx::VSyncProvider> GbmSurfaceless::CreateVSyncProvider() {
39 return scoped_ptr<gfx::VSyncProvider>(new DriVSyncProvider(controller_));