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

Unified Diff: ui/ozone/platform/drm/common/scoped_drm_types.cc

Issue 1285183008: Ozone integration. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: add missing license header Created 5 years, 4 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/drm/common/scoped_drm_types.h ('k') | ui/ozone/platform/drm/gpu/crtc_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/common/scoped_drm_types.cc
diff --git a/ui/ozone/platform/drm/common/scoped_drm_types.cc b/ui/ozone/platform/drm/common/scoped_drm_types.cc
new file mode 100644
index 0000000000000000000000000000000000000000..9a1456ea6533b0117e12ff05340aa24d8650502d
--- /dev/null
+++ b/ui/ozone/platform/drm/common/scoped_drm_types.cc
@@ -0,0 +1,59 @@
+// 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.
+
+#include "ui/ozone/platform/drm/common/scoped_drm_types.h"
+
+#include <xf86drmMode.h>
+
+namespace ui {
+
+void DrmResourcesDeleter::operator()(drmModeRes* resources) const {
+ drmModeFreeResources(resources);
+}
+
+void DrmConnectorDeleter::operator()(drmModeConnector* connector) const {
+ drmModeFreeConnector(connector);
+}
+
+void DrmCrtcDeleter::operator()(drmModeCrtc* crtc) const {
+ drmModeFreeCrtc(crtc);
+}
+
+void DrmEncoderDeleter::operator()(drmModeEncoder* encoder) const {
+ drmModeFreeEncoder(encoder);
+}
+
+void DrmObjectPropertiesDeleter::operator()(
+ drmModeObjectProperties* properties) const {
+ drmModeFreeObjectProperties(properties);
+}
+
+void DrmPlaneDeleter::operator()(drmModePlane* plane) const {
+ drmModeFreePlane(plane);
+}
+
+void DrmPlaneResDeleter::operator()(drmModePlaneRes* plane) const {
+ drmModeFreePlaneResources(plane);
+}
+
+void DrmPropertyDeleter::operator()(drmModePropertyRes* property) const {
+ drmModeFreeProperty(property);
+}
+
+#if defined(USE_DRM_ATOMIC)
+void DrmPropertySetDeleter::operator()(drmModePropertySet* property) const {
+ drmModePropertySetFree(property);
+}
+#endif // defined(USE_DRM_ATOMIC)
+
+void DrmPropertyBlobDeleter::operator()(
+ drmModePropertyBlobRes* property) const {
+ drmModeFreePropertyBlob(property);
+}
+
+void DrmFramebufferDeleter::operator()(drmModeFB* framebuffer) const {
+ drmModeFreeFB(framebuffer);
+}
+
+} // namespace ui
« no previous file with comments | « ui/ozone/platform/drm/common/scoped_drm_types.h ('k') | ui/ozone/platform/drm/gpu/crtc_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698