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

Unified Diff: third_party/go/src/golang.org/x/mobile/app/darwin_arm.m

Issue 1275153002: Remove third_party/golang.org/x/mobile as it is no longer used with Go 1.5. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Remove golang.org/x/mobile Created 5 years, 4 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: third_party/go/src/golang.org/x/mobile/app/darwin_arm.m
diff --git a/third_party/go/src/golang.org/x/mobile/app/darwin_arm.m b/third_party/go/src/golang.org/x/mobile/app/darwin_arm.m
deleted file mode 100644
index 5a2f52e86e5adcaa40c50f4c1b6eba3647236683..0000000000000000000000000000000000000000
--- a/third_party/go/src/golang.org/x/mobile/app/darwin_arm.m
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin
-
-#include "_cgo_export.h"
-#include <pthread.h>
-#include <stdio.h>
-#include <sys/utsname.h>
-
-#import <UIKit/UIKit.h>
-#import <GLKit/GLKit.h>
-
-struct utsname sysInfo;
-
-@interface AppController : GLKViewController
-@end
-
-@interface AppDelegate : UIResponder<UIApplicationDelegate>
-@property (strong, nonatomic) UIWindow *window;
-@property (strong, nonatomic) AppController *controller;
-@end
-
-@implementation AppDelegate
-- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
- self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
- self.controller = [[AppController alloc] initWithNibName:nil bundle:nil];
- self.window.rootViewController = self.controller;
- [self.window makeKeyAndVisible];
- return YES;
-}
-@end
-
-@interface AppController ()
-@property (strong, nonatomic) EAGLContext *context;
-@end
-
-@implementation AppController
-- (void)viewDidLoad {
- [super viewDidLoad];
- self.context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
- GLKView *view = (GLKView *)self.view;
- view.context = self.context;
- view.drawableDepthFormat = GLKViewDrawableDepthFormat24;
-
- // TODO(crawshaw): set correct geometry.
- //CGRect bounds = view.bounds;
- //view.contentScaleFactor;
- setGeom(300, 300);
-}
-- (void)update {
- NSLog(@"AppController update");
- drawgl((GoUintptr)self.context);
-}
-@end
-
-void runApp(void) {
- @autoreleasepool {
- UIApplicationMain(0, nil, nil, NSStringFromClass([AppDelegate class]));
- }
-}
-
-void setContext(void* context) {
- EAGLContext* ctx = (EAGLContext*)context;
- if (![EAGLContext setCurrentContext:ctx]) {
- // TODO(crawshaw): determine how terrible this is. Exit?
- NSLog(@"failed to set current context");
- }
-}
-
-uint64_t threadID() {
- uint64_t id;
- if (pthread_threadid_np(pthread_self(), &id)) {
- abort();
- }
- return id;
-}
« no previous file with comments | « third_party/go/src/golang.org/x/mobile/app/darwin_arm.go ('k') | third_party/go/src/golang.org/x/mobile/app/debug/fps.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698