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: tools/viewer/sk_app/mac/main_mac.cpp

Issue 2167503002: Stub in Mac viewer code. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Exclude Mac files from other Viewer builds Created 4 years, 5 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
« no previous file with comments | « tools/viewer/sk_app/mac/Window_mac.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « tools/viewer/sk_app/mac/Window_mac.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698