Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Unified Diff: content/browser/compositor/delegated_frame_host.cc

Issue 570003002: [Aura] Use GLHelper support to validate format before processing texture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding TODO Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/common/gpu/client/gl_helper_readback_support.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/compositor/delegated_frame_host.cc
diff --git a/content/browser/compositor/delegated_frame_host.cc b/content/browser/compositor/delegated_frame_host.cc
index 29344440ae716f15bf8100e0625c335acdac403d..e944f8491bfd4cea32a910d55dc5bf6518c9d7ee 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<SkBitmap> bitmap(new SkBitmap);
if (!bitmap->tryAllocPixels(SkImageInfo::Make(dst_size_in_pixel.width(),
dst_size_in_pixel.height(),
« no previous file with comments | « no previous file | content/common/gpu/client/gl_helper_readback_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698