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

Unified Diff: ui/ozone/platform/drm/gpu/drm_device.cc

Issue 1080923006: ozone: drm: Fix graphics buffer handle leak in DrmConsoleBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: switch to DRM_IOCTL_GEM_CLOSE per marcheu@ Created 5 years, 8 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/gpu/drm_device.h ('k') | ui/ozone/platform/drm/test/mock_drm_device.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/gpu/drm_device.cc
diff --git a/ui/ozone/platform/drm/gpu/drm_device.cc b/ui/ozone/platform/drm/gpu/drm_device.cc
index 4d2bcbfe9894496e5c73d91c8282691f8d15d898..b547b080874550287f0c9fd3090a19e38b05ba7d 100644
--- a/ui/ozone/platform/drm/gpu/drm_device.cc
+++ b/ui/ozone/platform/drm/gpu/drm_device.cc
@@ -478,6 +478,14 @@ void DrmDevice::DestroyDumbBuffer(const SkImageInfo& info,
DrmDestroyDumbBuffer(file_.GetPlatformFile(), handle);
}
+bool DrmDevice::CloseBufferHandle(uint32_t handle) {
+ struct drm_gem_close close_request;
+ memset(&close_request, 0, sizeof(close_request));
+ close_request.handle = handle;
+ return !drmIoctl(file_.GetPlatformFile(), DRM_IOCTL_GEM_CLOSE,
+ &close_request);
+}
+
bool DrmDevice::CommitProperties(drmModePropertySet* properties,
uint32_t flags,
const PageFlipCallback& callback) {
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_device.h ('k') | ui/ozone/platform/drm/test/mock_drm_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698