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

Side by Side Diff: ui/ozone/platform/dri/gbm_buffer.cc

Issue 795053006: ozone: Revert to using EGLClientBuffer to fix dma_buf issues (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/ozone/platform/dri/gbm_buffer.h" 5 #include "ui/ozone/platform/dri/gbm_buffer.h"
6 6
7 #include <drm.h> 7 #include <drm.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <gbm.h> 9 #include <gbm.h>
10 #include <xf86drm.h> 10 #include <xf86drm.h>
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 return true; 78 return true;
79 } 79 }
80 80
81 GbmPixmap::~GbmPixmap() { 81 GbmPixmap::~GbmPixmap() {
82 if (dma_buf_ > 0) 82 if (dma_buf_ > 0)
83 close(dma_buf_); 83 close(dma_buf_);
84 } 84 }
85 85
86 void* GbmPixmap::GetEGLClientBuffer() { 86 void* GbmPixmap::GetEGLClientBuffer() {
87 return NULL; 87 return buffer_->bo();
dnicoara 2014/12/11 20:08:32 nit: Please add a TODO to remove this when the bug
88 } 88 }
89 89
90 int GbmPixmap::GetDmaBufFd() { 90 int GbmPixmap::GetDmaBufFd() {
91 return dma_buf_; 91 return dma_buf_;
92 } 92 }
93 93
94 int GbmPixmap::GetDmaBufPitch() { 94 int GbmPixmap::GetDmaBufPitch() {
95 return gbm_bo_get_stride(buffer_->bo()); 95 return gbm_bo_get_stride(buffer_->bo());
96 } 96 }
97 97
98 } // namespace ui 98 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698