Commit eb0d6e13 authored by Hirokazu Honda's avatar Hirokazu Honda Committed by Commit Bot

Use ARGB8888 for a dummy buffer for protected content playbkack on ARC++

We have specified R8 format for a dummy buffer for protected content playback
on ARC++.
R8 format is not supported on exynos device. It leads crash on the devices.
ARGB8888 should be used instead, which is widely supported on all Chrome OS
device.

BUG=chromium:787660, chromium:887658
TEST=No crash on peach_pit and Protected content playback on veyron_minnie and eve

Change-Id: Ia550277ad30a0e0fd814106a1610b59a1a86bb03
Reviewed-on: https://chromium-review.googlesource.com/1242564
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: default avatarPawel Osciak <posciak@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593842}
parent 2ed5aec8
...@@ -23,7 +23,7 @@ namespace arc { ...@@ -23,7 +23,7 @@ namespace arc {
namespace { namespace {
// Size of the pixmap to be used as the dummy handle for protected buffers. // Size of the pixmap to be used as the dummy handle for protected buffers.
constexpr gfx::Size kDummyBufferSize(32, 32); constexpr gfx::Size kDummyBufferSize(16, 16);
// Maximum number of concurrent ProtectedBufferAllocatorImpl instances. // Maximum number of concurrent ProtectedBufferAllocatorImpl instances.
// Currently we have no way to know the resources of ProtectedBufferAllocator. // Currently we have no way to know the resources of ProtectedBufferAllocator.
...@@ -463,8 +463,8 @@ scoped_refptr<gfx::NativePixmap> ProtectedBufferManager::ImportDummyFd( ...@@ -463,8 +463,8 @@ scoped_refptr<gfx::NativePixmap> ProtectedBufferManager::ImportDummyFd(
ui::SurfaceFactoryOzone* factory = platform->GetSurfaceFactoryOzone(); ui::SurfaceFactoryOzone* factory = platform->GetSurfaceFactoryOzone();
scoped_refptr<gfx::NativePixmap> pixmap = scoped_refptr<gfx::NativePixmap> pixmap =
factory->CreateNativePixmapForProtectedBufferHandle( factory->CreateNativePixmapForProtectedBufferHandle(
gfx::kNullAcceleratedWidget, kDummyBufferSize, gfx::BufferFormat::R_8, gfx::kNullAcceleratedWidget, kDummyBufferSize,
pixmap_handle); gfx::BufferFormat::RGBA_8888, pixmap_handle);
if (!pixmap) { if (!pixmap) {
VLOGF(1) << "Failed importing dummy handle"; VLOGF(1) << "Failed importing dummy handle";
return nullptr; return nullptr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment