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

Unified Diff: ui/aura_extra/image_window_delegate.cc

Issue 1053143002: Make View::Paint use ui::PaintRecorder to access PaintContext's canvas (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: paintrecorder: . 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
Index: ui/aura_extra/image_window_delegate.cc
diff --git a/ui/aura_extra/image_window_delegate.cc b/ui/aura_extra/image_window_delegate.cc
index 138e9611dee3a342a5685158384ea0a3f6ea5428..8f04a1a4971ce615651a7f281b02794f2a3c9770 100644
--- a/ui/aura_extra/image_window_delegate.cc
+++ b/ui/aura_extra/image_window_delegate.cc
@@ -7,6 +7,7 @@
#include "ui/base/cursor/cursor.h"
#include "ui/base/hit_test.h"
#include "ui/compositor/compositor.h"
+#include "ui/compositor/paint_context.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
@@ -69,7 +70,8 @@ bool ImageWindowDelegate::CanFocus() {
void ImageWindowDelegate::OnCaptureLost() {
}
-void ImageWindowDelegate::OnPaint(gfx::Canvas* canvas) {
+void ImageWindowDelegate::OnPaint(const ui::PaintContext& context) {
+ gfx::Canvas* canvas = context.canvas();
if (background_color_ != SK_ColorTRANSPARENT &&
(image_.IsEmpty() || size_mismatch_ || !offset_.IsZero())) {
canvas->DrawColor(background_color_);

Powered by Google App Engine
This is Rietveld 408576698