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

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc

Issue 1054783003: views: Access the Canvas through recorders not through PaintContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
index c85b9541968a4dbeb1546becc736a5c903e841e4..058971576b4d483892832b5f1f33234402a1bda2 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
@@ -73,6 +73,7 @@
#include "ui/base/theme_provider.h"
#include "ui/base/window_open_disposition.h"
#include "ui/compositor/paint_context.h"
+#include "ui/compositor/paint_recorder.h"
#include "ui/gfx/animation/slide_animation.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/text_constants.h"
@@ -1011,9 +1012,10 @@ void BookmarkBarView::PaintChildren(const ui::PaintContext& context) {
h);
indicator_bounds.set_x(GetMirroredXForRect(indicator_bounds));
- gfx::Canvas* canvas = context.canvas();
+ ui::PaintRecorder recorder(context);
+
Peter Kasting 2015/04/06 19:24:36 Nit: Blank line not necessary
danakj 2015/04/06 19:29:59 Done.
// TODO(sky/glen): make me pretty!
- canvas->FillRect(indicator_bounds, kDropIndicatorColor);
+ recorder.canvas()->FillRect(indicator_bounds, kDropIndicatorColor);
}
}

Powered by Google App Engine
This is Rietveld 408576698