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

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

Issue 403043004: [Ozone-DRI] Remove unneeded wrappers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 5 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/ozone/platform/dri/gbm_surface_factory.cc ('k') | ui/ozone/platform/dri/gbm_surfaceless.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/dri/gbm_surfaceless.h
diff --git a/ui/ozone/platform/dri/gbm_surfaceless.h b/ui/ozone/platform/dri/gbm_surfaceless.h
new file mode 100644
index 0000000000000000000000000000000000000000..df7afe2e7f19a361edf207b496d471db32ee4f2d
--- /dev/null
+++ b/ui/ozone/platform/dri/gbm_surfaceless.h
@@ -0,0 +1,48 @@
+// 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_GBM_SURFACELESS_H_
+#define UI_OZONE_PLATFORM_DRI_GBM_SURFACELESS_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "ui/ozone/platform/dri/hardware_display_controller.h"
+#include "ui/ozone/public/surface_ozone_egl.h"
+
+namespace gfx {
+class Size;
+class Rect;
+} // namespace gfx
+
+namespace ui {
+
+// In surfaceless mode drawing and displaying happens directly through
+// NativePixmap buffers. CC would call into SurfaceFactoryOzone to allocate the
+// buffers and then call ScheduleOverlayPlane(..) to schedule the buffer for
+// presentation.
+class GbmSurfaceless : public SurfaceOzoneEGL {
+ public:
+ GbmSurfaceless(const base::WeakPtr<HardwareDisplayController>& controller);
+ virtual ~GbmSurfaceless();
+
+ // SurfaceOzoneEGL:
+ virtual intptr_t GetNativeWindow() OVERRIDE;
+ virtual bool ResizeNativeWindow(const gfx::Size& viewport_size) OVERRIDE;
+ virtual bool OnSwapBuffers() OVERRIDE;
+ virtual scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() OVERRIDE;
+ virtual bool ScheduleOverlayPlane(int plane_z_order,
+ gfx::OverlayTransform plane_transform,
+ scoped_refptr<ui::NativePixmap> buffer,
+ const gfx::Rect& display_bounds,
+ const gfx::RectF& crop_rect) OVERRIDE;
+
+ protected:
+ base::WeakPtr<HardwareDisplayController> controller_;
+ OverlayPlaneList queued_planes_;
+
+ DISALLOW_COPY_AND_ASSIGN(GbmSurfaceless);
+};
+
+} // namespace ui
+
+#endif // UI_OZONE_PLATFORM_DRI_GBM_SURFACELESS_H_
« no previous file with comments | « ui/ozone/platform/dri/gbm_surface_factory.cc ('k') | ui/ozone/platform/dri/gbm_surfaceless.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698