Index: ui/gfx/ozone/dri/scanout_surface.h |
diff --git a/ui/gfx/ozone/dri/scanout_surface.h b/ui/gfx/ozone/dri/scanout_surface.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b4795f4f52ebdcc394c582080667e84ff4dfbddb |
--- /dev/null |
+++ b/ui/gfx/ozone/dri/scanout_surface.h |
@@ -0,0 +1,40 @@ |
+// Copyright 2013 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_DRI_SCANOUT_SURFACE_H_ |
+#define UI_GFX_OZONE_DRI_SCANOUT_SURFACE_H_ |
+ |
+#include <stdint.h> |
+ |
+#include "base/basictypes.h" |
+ |
+namespace gfx { |
+ |
+// Interface for a surface that can be scanned out to a monitor. It will store |
+// the internal state associated with the drawing surface associated with it. |
+// ScanoutSurface also performs all the needed operations to initialize and |
+// update the drawing surface. |
+class ScanoutSurface { |
+ public: |
+ ScanoutSurface() {} |
+ virtual ~ScanoutSurface() {} |
+ |
+ // Used to initialize the surface object. This involves creating the |
+ // underlying buffers and initializing them. |
+ // Returns true if successful, false otherwise. |
+ virtual bool Initialize() = 0; |
+ |
+ // Returns the ID of the current backbuffer. |
+ virtual uint32_t GetFramebufferId() const = 0; |
+ |
+ // Update the front buffer pointer and release the old front buffer. |
+ virtual void SwapBuffers() = 0; |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(ScanoutSurface); |
+}; |
+ |
+} // namespace gfx |
+ |
+#endif // UI_GFX_OZONE_DRI_SCANOUT_SURFACE_H_ |