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

Side by Side Diff: experimental/webtry/webtry.go

Issue 315643002: Fix etc1 support for SkFiddle. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix SQL Created 6 years, 6 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 | « experimental/webtry/DESIGN.md ('k') | 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 package main 1 package main
2 2
3 import ( 3 import (
4 "bytes" 4 "bytes"
5 "crypto/md5" 5 "crypto/md5"
6 "database/sql" 6 "database/sql"
7 "encoding/base64" 7 "encoding/base64"
8 "encoding/binary" 8 "encoding/binary"
9 "encoding/json" 9 "encoding/json"
10 "flag" 10 "flag"
(...skipping 17 matching lines...) Expand all
28 ) 28 )
29 29
30 import ( 30 import (
31 "github.com/fiorix/go-web/autogzip" 31 "github.com/fiorix/go-web/autogzip"
32 _ "github.com/go-sql-driver/mysql" 32 _ "github.com/go-sql-driver/mysql"
33 _ "github.com/mattn/go-sqlite3" 33 _ "github.com/mattn/go-sqlite3"
34 ) 34 )
35 35
36 const ( 36 const (
37 RESULT_COMPILE = `../../experimental/webtry/safec++ -DSK_GAMMA_SRGB -DSK _GAMMA_APPLY_TO_A8 -DSK_SCALAR_TO_FLOAT_EXCLUDED -DSK_ALLOW_STATIC_GLOBAL_INITIA LIZERS=1 -DSK_SUPPORT_GPU=0 -DSK_SUPPORT_OPENCL=0 -DSK_FORCE_DISTANCEFIELD_FONTS =0 -DSK_SCALAR_IS_FLOAT -DSK_CAN_USE_FLOAT -DSK_SAMPLES_FOR_X -DSK_BUILD_FOR_UNI X -DSK_USE_POSIX_THREADS -DSK_SYSTEM_ZLIB=1 -DSK_DEBUG -DSK_DEVELOPER=1 -I../../ src/core -I../../src/images -I../../tools/flags -I../../include/config -I../../i nclude/core -I../../include/pathops -I../../include/pipe -I../../include/effects -I../../include/ports -I../../src/sfnt -I../../include/utils -I../../src/utils -I../../include/images -g -fno-exceptions -fstrict-aliasing -Wall -Wextra -Winit -self -Wpointer-arith -Wno-unused-parameter -m64 -fno-rtti -Wnon-virtual-dtor -c ../../../cache/%s.cpp -o ../../../cache/%s.o` 37 RESULT_COMPILE = `../../experimental/webtry/safec++ -DSK_GAMMA_SRGB -DSK _GAMMA_APPLY_TO_A8 -DSK_SCALAR_TO_FLOAT_EXCLUDED -DSK_ALLOW_STATIC_GLOBAL_INITIA LIZERS=1 -DSK_SUPPORT_GPU=0 -DSK_SUPPORT_OPENCL=0 -DSK_FORCE_DISTANCEFIELD_FONTS =0 -DSK_SCALAR_IS_FLOAT -DSK_CAN_USE_FLOAT -DSK_SAMPLES_FOR_X -DSK_BUILD_FOR_UNI X -DSK_USE_POSIX_THREADS -DSK_SYSTEM_ZLIB=1 -DSK_DEBUG -DSK_DEVELOPER=1 -I../../ src/core -I../../src/images -I../../tools/flags -I../../include/config -I../../i nclude/core -I../../include/pathops -I../../include/pipe -I../../include/effects -I../../include/ports -I../../src/sfnt -I../../include/utils -I../../src/utils -I../../include/images -g -fno-exceptions -fstrict-aliasing -Wall -Wextra -Winit -self -Wpointer-arith -Wno-unused-parameter -m64 -fno-rtti -Wnon-virtual-dtor -c ../../../cache/%s.cpp -o ../../../cache/%s.o`
38 » LINK = `../../experimental/webtry/safec++ -m64 -lstdc++ -lm -o ../../../inout/%s -Wl,--start-group ../../../cache/%s.o obj/experimental/webtry /webtry.main.o obj/gyp/libflags.a libskia_images.a libskia_core.a libskia_effect s.a obj/gyp/libjpeg.a obj/gyp/libwebp_dec.a obj/gyp/libwebp_demux.a obj/gyp/libw ebp_dsp.a obj/gyp/libwebp_enc.a obj/gyp/libwebp_utils.a libskia_utils.a libskia_ opts.a libskia_opts_ssse3.a libskia_ports.a libskia_sfnt.a -Wl,--end-group -lpng -lz -lgif -lpthread -lfontconfig -ldl -lfreetype` 38 » LINK = `../../experimental/webtry/safec++ -m64 -lstdc++ -lm -o ../../../inout/%s -Wl,--start-group ../../../cache/%s.o obj/experimental/webtry /webtry.main.o obj/gyp/libflags.a libskia_images.a libskia_core.a libskia_effect s.a obj/gyp/libjpeg.a obj/gyp/libetc1.a obj/gyp/libwebp_dec.a obj/gyp/libwebp_de mux.a obj/gyp/libwebp_dsp.a obj/gyp/libwebp_enc.a obj/gyp/libwebp_utils.a libski a_utils.a libskia_opts.a libskia_opts_ssse3.a libskia_ports.a libskia_sfnt.a -Wl ,--end-group -lpng -lz -lgif -lpthread -lfontconfig -ldl -lfreetype`
39
39 DEFAULT_SAMPLE = `void draw(SkCanvas* canvas) { 40 DEFAULT_SAMPLE = `void draw(SkCanvas* canvas) {
40 SkPaint p; 41 SkPaint p;
41 p.setColor(SK_ColorRED); 42 p.setColor(SK_ColorRED);
42 p.setAntiAlias(true); 43 p.setAntiAlias(true);
43 p.setStyle(SkPaint::kStroke_Style); 44 p.setStyle(SkPaint::kStroke_Style);
44 p.setStrokeWidth(10); 45 p.setStrokeWidth(10);
45 46
46 canvas->drawLine(20, 20, 100, 100, p); 47 canvas->drawLine(20, 20, 100, 100, p);
47 }` 48 }`
48 // Don't increase above 2^16 w/o altering the db tables to accept someth ing bigger than TEXT. 49 // Don't increase above 2^16 w/o altering the db tables to accept someth ing bigger than TEXT.
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 http.HandleFunc("/sources/", autogzip.HandleFunc(sourcesHandler)) 849 http.HandleFunc("/sources/", autogzip.HandleFunc(sourcesHandler))
849 850
850 // Resources are served directly 851 // Resources are served directly
851 // TODO add support for caching/etags/gzip 852 // TODO add support for caching/etags/gzip
852 http.Handle("/res/", autogzip.Handle(http.FileServer(http.Dir("./")))) 853 http.Handle("/res/", autogzip.Handle(http.FileServer(http.Dir("./"))))
853 854
854 // TODO Break out /c/ as it's own handler. 855 // TODO Break out /c/ as it's own handler.
855 http.HandleFunc("/", autogzip.HandleFunc(mainHandler)) 856 http.HandleFunc("/", autogzip.HandleFunc(mainHandler))
856 log.Fatal(http.ListenAndServe(*port, nil)) 857 log.Fatal(http.ListenAndServe(*port, nil))
857 } 858 }
OLDNEW
« no previous file with comments | « experimental/webtry/DESIGN.md ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698