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

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: update window id 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
Index: ui/aura/root_window.cc
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc
index d447b13a59a85ac6272288f0010494d031dfff28..2a13ee7abf72cb86980b241420ff52373bb62227 100644
--- a/ui/aura/root_window.cc
+++ b/ui/aura/root_window.cc
@@ -446,8 +446,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);

Powered by Google App Engine
This is Rietveld 408576698