Index: tools/viewer/sk_app/mac/main_mac.cpp |
diff --git a/tools/viewer/sk_app/unix/main_unix.cpp b/tools/viewer/sk_app/mac/main_mac.cpp |
similarity index 80% |
copy from tools/viewer/sk_app/unix/main_unix.cpp |
copy to tools/viewer/sk_app/mac/main_mac.cpp |
index 5e6b7fe3ee475b5e5201ace000e725b525c2f64b..94bc99e01e7f564353d8fdb29ebd050becd6949e 100644 |
--- a/tools/viewer/sk_app/unix/main_unix.cpp |
+++ b/tools/viewer/sk_app/mac/main_mac.cpp |
@@ -8,17 +8,14 @@ |
#include "SkTypes.h" |
#include "SkTHash.h" |
#include "Timer.h" |
-#include "Window_unix.h" |
+#include "Window_mac.h" |
#include "../Application.h" |
using sk_app::Application; |
-void finishWindow(sk_app::Window_unix* win) { |
- win->finishResize(); |
- win->finishPaint(); |
-} |
- |
int main(int argc, char**argv) { |
+#if 0 |
+ // TODO: use Mac main loop |
Display* display = XOpenDisplay(nullptr); |
@@ -28,7 +25,7 @@ int main(int argc, char**argv) { |
int x11_fd = ConnectionNumber(display); |
fd_set in_fds; |
- SkTHashSet<sk_app::Window_unix*> pendingWindows; |
+ SkTHashSet<sk_app::Window_mac*> pendingWindows; |
bool done = false; |
while (!done) { |
// Create a file description set containing x11_fd |
@@ -48,7 +45,7 @@ int main(int argc, char**argv) { |
while (XPending(display) && !done) { |
XNextEvent(display, &event); |
- sk_app::Window_unix* win = sk_app::Window_unix::gWindowMap.find(event.xany.window); |
+ sk_app::Window_mac* win = sk_app::Window_mac::gWindowMap.find(event.xany.window); |
// paint and resize events get collapsed |
switch (event.type) { |
case Expose: |
@@ -67,17 +64,12 @@ int main(int argc, char**argv) { |
break; |
} |
} |
- |
- pendingWindows.foreach(finishWindow); |
- if (pendingWindows.count() > 0) { |
- app->onIdle(); |
- } |
- pendingWindows.reset(); |
} |
delete app; |
XCloseDisplay(display); |
- |
+#endif |
+ |
return 0; |
} |