| 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 c612941aedad75a28fdfe369f220d85c98b91e32..c9f8d819ea78ee77773b8a6e411404c1bc089d41 100644
|
| --- a/content/browser/android/content_view_core_impl.cc
|
| +++ b/content/browser/android/content_view_core_impl.cc
|
| @@ -176,7 +176,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.";
|
|
|
| @@ -1287,7 +1288,6 @@ jboolean ContentViewCoreImpl::PopulateBitmapFromCompositor(JNIEnv* env,
|
| RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid();
|
| if (!view)
|
| return false;
|
| -
|
| return view->PopulateBitmapWithContents(jbitmap);
|
| }
|
|
|
| @@ -1634,6 +1634,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,
|
|
|