Commit 07cf0298 authored by siva.gunturi's avatar siva.gunturi Committed by Commit bot

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}
parent 33900453
...@@ -574,6 +574,9 @@ void DelegatedFrameHost::PrepareTextureCopyOutputResult( ...@@ -574,6 +574,9 @@ void DelegatedFrameHost::PrepareTextureCopyOutputResult(
base::ScopedClosureRunner scoped_callback_runner( base::ScopedClosureRunner scoped_callback_runner(
base::Bind(callback, false, SkBitmap())); 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<SkBitmap> bitmap(new SkBitmap); scoped_ptr<SkBitmap> bitmap(new SkBitmap);
if (!bitmap->tryAllocPixels(SkImageInfo::Make(dst_size_in_pixel.width(), if (!bitmap->tryAllocPixels(SkImageInfo::Make(dst_size_in_pixel.width(),
dst_size_in_pixel.height(), dst_size_in_pixel.height(),
......
...@@ -25,6 +25,8 @@ void GLHelperReadbackSupport::InitializeReadbackSupport() { ...@@ -25,6 +25,8 @@ void GLHelperReadbackSupport::InitializeReadbackSupport() {
for (int i = 0; i <= kLastEnum_SkColorType; ++i) { for (int i = 0; i <= kLastEnum_SkColorType; ++i) {
format_support_table_[i] = GLHelperReadbackSupport::NOT_SUPPORTED; 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(kRGB_565_SkColorType);
CheckForReadbackSupport(kARGB_4444_SkColorType); CheckForReadbackSupport(kARGB_4444_SkColorType);
CheckForReadbackSupport(kRGBA_8888_SkColorType); CheckForReadbackSupport(kRGBA_8888_SkColorType);
......
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