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

Unified Diff: ui/gfx/ozone/surface_ozone_base.h

Issue 205433002: ozone: Add OzoneSurface object that is owned by compositor, GLSurface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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
« no previous file with comments | « ui/gfx/ozone/surface_ozone.h ('k') | ui/gfx/ozone/surface_ozone_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/ozone/surface_ozone_base.h
diff --git a/ui/gfx/ozone/surface_ozone_base.h b/ui/gfx/ozone/surface_ozone_base.h
new file mode 100644
index 0000000000000000000000000000000000000000..0dbea401273d55c7487d5b4796d01424452bc451
--- /dev/null
+++ b/ui/gfx/ozone/surface_ozone_base.h
@@ -0,0 +1,41 @@
+// Copyright 2014 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.
+
+#ifndef UI_GFX_OZONE_SURFACE_OZONE_BASE_H_
+#define UI_GFX_OZONE_SURFACE_OZONE_BASE_H_
+
+#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
+#include "skia/ext/refptr.h"
+#include "ui/gfx/gfx_export.h"
+#include "ui/gfx/ozone/surface_ozone.h"
+
+namespace gfx {
+
+// Base class for in-tree implementations of SurfaceOzone.
+//
+// This adds default implementations of all the methods in SurfaceOzone,
+// for use by in-tree subclasses.
+//
+// If an out-of-tree implementation inherits this, it is possible there
+// will be silent breakage instead of a compile time failure as a result
+// of changes to the interface.
+class GFX_EXPORT SurfaceOzoneBase : public SurfaceOzone {
+ public:
+ SurfaceOzoneBase();
+ virtual ~SurfaceOzoneBase() OVERRIDE;
+
+ // SurfaceOzone:
+ virtual bool InitializeEGL() OVERRIDE;
+ virtual intptr_t /* EGLNativeWindowType */ GetEGLNativeWindow() OVERRIDE;
+ virtual bool InitializeCanvas() OVERRIDE;
+ virtual skia::RefPtr<SkCanvas> GetCanvas() OVERRIDE;
+ virtual bool ResizeCanvas(const gfx::Size& viewport_size) OVERRIDE;
+ virtual bool PresentCanvas() OVERRIDE;
+ virtual scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() OVERRIDE;
+};
+
+} // namespace gfx
+
+#endif // UI_GFX_OZONE_SURFACE_OZONE_BASE_H_
« no previous file with comments | « ui/gfx/ozone/surface_ozone.h ('k') | ui/gfx/ozone/surface_ozone_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698