| Index: ui/ozone/platform/drm/gpu/gbm_buffer.cc
|
| diff --git a/ui/ozone/platform/drm/gpu/gbm_buffer.cc b/ui/ozone/platform/drm/gpu/gbm_buffer.cc
|
| index dff2d96b234c136d4bca99760c71942f79a5c67c..85b22c28596cac177570a33764b2477b185f1c2e 100644
|
| --- a/ui/ozone/platform/drm/gpu/gbm_buffer.cc
|
| +++ b/ui/ozone/platform/drm/gpu/gbm_buffer.cc
|
| @@ -83,11 +83,6 @@ size_t GbmBuffer::GetSize(size_t index) const {
|
| return planes_[index].size;
|
| }
|
|
|
| -uint64_t GbmBuffer::GetFormatModifier(size_t index) const {
|
| - DCHECK_LT(index, planes_.size());
|
| - return planes_[index].modifier;
|
| -}
|
| -
|
| // TODO(reveman): This should not be needed once crbug.com/597932 is fixed,
|
| // as the size would be queried directly from the underlying bo.
|
| gfx::Size GbmBuffer::GetSize() const {
|
| @@ -168,7 +163,8 @@ scoped_refptr<GbmBuffer> GbmBuffer::CreateBuffer(
|
| gbm_bo* bo =
|
| gbm_bo_create(gbm->device(), size.width(), size.height(), format, flags);
|
|
|
| - return CreateBufferForBO(gbm, bo, format, size, flags, 0, 0);
|
| + return CreateBufferForBO(gbm, bo, format, size, flags,
|
| + gbm_bo_get_format_modifier(bo), 0);
|
| }
|
|
|
| // static
|
| @@ -250,7 +246,7 @@ gfx::NativePixmapHandle GbmPixmap::ExportHandle() {
|
| }
|
| handle.planes.emplace_back(buffer_->GetStride(i), buffer_->GetOffset(i),
|
| buffer_->GetSize(i),
|
| - buffer_->GetFormatModifier(i));
|
| + buffer_->GetFormatModifier());
|
| }
|
| return handle;
|
| }
|
| @@ -283,7 +279,7 @@ int GbmPixmap::GetDmaBufOffset(size_t plane) const {
|
| }
|
|
|
| uint64_t GbmPixmap::GetDmaBufModifier(size_t plane) const {
|
| - return buffer_->GetFormatModifier(plane);
|
| + return buffer_->GetFormatModifier();
|
| }
|
|
|
| gfx::BufferFormat GbmPixmap::GetBufferFormat() const {
|
|
|