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

Side by Side Diff: experimental/webtry/main.cpp

Issue 639013002: allow fiddles to use the futex system call; fixes fonts finally (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include <sys/time.h> 1 #include <sys/time.h>
2 #include <sys/resource.h> 2 #include <sys/resource.h>
3 3
4 #include "SkCanvas.h" 4 #include "SkCanvas.h"
5 #include "SkCommandLineFlags.h" 5 #include "SkCommandLineFlags.h"
6 #include "SkData.h" 6 #include "SkData.h"
7 #include "SkForceLinking.h" 7 #include "SkForceLinking.h"
8 #include "SkGraphics.h" 8 #include "SkGraphics.h"
9 #include "SkImageDecoder.h" 9 #include "SkImageDecoder.h"
10 #include "SkImageEncoder.h" 10 #include "SkImageEncoder.h"
(...skipping 20 matching lines...) Expand all
31 /* List allowed syscalls. */ 31 /* List allowed syscalls. */
32 ALLOW_SYSCALL(exit_group), 32 ALLOW_SYSCALL(exit_group),
33 ALLOW_SYSCALL(exit), 33 ALLOW_SYSCALL(exit),
34 ALLOW_SYSCALL(fstat), 34 ALLOW_SYSCALL(fstat),
35 ALLOW_SYSCALL(read), 35 ALLOW_SYSCALL(read),
36 ALLOW_SYSCALL(write), 36 ALLOW_SYSCALL(write),
37 ALLOW_SYSCALL(close), 37 ALLOW_SYSCALL(close),
38 ALLOW_SYSCALL(mmap), 38 ALLOW_SYSCALL(mmap),
39 ALLOW_SYSCALL(munmap), 39 ALLOW_SYSCALL(munmap),
40 ALLOW_SYSCALL(brk), 40 ALLOW_SYSCALL(brk),
41 ALLOW_SYSCALL(futex),
41 KILL_PROCESS, 42 KILL_PROCESS,
42 }; 43 };
43 struct sock_fprog prog = { 44 struct sock_fprog prog = {
44 SK_ARRAY_COUNT(filter), 45 SK_ARRAY_COUNT(filter),
45 filter, 46 filter,
46 }; 47 };
47 48
48 // Lock down the app so that it can't get new privs, such as setuid. 49 // Lock down the app so that it can't get new privs, such as setuid.
49 // Calling this is a requirement for an unpriviledged process to use mode 50 // Calling this is a requirement for an unpriviledged process to use mode
50 // 2 seccomp filters, ala SECCOMP_MODE_FILTER, otherwise we'd have to be 51 // 2 seccomp filters, ala SECCOMP_MODE_FILTER, otherwise we'd have to be
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 123
123 // Write out the image as a PNG. 124 // Write out the image as a PNG.
124 SkAutoTUnref<SkImage> image(surface->newImageSnapshot()); 125 SkAutoTUnref<SkImage> image(surface->newImageSnapshot());
125 SkAutoTUnref<SkData> data(image->encode(SkImageEncoder::kPNG_Type, 100)); 126 SkAutoTUnref<SkData> data(image->encode(SkImageEncoder::kPNG_Type, 100));
126 if (NULL == data.get()) { 127 if (NULL == data.get()) {
127 printf("Failed to encode\n"); 128 printf("Failed to encode\n");
128 exit(1); 129 exit(1);
129 } 130 }
130 stream.write(data->data(), data->size()); 131 stream.write(data->data(), data->size());
131 } 132 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698