Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / ui / ozone / platform / cast / surface_ozone_egl_cast.cc
blob56dee5873d2a8558d18438ff40bf8248ba9277d4
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.
5 #include "ui/ozone/platform/cast/surface_ozone_egl_cast.h"
7 #include "ui/gfx/vsync_provider.h"
8 #include "ui/ozone/platform/cast/surface_factory_cast.h"
10 namespace ui {
12 SurfaceOzoneEglCast::~SurfaceOzoneEglCast() {
13 parent_->ChildDestroyed();
16 intptr_t SurfaceOzoneEglCast::GetNativeWindow() {
17 return reinterpret_cast<intptr_t>(parent_->GetNativeWindow());
20 bool SurfaceOzoneEglCast::OnSwapBuffers() {
21 return true;
24 bool SurfaceOzoneEglCast::OnSwapBuffersAsync(
25 const SwapCompletionCallback& callback) {
26 callback.Run(gfx::SwapResult::SWAP_ACK);
27 return true;
30 bool SurfaceOzoneEglCast::ResizeNativeWindow(const gfx::Size& viewport_size) {
31 return parent_->ResizeDisplay(viewport_size);
34 scoped_ptr<gfx::VSyncProvider> SurfaceOzoneEglCast::CreateVSyncProvider() {
35 return nullptr;
38 } // namespace ui