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

Unified Diff: content/browser/web_contents/aura/gesture_nav_simple.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
Index: content/browser/web_contents/aura/gesture_nav_simple.cc
diff --git a/content/browser/web_contents/aura/gesture_nav_simple.cc b/content/browser/web_contents/aura/gesture_nav_simple.cc
index 406f5545e28ea2ea1a08a4f7465cf0a78147254a..812cc6c70c942d188685ff833f70e2ea15b46cc2 100644
--- a/content/browser/web_contents/aura/gesture_nav_simple.cc
+++ b/content/browser/web_contents/aura/gesture_nav_simple.cc
@@ -16,6 +16,7 @@
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_animation_observer.h"
#include "ui/compositor/layer_delegate.h"
+#include "ui/compositor/paint_context.h"
#include "ui/compositor/scoped_layer_animation_settings.h"
#include "ui/gfx/animation/tween.h"
#include "ui/gfx/canvas.h"
@@ -84,12 +85,13 @@ class ArrowLayerDelegate : public ui::LayerDelegate {
private:
// ui::LayerDelegate:
- void OnPaintLayer(gfx::Canvas* canvas) override {
+ void OnPaintLayer(const ui::PaintContext& context) override {
SkPaint paint;
paint.setColor(SkColorSetARGB(0xa0, 0, 0, 0));
paint.setStyle(SkPaint::kFill_Style);
paint.setAntiAlias(true);
+ gfx::Canvas* canvas = context.canvas();
canvas->DrawCircle(
gfx::Point(left_arrow_ ? 0 : kArrowWidth, kArrowHeight / 2),
kArrowWidth,

Powered by Google App Engine
This is Rietveld 408576698