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

Unified Diff: ui/gfx/scoped_canvas.h

Issue 2803583003: ui: Remove use of bitmaps when painting tab backgrounds. (Closed)
Patch Set: tabbackground: pointers Created 3 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
« chrome/browser/ui/views/tabs/tab.cc ('K') | « chrome/browser/ui/views/tabs/tab.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/scoped_canvas.h
diff --git a/ui/gfx/scoped_canvas.h b/ui/gfx/scoped_canvas.h
index 96ccaffa25d3a28c1f6d4b0295b5224afeeed224..c4c7014475c6f8569f47958a64435ec5864c4957 100644
--- a/ui/gfx/scoped_canvas.h
+++ b/ui/gfx/scoped_canvas.h
@@ -23,6 +23,18 @@ class GFX_EXPORT ScopedCanvas {
canvas_->Restore();
}
+ ScopedCanvas(ScopedCanvas&& o) {
Peter Kasting 2017/04/06 00:52:11 Nit: Per Google style guide constructors and assig
danakj 2017/04/06 17:05:28 I didn't realize this, thanks. https://google.gith
+ canvas_ = o.canvas_;
+ o.canvas_ = nullptr;
+ }
+ ScopedCanvas& operator=(ScopedCanvas&& o) {
+ if (canvas_)
+ canvas_->Restore();
+ canvas_ = o.canvas_;
+ o.canvas_ = nullptr;
+ return *this;
+ }
+
private:
gfx::Canvas* canvas_;
« chrome/browser/ui/views/tabs/tab.cc ('K') | « chrome/browser/ui/views/tabs/tab.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698