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

Unified Diff: ui/ozone/platform/dri/dri_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/dri_surface.h
diff --git a/ui/ozone/platform/dri/dri_surface.h b/ui/ozone/platform/dri/dri_surface.h
index 2fde4d40fb6129fb03d0bc69bf7cf28a897f99b0..59138c4d5d7129c1fcff487fe55c8d4256f8cc4b 100644
--- a/ui/ozone/platform/dri/dri_surface.h
+++ b/ui/ozone/platform/dri/dri_surface.h
@@ -10,6 +10,7 @@
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/skia_util.h"
#include "ui/ozone/ozone_export.h"
+#include "ui/ozone/platform/dri/scanout_surface.h"
class SkCanvas;
@@ -117,30 +118,20 @@ class DriWrapper;
// to the backbuffer.
//
// At this point we're back to step 1 and can start a new draw iteration.
-class OZONE_EXPORT DriSurface {
+class OZONE_EXPORT DriSurface : public ScanoutSurface {
public:
DriSurface(DriWrapper* dri, const gfx::Size& size);
virtual ~DriSurface();
- // 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.
- bool Initialize();
-
- // Returns the ID of the current backbuffer.
- uint32_t GetFramebufferId() const;
-
- // Returns the handle for the current backbuffer.
- uint32_t GetHandle() const;
-
- // Synchronizes and swaps the back buffer with the front buffer.
- void SwapBuffers();
-
// Get a Skia canvas for a backbuffer.
SkCanvas* GetDrawableForWidget();
- const gfx::Size& size() const { return size_; }
+ // ScanoutSurface:
+ virtual bool Initialize() OVERRIDE;
+ virtual uint32_t GetFramebufferId() const OVERRIDE;
+ virtual uint32_t GetHandle() const OVERRIDE;
+ virtual void SwapBuffers() OVERRIDE;
+ virtual gfx::Size Size() const OVERRIDE;
private:
DriBuffer* frontbuffer() const { return bitmaps_[front_buffer_].get(); }

Powered by Google App Engine
This is Rietveld 408576698