OLD | NEW |
---|---|
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 Loading... | |
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 |
OLD | NEW |