| Index: content/browser/compositor/delegated_frame_host.cc
|
| diff --git a/content/browser/compositor/delegated_frame_host.cc b/content/browser/compositor/delegated_frame_host.cc
|
| index 1f9a6caa62286688017d99eb203de456317af6f5..40b30c92952d63553e172e9ee37878a25be840d3 100644
|
| --- a/content/browser/compositor/delegated_frame_host.cc
|
| +++ b/content/browser/compositor/delegated_frame_host.cc
|
| @@ -180,7 +180,8 @@ void DelegatedFrameHost::CopyFromCompositingSurface(
|
| output_size,
|
| color_type,
|
| callback));
|
| - request->set_area(src_subrect);
|
| + if (!src_subrect.IsEmpty())
|
| + request->set_area(src_subrect);
|
| client_->RequestCopyOfOutput(request.Pass());
|
| }
|
|
|
| @@ -564,9 +565,15 @@ void DelegatedFrameHost::CopyFromCompositingSurfaceHasResult(
|
| return;
|
| }
|
|
|
| + gfx::Size output_size_in_pixel;
|
| + if (dst_size_in_pixel.IsEmpty())
|
| + output_size_in_pixel = result->size();
|
| + else
|
| + output_size_in_pixel = dst_size_in_pixel;
|
| +
|
| if (result->HasTexture()) {
|
| // GPU-accelerated path
|
| - PrepareTextureCopyOutputResult(dst_size_in_pixel, color_type,
|
| + PrepareTextureCopyOutputResult(output_size_in_pixel, color_type,
|
| callback,
|
| result.Pass());
|
| return;
|
| @@ -574,7 +581,7 @@ void DelegatedFrameHost::CopyFromCompositingSurfaceHasResult(
|
|
|
| DCHECK(result->HasBitmap());
|
| // Software path
|
| - PrepareBitmapCopyOutputResult(dst_size_in_pixel, color_type, callback,
|
| + PrepareBitmapCopyOutputResult(output_size_in_pixel, color_type, callback,
|
| result.Pass());
|
| }
|
|
|
|
|