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

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

Issue 188633002: Query the preferred readback config in CopyFromBackingStore (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index c715fcac51e35b0b9e381cd686dd1453f7b7ecc8..90b16d49f33c00f57c2bc614b14e1f11b394fe2d 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -33,6 +33,7 @@
#include "content/browser/renderer_host/backing_store.h"
#include "content/browser/renderer_host/backing_store_manager.h"
#include "content/browser/renderer_host/dip_util.h"
+#include "content/browser/renderer_host/image_transport_factory_android.h"
#include "content/browser/renderer_host/input/input_router_impl.h"
#include "content/browser/renderer_host/input/synthetic_gesture.h"
#include "content/browser/renderer_host/input/synthetic_gesture_controller.h"
@@ -45,6 +46,7 @@
#include "content/browser/renderer_host/render_widget_host_delegate.h"
#include "content/common/accessibility_messages.h"
#include "content/common/content_constants_internal.h"
+#include "content/common/gpu/client/gl_helper.h"
#include "content/common/gpu/gpu_messages.h"
#include "content/common/input_messages.h"
#include "content/common/view_messages.h"
@@ -724,10 +726,17 @@ void RenderWidgetHostImpl::CopyFromBackingStore(
"RenderWidgetHostImpl::CopyFromBackingStore::FromCompositingSurface");
gfx::Rect accelerated_copy_rect = src_subrect.IsEmpty() ?
gfx::Rect(view_->GetViewBounds().size()) : src_subrect;
+ ImageTransportFactoryAndroid* factory =
+ ImageTransportFactoryAndroid::GetInstance();
+ GLHelper* gl_helper = factory->GetGLHelper();
+ SkBitmap::Config preffered_format = SkBitmap::kARGB_8888_Config;
+ DCHECK(gl_helper);
+ if (gl_helper)
+ preffered_format = gl_helper->PreferredReadbackFormat();
piman 2014/03/06 22:01:52 This code is out-of-place. 1- Obviously we can't a
sivag 2014/03/10 15:48:18 Done.
view_->CopyFromCompositingSurface(accelerated_copy_rect,
accelerated_dst_size,
callback,
- SkBitmap::kARGB_8888_Config);
+ preffered_format);
return;
}
« no previous file with comments | « no previous file | content/common/gpu/client/gl_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698