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

Unified Diff: ui/aura/window.cc

Issue 1057873004: Pass a ui::PaintContext from ui::Layer to layer delegates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layer-paintcontext: mac Created 5 years, 9 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/window.h ('k') | ui/aura/window_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window.cc
diff --git a/ui/aura/window.cc b/ui/aura/window.cc
index 43d5955d4ab8e1833af88082647cf2851b4def3e..6327dabe0721cb2043bf28d6ba3235f4b9a7ac35 100644
--- a/ui/aura/window.cc
+++ b/ui/aura/window.cc
@@ -30,6 +30,7 @@
#include "ui/aura/window_tree_host.h"
#include "ui/compositor/compositor.h"
#include "ui/compositor/layer.h"
+#include "ui/compositor/paint_context.h"
#include "ui/events/event_target_iterator.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/path.h"
@@ -921,9 +922,9 @@ void Window::SchedulePaint() {
SchedulePaintInRect(gfx::Rect(0, 0, bounds().width(), bounds().height()));
}
-void Window::Paint(gfx::Canvas* canvas) {
+void Window::Paint(const ui::PaintContext& context) {
if (delegate_)
- delegate_->OnPaint(canvas);
+ delegate_->OnPaint(context);
}
Window* Window::GetWindowForPoint(const gfx::Point& local_point,
@@ -1321,8 +1322,8 @@ bool Window::CleanupGestureState() {
return state_modified;
}
-void Window::OnPaintLayer(gfx::Canvas* canvas) {
- Paint(canvas);
+void Window::OnPaintLayer(const ui::PaintContext& context) {
+ Paint(context);
}
void Window::OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) {
« no previous file with comments | « ui/aura/window.h ('k') | ui/aura/window_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698