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

Unified Diff: ui/gfx/canvas.h

Issue 2615493003: use SkSurface behind gfx::Canvas (Closed)
Patch Set: anon namespace 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') | ui/gfx/canvas.cc » ('J')
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 00f5b9103fc53f195d5bf3d67a697a73d2e61b5b..2bc0409c7ad01b03fc07dc00469af017ac75bd3d 100644
--- a/ui/gfx/canvas.h
+++ b/ui/gfx/canvas.h
@@ -13,12 +13,12 @@
#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/shadow_value.h"
#include "ui/gfx/text_constants.h"
-
namespace gfx {
class Rect;
@@ -506,10 +506,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') | ui/gfx/canvas.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698