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

Unified Diff: ui/gfx/scoped_canvas.h

Issue 2803583003: ui: Remove use of bitmaps when painting tab backgrounds. (Closed)
Patch Set: tabbackground: . 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
« no previous file with comments | « 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..aa2d9830f447989d6f81c9c7ed9ce5d3a0048d0c 100644
--- a/ui/gfx/scoped_canvas.h
+++ b/ui/gfx/scoped_canvas.h
@@ -23,6 +23,17 @@ class GFX_EXPORT ScopedCanvas {
canvas_->Restore();
}
+ ScopedCanvas(ScopedCanvas&& o) {
+ canvas_ = o.canvas_;
+ o.canvas_ = nullptr;
+ }
+ ScopedCanvas& operator=(ScopedCanvas&& o) {
+ if (canvas_)
+ canvas_->Restore();
+ canvas_ = o.canvas_;
+ o.canvas_ = nullptr;
danakj 2017/04/05 22:01:37 Oops, was missing the return here when I changed t
danakj 2017/04/05 22:07:01 Alternatively i could keep passing a null instead
+ }
+
private:
gfx::Canvas* canvas_;
« no previous file with comments | « 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