Index: content/browser/renderer_host/render_widget_host_view_android.cc |
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc |
index fdc7810375eb907c8fe2b6decebddd50447fc996..10dbfeb6c4bfa960f9d738fb55d85d0dade1b953 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_android.cc |
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc |
@@ -6,6 +6,7 @@ |
#include <android/bitmap.h> |
+#include "base/android/sys_utils.h" |
#include "base/basictypes.h" |
#include "base/bind.h" |
#include "base/callback_helpers.h" |
@@ -1386,6 +1387,17 @@ bool RenderWidgetHostViewAndroid::IsReadbackConfigSupported( |
return gl_helper->IsReadbackConfigSupported(bitmap_config); |
} |
+SkBitmap::Config RenderWidgetHostViewAndroid::PreferredReadbackFormat() { |
+ // Define the criteria here. If say the 16 texture readback is |
+ // supported we should go with that (this degrades quality) |
+ // or stick back to the default format. |
+ if (base::android::SysUtils::IsLowEndDevice()) { |
+ if (IsReadbackConfigSupported(SkBitmap::kRGB_565_Config)) |
+ return SkBitmap::kRGB_565_Config; |
+ } |
+ return SkBitmap::kARGB_8888_Config; |
+} |
+ |
// static |
void RenderWidgetHostViewPort::GetDefaultScreenInfo( |
blink::WebScreenInfo* results) { |