| 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/drm/gpu/gbm_buffer_base.h" | 5 #include "ui/ozone/platform/drm/gpu/gbm_buffer_base.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/drm/common/drm_util.h" | 10 #include "ui/ozone/platform/drm/common/drm_util.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 gfx::Size GbmBufferBase::GetSize() const { | 51 gfx::Size GbmBufferBase::GetSize() const { |
| 52 return gfx::Size(gbm_bo_get_width(bo_), gbm_bo_get_height(bo_)); | 52 return gfx::Size(gbm_bo_get_width(bo_), gbm_bo_get_height(bo_)); |
| 53 } | 53 } |
| 54 | 54 |
| 55 uint32_t GbmBufferBase::GetFramebufferPixelFormat() const { | 55 uint32_t GbmBufferBase::GetFramebufferPixelFormat() const { |
| 56 DCHECK(framebuffer_); | 56 DCHECK(framebuffer_); |
| 57 return framebuffer_pixel_format_; | 57 return framebuffer_pixel_format_; |
| 58 } | 58 } |
| 59 | 59 |
| 60 const DrmDevice* GbmBufferBase::GetDrmDevice() const { |
| 61 return drm_.get(); |
| 62 } |
| 63 |
| 60 bool GbmBufferBase::RequiresGlFinish() const { | 64 bool GbmBufferBase::RequiresGlFinish() const { |
| 61 return !drm_->is_primary_device(); | 65 return !drm_->is_primary_device(); |
| 62 } | 66 } |
| 63 | 67 |
| 64 } // namespace ui | 68 } // namespace ui |
| OLD | NEW |