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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 133363004: content_gl_tests should skip RGB565 test if the prior detection of format support fails. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Initialize variables before operating getintegerv Created 6 years, 11 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
Index: content/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 27f54ec9b38bbcafe242dc741fcf987d8cc6e5b3..174b1e7a2a013f6662ecfd7927bbfc960868a8a6 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -1058,7 +1058,8 @@ BackingStore* RenderWidgetHostViewAura::AllocBackingStore(
void RenderWidgetHostViewAura::CopyFromCompositingSurface(
const gfx::Rect& src_subrect,
const gfx::Size& dst_size,
- const base::Callback<void(bool, const SkBitmap&)>& callback) {
+ const base::Callback<void(bool, const SkBitmap&)>& callback,
+ bool readback_config_rgb565) {
if (!CanCopyToBitmap()) {
callback.Run(false, SkBitmap());
return;
@@ -1069,6 +1070,7 @@ void RenderWidgetHostViewAura::CopyFromCompositingSurface(
cc::CopyOutputRequest::CreateRequest(base::Bind(
&RenderWidgetHostViewAura::CopyFromCompositingSurfaceHasResult,
dst_size_in_pixel,
+ readback_config_rgb565,
callback));
gfx::Rect src_subrect_in_pixel =
ConvertRectToPixel(current_device_scale_factor_, src_subrect);
@@ -1803,6 +1805,7 @@ void RenderWidgetHostViewAura::SetSurfaceNotInUseByCompositor(
// static
void RenderWidgetHostViewAura::CopyFromCompositingSurfaceHasResult(
const gfx::Size& dst_size_in_pixel,
+ bool readback_config_rgb565,
const base::Callback<void(bool, const SkBitmap&)>& callback,
scoped_ptr<cc::CopyOutputResult> result) {
if (result->IsEmpty() || result->size().IsEmpty()) {
@@ -1811,7 +1814,9 @@ void RenderWidgetHostViewAura::CopyFromCompositingSurfaceHasResult(
}
if (result->HasTexture()) {
- PrepareTextureCopyOutputResult(dst_size_in_pixel, callback, result.Pass());
+ PrepareTextureCopyOutputResult(dst_size_in_pixel, readback_config_rgb565,
+ callback,
+ result.Pass());
return;
}
@@ -1833,6 +1838,7 @@ static void CopyFromCompositingSurfaceFinished(
// static
void RenderWidgetHostViewAura::PrepareTextureCopyOutputResult(
const gfx::Size& dst_size_in_pixel,
+ bool readback_config_rgb565,
const base::Callback<void(bool, const SkBitmap&)>& callback,
scoped_ptr<cc::CopyOutputResult> result) {
base::ScopedClosureRunner scoped_callback_runner(
@@ -1874,6 +1880,7 @@ void RenderWidgetHostViewAura::PrepareTextureCopyOutputResult(
gfx::Rect(result->size()),
dst_size_in_pixel,
pixels,
+ readback_config_rgb565,
base::Bind(&CopyFromCompositingSurfaceFinished,
callback,
base::Passed(&release_callback),

Powered by Google App Engine
This is Rietveld 408576698