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

Unified Diff: ui/gfx/ozone/impl/software_surface_factory_ozone.h

Issue 26849004: [Ozone] Adding a software rendering implementation of SurfaceFactoryOzone (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated SSO unittest Created 7 years, 2 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/gfx/ozone/impl/software_surface_factory_ozone.h
diff --git a/ui/gfx/ozone/impl/software_surface_factory_ozone.h b/ui/gfx/ozone/impl/software_surface_factory_ozone.h
new file mode 100644
index 0000000000000000000000000000000000000000..51e8b13e568e0876ad1eb14f2bca09bf771b7e3f
--- /dev/null
+++ b/ui/gfx/ozone/impl/software_surface_factory_ozone.h
@@ -0,0 +1,72 @@
+// Copyright (c) 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_IMPL_SOFTWARE_SURFACE_FACTORY_OZONE_H_
+#define UI_GFX_OZONE_IMPL_SOFTWARE_SURFACE_FACTORY_OZONE_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "ui/gfx/ozone/surface_factory_ozone.h"
+
+namespace gfx {
+
+class DrmWrapperOzone;
+class HardwareDisplayControllerOzone;
+class SoftwareSurfaceOzone;
+
+// SurfaceFactoryOzone implementation on top of DRM/KMS using dumb buffers.
+// This implementation is used in conjunction with the software rendering
+// path.
+class SoftwareSurfaceFactoryOzone : public SurfaceFactoryOzone {
+ public:
+ SoftwareSurfaceFactoryOzone();
+ virtual ~SoftwareSurfaceFactoryOzone();
+
+ virtual HardwareState InitializeHardware() OVERRIDE;
+ virtual void ShutdownHardware() OVERRIDE;
+
+ virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
+ virtual gfx::AcceleratedWidget RealizeAcceleratedWidget(
+ gfx::AcceleratedWidget w) OVERRIDE;
+
+ virtual bool LoadEGLGLES2Bindings() OVERRIDE;
+
+ virtual bool AttemptToResizeAcceleratedWidget(
+ gfx::AcceleratedWidget w,
+ const gfx::Rect& bounds) OVERRIDE;
+
+ virtual bool SchedulePageFlip(gfx::AcceleratedWidget w) OVERRIDE;
+
+ virtual gfx::VSyncProvider* GetVSyncProvider(
+ gfx::AcceleratedWidget w) OVERRIDE;
+
+ private:
+ virtual SoftwareSurfaceOzone* CreateSurface(
+ HardwareDisplayControllerOzone* controller);
+
+ virtual DrmWrapperOzone* CreateWrapper();
+
+ virtual bool InitializeControllerForPrimaryDisplay(
+ DrmWrapperOzone* drm,
+ HardwareDisplayControllerOzone* controller);
+
+ // Blocks until a DRM event is read.
+ // TODO(dnicoara) Remove once we can safely move DRM event processing in the
+ // message loop while correctly signaling when we're done displaying the
+ // pending frame.
+ virtual void WaitForPageFlipEvent(int fd);
+
+ scoped_ptr<DrmWrapperOzone> drm_;
+
+ HardwareState state_;
+
+ // Active output.
+ scoped_ptr<HardwareDisplayControllerOzone> controller_;
+
+
+ DISALLOW_COPY_AND_ASSIGN(SoftwareSurfaceFactoryOzone);
+};
+
+} // namespace gfx
+
+#endif // UI_GFX_OZONE_IMPL_SOFTWARE_SURFACE_FACTORY_OZONE_H_
« no previous file with comments | « ui/gfx/ozone/impl/hardware_display_controller_ozone_unittest.cc ('k') | ui/gfx/ozone/impl/software_surface_factory_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698