Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3298)

Unified Diff: chrome/browser/ui/window_snapshot/window_snapshot_aura.cc

Issue 10386124: Introduce XGetImage() for GrabWindowSnapshot() in ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/aura/root_window.h » ('j') | ui/aura/root_window.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | ui/aura/root_window.h » ('j') | ui/aura/root_window.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698