Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: chromecast/ozone/surface_ozone_egl_chromecast.cc

Issue 1025453002: Implement common Ozone interface for Chromecast. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chromecast/ozone/surface_ozone_egl_chromecast.cc
diff --git a/chromecast/ozone/surface_ozone_egl_chromecast.cc b/chromecast/ozone/surface_ozone_egl_chromecast.cc
new file mode 100644
index 0000000000000000000000000000000000000000..1b3e8b792a0353789ad51630eefbfb8cf2c6d41e
--- /dev/null
+++ b/chromecast/ozone/surface_ozone_egl_chromecast.cc
@@ -0,0 +1,41 @@
+// 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 "chromecast/ozone/surface_ozone_egl_chromecast.h"
lcwu1 2015/03/27 00:51:43 Add a vertical space above.
halliwell 2015/03/27 01:45:03 Done.
+
+#include "chromecast/ozone/surface_factory_chromecast.h"
+#include "ui/gfx/vsync_provider.h"
+
+namespace chromecast {
+namespace ozone {
+
+SurfaceOzoneEglChromecast::~SurfaceOzoneEglChromecast() {
+ parent_->ChildDestroyed();
+}
+
+intptr_t SurfaceOzoneEglChromecast::GetNativeWindow() {
+ return reinterpret_cast<intptr_t>(parent_->GetNativeWindow());
+}
+
+bool SurfaceOzoneEglChromecast::OnSwapBuffers() {
+ return true;
+}
+
+bool SurfaceOzoneEglChromecast::OnSwapBuffersAsync(
+ const SwapCompletionCallback& callback) {
+ callback.Run();
+ return true;
+}
+
+bool SurfaceOzoneEglChromecast::ResizeNativeWindow(
+ const gfx::Size& viewport_size) {
+ return parent_->ResizeDisplay(viewport_size);
+}
+
+scoped_ptr<gfx::VSyncProvider>
+SurfaceOzoneEglChromecast::CreateVSyncProvider() {
+ return scoped_ptr<gfx::VSyncProvider>();
+}
+
+} // namespace ozone
+} // namespace chromecast

Powered by Google App Engine
This is Rietveld 408576698