Chromium Code Reviews| Index: ui/ozone/platform/drm/gpu/gbm_buffer_base.cc |
| diff --git a/ui/ozone/platform/drm/gpu/gbm_buffer_base.cc b/ui/ozone/platform/drm/gpu/gbm_buffer_base.cc |
| index 5f27c51e7e9f04c1625622f7384e6f4765448932..4da64389d10836c5452b61591986c3f0b7fcd554 100644 |
| --- a/ui/ozone/platform/drm/gpu/gbm_buffer_base.cc |
| +++ b/ui/ozone/platform/drm/gpu/gbm_buffer_base.cc |
| @@ -15,15 +15,8 @@ GbmBufferBase::GbmBufferBase(const scoped_refptr<DrmDevice>& drm, |
| gbm_bo* bo, |
| bool scanout) |
| : drm_(drm), bo_(bo) { |
| + fb_pixel_format_ = gbm_bo_get_format(bo); |
|
dshwang
2015/11/27 17:59:54
fb_pixel_format_ is used in GetBufferFormat() even
reveman
2015/11/27 20:09:33
can you move this into the initialization list?
kalyank
2015/11/27 21:15:20
Here storage format can be different to pixel form
|
| if (scanout) { |
| - fb_pixel_format_ = gbm_bo_get_format(bo); |
| - if (fb_pixel_format_ == GBM_FORMAT_ARGB8888) |
| - fb_pixel_format_ = GBM_FORMAT_XRGB8888; |
|
dshwang
2015/11/27 17:59:54
This hack was introduced by https://codereview.chr
|
| - |
| - // For now, we only support XRGB and UYVY format. |
| - DCHECK(fb_pixel_format_ == GBM_FORMAT_XRGB8888 || |
| - fb_pixel_format_ == GBM_FORMAT_UYVY); |
| - |
| uint32_t handles[4] = {0}; |
| handles[0] = gbm_bo_get_handle(bo).u32; |
| uint32_t strides[4] = {0}; |