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

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

Issue 132543002: Not for review. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 10 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/dri/hardware_display_controller_unittest.cc ('k') | ui/gfx/ozone/overlay_hal_ozone.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « ui/gfx/ozone/dri/hardware_display_controller_unittest.cc ('k') | ui/gfx/ozone/overlay_hal_ozone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698