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

Unified Diff: ui/ozone/platform/dri/scanout_surface.h

Issue 106633002: GBM Ozone implementation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 7 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: ui/ozone/platform/dri/scanout_surface.h
diff --git a/ui/ozone/platform/dri/scanout_surface.h b/ui/ozone/platform/dri/scanout_surface.h
new file mode 100644
index 0000000000000000000000000000000000000000..f7775c8bef54e26f25e397c2118864f66f3e27d0
--- /dev/null
+++ b/ui/ozone/platform/dri/scanout_surface.h
@@ -0,0 +1,49 @@
+// 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_OZONE_PLATFORM_DRI_SCANOUT_SURFACE_H_
+#define UI_OZONE_PLATFORM_DRI_SCANOUT_SURFACE_H_
+
+#include <stdint.h>
+
+namespace gfx {
+class Size;
+}
+
+namespace ui {
+
+// Initializes and stores state associated with the drawing surface.
rjkroege 2014/05/27 15:33:42 I'd appreciate a bit more explanation here.
dnicoara 2014/05/27 17:20:52 Done. Moved the generic part from DriSurface here.
+class ScanoutSurface {
+ public:
+ virtual ~ScanoutSurface() {}
+
+ // Used to allocate all necessary buffers for this surface. If the
+ // initialization succeeds, the device is ready to be used for drawing
+ // operations.
+ // Returns true if the initialization is successful, false otherwise.
+ virtual bool Initialize() = 0;
+
+ // Swaps the back buffer with the front buffer.
+ virtual void SwapBuffers() = 0;
+
+ // Returns the ID of the current backbuffer.
+ virtual uint32_t GetFramebufferId() const = 0;
+
+ // Returns the handle of the current backbuffer.
+ virtual uint32_t GetHandle() const = 0;
+
+ // Returns the surface size.
+ virtual gfx::Size Size() const = 0;
+};
+
+class ScanoutSurfaceGenerator {
+ public:
+ virtual ~ScanoutSurfaceGenerator() {}
+
+ virtual ScanoutSurface* Create(const gfx::Size& size) = 0;
+};
+
+} // namespace ui
+
+#endif // UI_OZONE_PLATFORM_DRI_SCANOUT_SURFACE_H_

Powered by Google App Engine
This is Rietveld 408576698