iOS/Cocoa SampleApp, Drawingboard, and Networking updates
http://codereview.appspot.com/4843041/
http://codereview.appspot.com/4826061/
http://codereview.appspot.com/4832044/
http://codereview.appspot.com/4798055/
git-svn-id: http://skia.googlecode.com/svn/trunk@2058 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/experimental/SkEventNotifier.mm b/experimental/SkEventNotifier.mm
index 5e93b13..f4f8a63 100644
--- a/experimental/SkEventNotifier.mm
+++ b/experimental/SkEventNotifier.mm
@@ -2,7 +2,6 @@
#include "SkEvent.h"
#define SkEventClass @"SkEvenClass"
@implementation SkEventNotifier
-//Overwritten from NSObject
- (id)init {
self = [super init];
if (self) {
@@ -44,9 +43,12 @@
@end
////////////////////////////////////////////////////////////////////////////////
void SkEvent::SignalNonEmptyQueue() {
- //post a SkEventClass event to the default notification center
- [[NSNotificationCenter defaultCenter] postNotificationName:SkEventClass
- object:nil];
+ //post a SkEventClass event to the default notification queue
+ NSNotification* notification = [NSNotification notificationWithName:SkEventClass object:nil];
+ [[NSNotificationQueue defaultQueue] enqueueNotification:notification
+ postingStyle:NSPostWhenIdle
+ coalesceMask:NSNotificationNoCoalescing
+ forModes:nil];
}
void SkEvent::SignalQueueTimer(SkMSec delay) {