From 07cf029821008ce25812489bd6121f82bec90e92 Mon Sep 17 00:00:00 2001 From: "siva.gunturi" Date: Thu, 18 Sep 2014 20:53:05 -0700 Subject: [PATCH] We now have the GLHelperReadBackSupport, this should tell us if some format is supported or not.IsReadbackConfigSupported takes care of validating this. BUG=376769, 415131 Review URL: https://codereview.chromium.org/570003002 Cr-Commit-Position: refs/heads/master@{#295656} --- content/browser/compositor/delegated_frame_host.cc | 3 +++ content/common/gpu/client/gl_helper_readback_support.cc | 2 ++ 2 files changed, 5 insertions(+) diff --git a/content/browser/compositor/delegated_frame_host.cc b/content/browser/compositor/delegated_frame_host.cc index 0ab1980efc54..28d586b3d694 100644 --- a/content/browser/compositor/delegated_frame_host.cc +++ b/content/browser/compositor/delegated_frame_host.cc @@ -574,6 +574,9 @@ void DelegatedFrameHost::PrepareTextureCopyOutputResult( base::ScopedClosureRunner scoped_callback_runner( base::Bind(callback, false, SkBitmap())); + // TODO(sikugu): We should be able to validate the format here using + // GLHelper::IsReadbackConfigSupported before we processs the result. + // See crbug.com/415682. scoped_ptr bitmap(new SkBitmap); if (!bitmap->tryAllocPixels(SkImageInfo::Make(dst_size_in_pixel.width(), dst_size_in_pixel.height(), diff --git a/content/common/gpu/client/gl_helper_readback_support.cc b/content/common/gpu/client/gl_helper_readback_support.cc index 4412c9546dec..9c1a4ce8ca22 100644 --- a/content/common/gpu/client/gl_helper_readback_support.cc +++ b/content/common/gpu/client/gl_helper_readback_support.cc @@ -25,6 +25,8 @@ void GLHelperReadbackSupport::InitializeReadbackSupport() { for (int i = 0; i <= kLastEnum_SkColorType; ++i) { format_support_table_[i] = GLHelperReadbackSupport::NOT_SUPPORTED; } + // TODO(sikugu): kAlpha_8_SkColorType support check is failing on mesa. + // See crbug.com/415667. CheckForReadbackSupport(kRGB_565_SkColorType); CheckForReadbackSupport(kARGB_4444_SkColorType); CheckForReadbackSupport(kRGBA_8888_SkColorType); -- 2.11.4.GIT