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

Unified Diff: ui/aura/root_window.cc

Issue 11273059: ash: Clean up system background layer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: apply review feedback Created 8 years, 2 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 | « ui/aura/root_window.h ('k') | ui/aura/root_window_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/root_window.cc
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc
index 563456686a80bf85127a0cfe5252030c6b4951dd..0c0b79db0ce36541efa23e8d8bec724ab08bec0e 100644
--- a/ui/aura/root_window.cc
+++ b/ui/aura/root_window.cc
@@ -403,8 +403,18 @@ void RootWindow::SetFocusWhenShown(bool focused) {
host_->SetFocusWhenShown(focused);
}
+bool RootWindow::CopyAreaToSkCanvas(const gfx::Rect& source_bounds,
+ const gfx::Point& dest_offset,
+ SkCanvas* canvas) {
+ DCHECK(canvas);
+ DCHECK(bounds().Contains(source_bounds));
+ gfx::Rect source_pixels = ui::ConvertRectToPixel(layer(), source_bounds);
+ return host_->CopyAreaToSkCanvas(source_pixels, dest_offset, canvas);
+}
+
bool RootWindow::GrabSnapshot(const gfx::Rect& snapshot_bounds,
std::vector<unsigned char>* png_representation) {
+ DCHECK(png_representation);
DCHECK(bounds().Contains(snapshot_bounds));
gfx::Rect snapshot_pixels = ui::ConvertRectToPixel(layer(), snapshot_bounds);
return host_->GrabSnapshot(snapshot_pixels, png_representation);
« no previous file with comments | « ui/aura/root_window.h ('k') | ui/aura/root_window_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698