Index: content/browser/android/content_view_core_impl.cc |
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc |
index fd808fed4f3841f3f33587219fac6f21bad1c076..f4d2aa16457325521aaa5ecb02dcb3a76b787e3e 100644 |
--- a/content/browser/android/content_view_core_impl.cc |
+++ b/content/browser/android/content_view_core_impl.cc |
@@ -175,7 +175,8 @@ ContentViewCoreImpl::ContentViewCoreImpl(JNIEnv* env, jobject obj, |
view_android_(view_android), |
window_android_(window_android), |
device_orientation_(0), |
- geolocation_needs_pause_(false) { |
+ geolocation_needs_pause_(false), |
+ bitmap_config_is_565_(false) { |
CHECK(web_contents) << |
"A ContentViewCoreImpl should be created with a valid WebContents."; |
@@ -1278,7 +1279,6 @@ jboolean ContentViewCoreImpl::PopulateBitmapFromCompositor(JNIEnv* env, |
RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); |
if (!view) |
return false; |
- |
return view->PopulateBitmapWithContents(jbitmap); |
} |
@@ -1625,6 +1625,30 @@ void ContentViewCoreImpl::SendOrientationChangeEventInternal() { |
rvhi->SendOrientationChangeEvent(device_orientation_); |
} |
+static void recieveOutputBitmap(bool, const SkBitmap& bitmap) |
+{ |
+ if(bitmap.isNull()){ |
+ return; |
+ } |
+} |
+ |
+void ContentViewCoreImpl::PopulateBitmapAsync(gfx::Rect src_subrect, |
+ gfx::Size dst_size, |
+ bool readback_config_rgb565) { |
+ RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); |
+ if (!view) |
+ return ; |
+ bitmap_config_is_565_ = readback_config_rgb565; |
+ view->CopyFromCompositingSurface(src_subrect, |
+ dst_size, |
+ base::Bind(&recieveOutputBitmap)); |
+ bitmap_config_is_565_ = false; |
+} |
+ |
+bool ContentViewCoreImpl::IsReadBackConfig565() |
+{ |
+ return bitmap_config_is_565_; |
+} |
// This is called for each ContentView. |
jlong Init(JNIEnv* env, jobject obj, |
jboolean hardware_accelerated, |