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

Unified Diff: experimental/SkiaExamples/SkSampleNSView.mm

Issue 16337012: Smallest possible desktop application that uses Skia to render stuff. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Initial support for OSX (not working yet). Code review fixes. Created 7 years, 6 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
Index: experimental/SkiaExamples/SkSampleNSView.mm
diff --git a/src/views/mac/SkSampleNSView.mm b/experimental/SkiaExamples/SkSampleNSView.mm
similarity index 51%
copy from src/views/mac/SkSampleNSView.mm
copy to experimental/SkiaExamples/SkSampleNSView.mm
index ce5f8aab0a0b24546bdb9fa0b809deb6d5624f29..af4989cba7532b2a1069d6497840a2554e6c9447 100644
--- a/src/views/mac/SkSampleNSView.mm
+++ b/experimental/SkiaExamples/SkSampleNSView.mm
@@ -7,13 +7,15 @@
*/
#import "SkSampleNSView.h"
-#include "SampleApp.h"
+
+#include "SkApplication.h"
+
#include <crt_externs.h>
@implementation SkSampleNSView
- (id)initWithDefaults {
if ((self = [super initWithDefaults])) {
- fWind = new SampleWindow(self, *_NSGetArgc(), *_NSGetArgv(), NULL);
+ fWind = create_sk_window(self, *_NSGetArgc(), *_NSGetArgv());
}
return self;
}
@@ -22,15 +24,4 @@
delete fWind;
[super dealloc];
}
-
-- (void)swipeWithEvent:(NSEvent *)event {
- CGFloat x = [event deltaX];
- if (x < 0)
- ((SampleWindow*)fWind)->previousSample();
- else if (x > 0)
- ((SampleWindow*)fWind)->nextSample();
- else
- ((SampleWindow*)fWind)->showOverview();
-}
-
@end

Powered by Google App Engine
This is Rietveld 408576698