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

Unified Diff: ui/gfx/canvas.h

Issue 2615493003: use SkSurface behind gfx::Canvas (Closed)
Patch Set: rebase Created 3 years, 11 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 | « no previous file | ui/gfx/canvas.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/canvas.h
diff --git a/ui/gfx/canvas.h b/ui/gfx/canvas.h
index adf12868026de6793ff2edf452686acdc7213144..c81c0f25db78fdb90fb52d106137e43d384a92bc 100644
--- a/ui/gfx/canvas.h
+++ b/ui/gfx/canvas.h
@@ -13,11 +13,11 @@
#include "base/macros.h"
#include "base/strings/string16.h"
#include "skia/ext/platform_canvas.h"
-#include "third_party/skia/include/core/SkRefCnt.h"
+#include "third_party/skia/include/core/SkCanvas.h"
+#include "third_party/skia/include/core/SkSurface.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/text_constants.h"
-
namespace gfx {
class Rect;
@@ -495,10 +495,10 @@ class GFX_EXPORT Canvas {
float image_scale_;
// canvas_ is our active canvas object. Sometimes we are also the owner,
- // in which case canvas_owner_ will be set. Other times we are just
+ // in which case surface_ will be set. Other times we are just
// borrowing someone else's canvas, in which case canvas_ will point there
- // but canvas_owner_ will be null.
- std::unique_ptr<SkCanvas> canvas_owner_;
+ // but surface_ will be null.
+ sk_sp<SkSurface> surface_;
SkCanvas* canvas_;
DISALLOW_COPY_AND_ASSIGN(Canvas);
« no previous file with comments | « no previous file | ui/gfx/canvas.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698