| Index: ui/aura/root_window_host_x11.cc
|
| ===================================================================
|
| --- ui/aura/root_window_host_x11.cc (revision 217073)
|
| +++ ui/aura/root_window_host_x11.cc (working copy)
|
| @@ -792,13 +792,17 @@
|
| bool RootWindowHostX11::CopyAreaToSkCanvas(const gfx::Rect& source_bounds,
|
| const gfx::Point& dest_offset,
|
| SkCanvas* canvas) {
|
| - scoped_ptr<ui::XScopedImage> scoped_image(GetXImage(source_bounds));
|
| - if (!scoped_image)
|
| + ui::XScopedImage scoped_image(
|
| + XGetImage(xdisplay_, xwindow_,
|
| + source_bounds.x(), source_bounds.y(),
|
| + source_bounds.width(), source_bounds.height(),
|
| + AllPlanes, ZPixmap));
|
| + XImage* image = scoped_image.get();
|
| + if (!image) {
|
| + LOG(ERROR) << "XGetImage failed";
|
| return false;
|
| + }
|
|
|
| - XImage* image = scoped_image->get();
|
| - DCHECK(image);
|
| -
|
| if (image->bits_per_pixel == 32) {
|
| if ((0xff << SK_R32_SHIFT) != image->red_mask ||
|
| (0xff << SK_G32_SHIFT) != image->green_mask ||
|
| @@ -1047,20 +1051,6 @@
|
| delegate_->OnHostMouseEvent(event);
|
| }
|
|
|
| -scoped_ptr<ui::XScopedImage> RootWindowHostX11::GetXImage(
|
| - const gfx::Rect& snapshot_bounds) {
|
| - scoped_ptr<ui::XScopedImage> image(new ui::XScopedImage(
|
| - XGetImage(xdisplay_, xwindow_,
|
| - snapshot_bounds.x(), snapshot_bounds.y(),
|
| - snapshot_bounds.width(), snapshot_bounds.height(),
|
| - AllPlanes, ZPixmap)));
|
| - if (!image) {
|
| - LOG(ERROR) << "XGetImage failed";
|
| - image.reset();
|
| - }
|
| - return image.Pass();
|
| -}
|
| -
|
| void RootWindowHostX11::UpdateIsInternalDisplay() {
|
| RootWindow* root_window = GetRootWindow();
|
| gfx::Screen* screen = gfx::Screen::GetScreenFor(root_window);
|
|
|