Index: chrome/browser/ui/window_snapshot/window_snapshot_aura.cc |
diff --git a/chrome/browser/ui/window_snapshot/window_snapshot_aura.cc b/chrome/browser/ui/window_snapshot/window_snapshot_aura.cc |
index d17cb602e6c25e8b452c9329f07ff9f6973754a4..ba1b6e0e252048b397f4993406459c46ed2d9691 100644 |
--- a/chrome/browser/ui/window_snapshot/window_snapshot_aura.cc |
+++ b/chrome/browser/ui/window_snapshot/window_snapshot_aura.cc |
@@ -9,6 +9,7 @@ |
#include "ui/aura/window.h" |
#include "ui/gfx/codec/png_codec.h" |
#include "ui/gfx/compositor/compositor.h" |
+#include "ui/gfx/compositor/dip_util.h" |
#include "ui/gfx/compositor/layer.h" |
#include "ui/gfx/rect.h" |
@@ -25,6 +26,8 @@ bool GrabWindowSnapshot(gfx::NativeWindow window, |
// the desktop. |
read_pixels_bounds.set_origin( |
snapshot_bounds.origin().Add(window->bounds().origin())); |
+ read_pixels_bounds = |
+ ui::ConvertRectToPixel(window->layer(), read_pixels_bounds); |
DCHECK_GE(compositor->size().width(), read_pixels_bounds.right()); |
DCHECK_GE(compositor->size().height(), read_pixels_bounds.bottom()); |