Index: ui/ozone/platform/dri/gbm_buffer.cc |
diff --git a/ui/ozone/platform/dri/gbm_buffer.cc b/ui/ozone/platform/dri/gbm_buffer.cc |
index 8eaccbf0edb5bf0cc8e732ec0678281464ae4b5f..d9a9085fd54e77e83c70221429540253d1f2eb78 100644 |
--- a/ui/ozone/platform/dri/gbm_buffer.cc |
+++ b/ui/ozone/platform/dri/gbm_buffer.cc |
@@ -69,10 +69,8 @@ GbmPixmap::GbmPixmap(scoped_refptr<GbmBuffer> buffer) |
} |
bool GbmPixmap::Initialize(DriWrapper* dri) { |
- if (drmPrimeHandleToFD(dri->get_fd(), |
- buffer_->GetHandle(), |
- DRM_CLOEXEC, |
- &dma_buf_)) { |
+ dma_buf_ = gbm_bo_get_fd(buffer_->bo()); |
+ if (dma_buf_ < 0) { |
LOG(ERROR) << "Failed to export buffer to dma_buf"; |
return false; |
} |
@@ -86,7 +84,7 @@ GbmPixmap::~GbmPixmap() { |
} |
void* GbmPixmap::GetEGLClientBuffer() { |
- return NULL; |
+ return buffer_->bo(); |
} |
int GbmPixmap::GetDmaBufFd() { |