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

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

Issue 1132803004: ozone: drm: Fix graphics buffer handle leak in DrmConsoleBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2357
Patch Set: Created 5 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
« 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 fb5bbc8d4d080a2fcd397d1b3dc54801c853d3be..51ad51e8095a3f6902150d4b1154ac1bb35b6924 100644
--- a/ui/ozone/platform/drm/gpu/drm_device.cc
+++ b/ui/ozone/platform/drm/gpu/drm_device.cc
@@ -476,6 +476,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