| 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 #include "ui/ozone/platform/dri/dri_wrapper.h" | 10 #include "ui/ozone/platform/dri/dri_wrapper.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 kColorDepth, | 72 kColorDepth, |
| 73 kPixelDepth, | 73 kPixelDepth, |
| 74 gbm_bo_get_stride(bo_), | 74 gbm_bo_get_stride(bo_), |
| 75 handle_, | 75 handle_, |
| 76 &framebuffer_)) { | 76 &framebuffer_)) { |
| 77 return false; | 77 return false; |
| 78 } | 78 } |
| 79 return true; | 79 return true; |
| 80 } | 80 } |
| 81 | 81 |
| 82 void* GbmBuffer::GetEGLClientBuffer() { | 82 bool GbmBuffer::Initialize() { |
| 83 return bo_; | 83 return bo_ != NULL; |
| 84 } | 84 } |
| 85 | 85 |
| 86 int GbmBuffer::GetDmaBufFd() { | 86 uint32_t GbmBuffer::GetFramebufferId() const { |
| 87 return framebuffer_; |
| 88 } |
| 89 |
| 90 uint32_t GbmBuffer::GetHandle() const { |
| 91 return handle_; |
| 92 } |
| 93 |
| 94 gfx::Size GbmBuffer::Size() const { |
| 95 return size_; |
| 96 } |
| 97 |
| 98 void GbmBuffer::PreSwapBuffers() { |
| 99 } |
| 100 |
| 101 void GbmBuffer::SwapBuffers() { |
| 102 } |
| 103 |
| 104 |
| 105 GbmPixmap::GbmPixmap(gbm_device* device, DriWrapper* dri, const gfx::Size& size) |
| 106 : buffer_(device, dri, size) { |
| 107 } |
| 108 |
| 109 GbmPixmap::~GbmPixmap() { |
| 110 } |
| 111 |
| 112 void* GbmPixmap::GetEGLClientBuffer() { |
| 113 return buffer_.bo(); |
| 114 } |
| 115 |
| 116 int GbmPixmap::GetDmaBufFd() { |
| 87 return -1; | 117 return -1; |
| 88 } | 118 } |
| 89 | 119 |
| 90 } // namespace ui | 120 } // namespace ui |
| OLD | NEW |