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

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

Issue 819363003: [Ozone-DRI] Use dma_buf rather than EGLClientBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 } 79 }
80 return true; 80 return true;
81 } 81 }
82 82
83 GbmPixmap::~GbmPixmap() { 83 GbmPixmap::~GbmPixmap() {
84 if (dma_buf_ > 0) 84 if (dma_buf_ > 0)
85 close(dma_buf_); 85 close(dma_buf_);
86 } 86 }
87 87
88 void* GbmPixmap::GetEGLClientBuffer() { 88 void* GbmPixmap::GetEGLClientBuffer() {
89 // TODO(achaulk): change back to null when dma_buf bug is fixed. 89 return nullptr;
90 return buffer_->bo();
91 } 90 }
92 91
93 int GbmPixmap::GetDmaBufFd() { 92 int GbmPixmap::GetDmaBufFd() {
94 return dma_buf_; 93 return dma_buf_;
95 } 94 }
96 95
97 int GbmPixmap::GetDmaBufPitch() { 96 int GbmPixmap::GetDmaBufPitch() {
98 return gbm_bo_get_stride(buffer_->bo()); 97 return gbm_bo_get_stride(buffer_->bo());
99 } 98 }
100 99
101 } // namespace ui 100 } // 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