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 29a7417f1ff501866bfb1b4475a7e08eeb02a6fa..f542ad51aa371567225f23481a4fce079c956682 100644 |
--- a/chrome/browser/ui/window_snapshot/window_snapshot_aura.cc |
+++ b/chrome/browser/ui/window_snapshot/window_snapshot_aura.cc |
@@ -7,6 +7,7 @@ |
#include "base/logging.h" |
#include "third_party/skia/include/core/SkBitmap.h" |
#include "ui/aura/window.h" |
+#include "ui/aura/root_window.h" |
#include "ui/compositor/compositor.h" |
#include "ui/compositor/dip_util.h" |
#include "ui/compositor/layer.h" |
@@ -18,6 +19,12 @@ namespace browser { |
bool GrabWindowSnapshot(gfx::NativeWindow window, |
std::vector<unsigned char>* png_representation, |
const gfx::Rect& snapshot_bounds) { |
+#if defined(OS_CHROMEOS) |
Daniel Erat
2012/05/14 23:17:40
Should this be OS_LINUX? I don't see anything Chr
Jun Mukai
2012/05/15 22:39:24
Done.
|
+ // We use XGetImage() for ChromeOS for the performance reason. |
Daniel Erat
2012/05/14 23:17:40
nit: s/the performance reason/performance reasons/
Jun Mukai
2012/05/15 22:39:24
Done.
|
+ // See crbug.com/122720 |
+ return window->GetRootWindow()->GrabWindowSnapshot( |
+ png_representation, snapshot_bounds); |
+#else |
ui::Compositor* compositor = window->layer()->GetCompositor(); |
gfx::Rect read_pixels_bounds = snapshot_bounds; |
@@ -46,6 +53,7 @@ bool GrabWindowSnapshot(gfx::NativeWindow window, |
std::vector<gfx::PNGCodec::Comment>(), |
png_representation); |
return true; |
+#endif |
} |
} // namespace browser |