From 57a98fc4d595875ca75f906acec8ba508dcb5248 Mon Sep 17 00:00:00 2001 From: Jim Van Verth Date: Fri, 28 Oct 2016 13:35:50 -0400 Subject: Add GN config for Mac SampleApp GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4077 Change-Id: I67e4456c8ccdb5413e86c442b759f6dff4de651b Reviewed-on: https://skia-review.googlesource.com/4077 Commit-Queue: Jim Van Verth Reviewed-by: Cary Clark --- src/views/mac/SkNSView.h | 18 ++++++------------ src/views/mac/SkNSView.mm | 2 ++ src/views/mac/SkOSWindow_Mac.mm | 4 ---- src/views/mac/skia_mac.mm | 4 ++-- 4 files changed, 10 insertions(+), 18 deletions(-) (limited to 'src/views') diff --git a/src/views/mac/SkNSView.h b/src/views/mac/SkNSView.h index 779c51b7e4..1718b2ac11 100644 --- a/src/views/mac/SkNSView.h +++ b/src/views/mac/SkNSView.h @@ -8,6 +8,7 @@ #import #import #import "SkWindow.h" + class SkEvent; @class SkNSView; @@ -18,18 +19,7 @@ class SkEvent; - (void) view:(SkNSView*)view didUpdateMenu:(const SkOSMenu*)menu; @end -@interface SkNSView : NSView { - BOOL fRedrawRequestPending; - - NSString* fTitle; - SkOSWindow* fWind; -#if SK_SUPPORT_GPU - NSOpenGLContext* fGLContext; -#endif - id fOptionsDelegate; -} - -@property (nonatomic, readonly) SkOSWindow *fWind; +@interface SkNSView : NSView @property (nonatomic, retain) NSString* fTitle; #if SK_SUPPORT_GPU @property (nonatomic, retain) NSOpenGLContext* fGLContext; @@ -54,3 +44,7 @@ class SkEvent; - (void)freeNativeWind; @end + +@interface SkNSView() + @property (nonatomic, readwrite) SkOSWindow *fWind; +@end diff --git a/src/views/mac/SkNSView.mm b/src/views/mac/SkNSView.mm index ce29382371..7f4aacd4c9 100644 --- a/src/views/mac/SkNSView.mm +++ b/src/views/mac/SkNSView.mm @@ -20,6 +20,8 @@ static_assert(SK_SUPPORT_GPU, "not_implemented_for_non_gpu_build"); @implementation SkNSView @synthesize fWind, fTitle, fOptionsDelegate, fGLContext; +BOOL fRedrawRequestPending; + - (id)initWithCoder:(NSCoder*)coder { if ((self = [super initWithCoder:coder])) { self = [self initWithDefaults]; diff --git a/src/views/mac/SkOSWindow_Mac.mm b/src/views/mac/SkOSWindow_Mac.mm index faf1bbafd2..4efa7533b4 100644 --- a/src/views/mac/SkOSWindow_Mac.mm +++ b/src/views/mac/SkOSWindow_Mac.mm @@ -5,8 +5,6 @@ * found in the LICENSE file. */ -#if defined(SK_BUILD_FOR_MAC) - #import #include "SkOSWindow_Mac.h" #include "SkOSMenu.h" @@ -91,5 +89,3 @@ bool SkOSWindow::makeFullscreen() { return true; } - -#endif diff --git a/src/views/mac/skia_mac.mm b/src/views/mac/skia_mac.mm index 98d4c4bd92..b2c59516e0 100644 --- a/src/views/mac/skia_mac.mm +++ b/src/views/mac/skia_mac.mm @@ -27,12 +27,12 @@ } - (void)dealloc { - delete fWind; + delete self.fWind; [super dealloc]; } - (void)begin { - fWind = create_sk_window(self, *_NSGetArgc(), *_NSGetArgv()); + self.fWind = create_sk_window(self, *_NSGetArgc(), *_NSGetArgv()); [self setUpWindow]; } @end -- cgit v1.2.3