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

Unified Diff: src/views/mac/SkNSView.mm

Issue 580073003: use surface in SkView/SampleApp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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 | « src/views/SkWindow.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/views/mac/SkNSView.mm
diff --git a/src/views/mac/SkNSView.mm b/src/views/mac/SkNSView.mm
index 6347d464085dcddf57afc92dd88ca8488cbbfd50..67141679dbd8eaffc2e8515f5095e4c5eef95e81 100644
--- a/src/views/mac/SkNSView.mm
+++ b/src/views/mac/SkNSView.mm
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
@@ -8,6 +7,7 @@
#import "SkNSView.h"
#include "SkCanvas.h"
+#include "SkSurface.h"
#include "SkCGUtils.h"
#include "SkEvent.h"
SK_COMPILE_ASSERT(SK_SUPPORT_GPU, not_implemented_for_non_gpu_build);
@@ -129,8 +129,8 @@ SK_COMPILE_ASSERT(SK_SUPPORT_GPU, not_implemented_for_non_gpu_build);
- (void)drawSkia {
fRedrawRequestPending = false;
if (fWind) {
- SkAutoTUnref<SkCanvas> canvas(fWind->createCanvas());
- fWind->draw(canvas);
+ SkAutoTUnref<SkSurface> surface(fWind->createSurface());
+ fWind->draw(surface->getCanvas());
#ifdef FORCE_REDRAW
fWind->inval(NULL);
#endif
« no previous file with comments | « src/views/SkWindow.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698