summaryrefslogtreecommitdiffstats
path: root/ui/ozone/platform/cast/surface_ozone_egl_cast.cc
diff options
context:
space:
mode:
authorhalliwell <halliwell@chromium.org>2015-04-06 11:28:59 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-06 18:34:56 +0000
commit3d0e49f9b24f3496aee8a10262fb87434dcd67a8 (patch)
tree5e5bab5b302061e9e0501e2ed20376f738eb684b /ui/ozone/platform/cast/surface_ozone_egl_cast.cc
parent82ad942a729379cdaf49f9d6ebd590411331cb06 (diff)
downloadchromium_src-3d0e49f9b24f3496aee8a10262fb87434dcd67a8.zip
chromium_src-3d0e49f9b24f3496aee8a10262fb87434dcd67a8.tar.gz
chromium_src-3d0e49f9b24f3496aee8a10262fb87434dcd67a8.tar.bz2
Loads CastEglPlatform implementation from shared library.
Cast Ozone is now fully implemented in chromecast/ozone, including the Ozone factory function. The CastEglPlatform interface is moved to public and its implementation will be loaded from shared library. BUG= Review URL: https://codereview.chromium.org/1059073002 Cr-Commit-Position: refs/heads/master@{#323916}
Diffstat (limited to 'ui/ozone/platform/cast/surface_ozone_egl_cast.cc')
-rw-r--r--ui/ozone/platform/cast/surface_ozone_egl_cast.cc38
1 files changed, 38 insertions, 0 deletions
diff --git a/ui/ozone/platform/cast/surface_ozone_egl_cast.cc b/ui/ozone/platform/cast/surface_ozone_egl_cast.cc
new file mode 100644
index 0000000..9170240
--- /dev/null
+++ b/ui/ozone/platform/cast/surface_ozone_egl_cast.cc
@@ -0,0 +1,38 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/ozone/platform/cast/surface_ozone_egl_cast.h"
+
+#include "ui/gfx/vsync_provider.h"
+#include "ui/ozone/platform/cast/surface_factory_cast.h"
+
+namespace ui {
+
+SurfaceOzoneEglCast::~SurfaceOzoneEglCast() {
+ parent_->ChildDestroyed();
+}
+
+intptr_t SurfaceOzoneEglCast::GetNativeWindow() {
+ return reinterpret_cast<intptr_t>(parent_->GetNativeWindow());
+}
+
+bool SurfaceOzoneEglCast::OnSwapBuffers() {
+ return true;
+}
+
+bool SurfaceOzoneEglCast::OnSwapBuffersAsync(
+ const SwapCompletionCallback& callback) {
+ callback.Run();
+ return true;
+}
+
+bool SurfaceOzoneEglCast::ResizeNativeWindow(const gfx::Size& viewport_size) {
+ return parent_->ResizeDisplay(viewport_size);
+}
+
+scoped_ptr<gfx::VSyncProvider> SurfaceOzoneEglCast::CreateVSyncProvider() {
+ return nullptr;
+}
+
+} // namespace ui