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

Unified Diff: ui/views/bubble/tray_bubble_view.cc

Issue 1064133003: ui: Use a PaintRecorder to access the Canvas for painting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ui-recorder: . Created 5 years, 8 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/snapshot/snapshot_aura_unittest.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/bubble/tray_bubble_view.cc
diff --git a/ui/views/bubble/tray_bubble_view.cc b/ui/views/bubble/tray_bubble_view.cc
index cf867d141f72c864438d6b7715ca88c05f05ca9d..81c19f5110f41f10463975f1fe170a468ddf93a1 100644
--- a/ui/views/bubble/tray_bubble_view.cc
+++ b/ui/views/bubble/tray_bubble_view.cc
@@ -15,7 +15,7 @@
#include "ui/aura/window.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_delegate.h"
-#include "ui/compositor/paint_context.h"
+#include "ui/compositor/paint_recorder.h"
#include "ui/events/event.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/geometry/insets.h"
@@ -206,11 +206,12 @@ TrayBubbleContentMask::~TrayBubbleContentMask() {
}
void TrayBubbleContentMask::OnPaintLayer(const ui::PaintContext& context) {
+ ui::PaintRecorder recorder(context);
SkPaint paint;
paint.setAlpha(255);
paint.setStyle(SkPaint::kFill_Style);
gfx::Rect rect(layer()->bounds().size());
- context.canvas()->DrawRoundRect(rect, corner_radius_, paint);
+ recorder.canvas()->DrawRoundRect(rect, corner_radius_, paint);
}
void TrayBubbleContentMask::OnDeviceScaleFactorChanged(
« no previous file with comments | « ui/snapshot/snapshot_aura_unittest.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698