Index: ui/ozone/gl/gl_image_ozone_native_pixmap_drm_unittest.cc |
diff --git a/ui/ozone/gl/gl_image_ozone_native_pixmap_drm_unittest.cc b/ui/ozone/gl/gl_image_ozone_native_pixmap_drm_unittest.cc |
index cc2f1527c052182c275c1fa0581bd9629fe68222..8ab537f109275758f9e843667dae71eaf79162f3 100644 |
--- a/ui/ozone/gl/gl_image_ozone_native_pixmap_drm_unittest.cc |
+++ b/ui/ozone/gl/gl_image_ozone_native_pixmap_drm_unittest.cc |
@@ -50,6 +50,10 @@ scoped_refptr<ui::NativePixmap> CreateYVU420Pixmap(const gfx::Size& size, |
0, pitches[0] * size.height() + pitches[1] * size.height() / 2, |
pitches[0] * size.height(), |
}; |
+ std::vector<size_t> sizes{pitches[0] * size.height(), |
+ pitches[1] * size.height() / 2, |
+ pitches[2] * size.height() / 2}; |
+ |
size_t byte_number = pitches[0] * size.height() + |
pitches[1] * size.height() / 2 + |
pitches[2] * size.height() / 2; |
@@ -89,7 +93,7 @@ scoped_refptr<ui::NativePixmap> CreateYVU420Pixmap(const gfx::Size& size, |
gfx::NativePixmapHandle pixmap_handle; |
pixmap_handle.fds.emplace_back(fd, false); |
for (int i = 0; i < 3; i++) { |
- pixmap_handle.planes.emplace_back(pitches[i], offsets[i], 0); |
+ pixmap_handle.planes.emplace_back(pitches[i], offsets[i], sizes[i], 0); |
} |
ui::SurfaceFactoryOzone* surface_factory = |
ui::OzonePlatform::GetInstance()->GetSurfaceFactoryOzone(); |