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 <gbm.h> | 7 #include <gbm.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 | 10 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
64 } | 64 } |
65 | 65 |
66 GbmPixmap::~GbmPixmap() { | 66 GbmPixmap::~GbmPixmap() { |
67 } | 67 } |
68 | 68 |
69 void* GbmPixmap::GetEGLClientBuffer() { | 69 void* GbmPixmap::GetEGLClientBuffer() { |
70 return buffer_->bo(); | 70 return buffer_->bo(); |
71 } | 71 } |
72 | 72 |
73 int GbmPixmap::GetDmaBufFd() { | 73 int GbmPixmap::GetDmaBufFd() { |
74 NOTIMPLEMENTED(); | 74 return gbm_bo_get_fd(buffer_->bo()); |
Pawel Osciak
2014/10/08 08:17:23
I think we should be closing the fd somewhere once
llandwerlin-old
2014/10/08 09:31:18
When we give the fd to LibVA, it is wrapped using
Pawel Osciak
2014/10/26 13:06:46
This ends up in DRM_IOCTL_PRIME_FD_TO_HANDLE and t
llandwerlin-old
2014/10/29 13:52:47
Right, thanks, we effectively leaking the fd here.
kalyank
2014/11/01 18:33:47
Now, this should be handled with the latest rebase
| |
75 return -1; | 75 } |
76 | |
77 uint32_t GbmPixmap::GetStride() { | |
78 return gbm_bo_get_stride(buffer_->bo()); | |
76 } | 79 } |
77 | 80 |
78 } // namespace ui | 81 } // namespace ui |
OLD | NEW |