aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/views
diff options
context:
space:
mode:
authorGravatar Jim Van Verth <jvanverth@google.com>2016-10-28 13:35:50 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-10-28 18:00:51 +0000
commit57a98fc4d595875ca75f906acec8ba508dcb5248 (patch)
tree583cc6a16c50390eb54e58cd7e55ddc488ee552e /src/views
parent3effb79fc550fae5a55f1aba6b39cd97acd422c0 (diff)
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 <jvanverth@google.com> Reviewed-by: Cary Clark <caryclark@google.com>
Diffstat (limited to 'src/views')
-rw-r--r--src/views/mac/SkNSView.h18
-rw-r--r--src/views/mac/SkNSView.mm2
-rw-r--r--src/views/mac/SkOSWindow_Mac.mm4
-rw-r--r--src/views/mac/skia_mac.mm4
4 files changed, 10 insertions, 18 deletions
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 <QuartzCore/QuartzCore.h>
#import <Cocoa/Cocoa.h>
#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<SkNSViewOptionsDelegate> 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 <Cocoa/Cocoa.h>
#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