Compile skwasm with better space saving flags. (flutter/engine#40093)
Compile skwasm with better space saving flags.
This commit is contained in:
@@ -26,6 +26,7 @@ wasm_lib("skwasm") {
|
||||
"-sPTHREAD_POOL_SIZE=1",
|
||||
"-sALLOW_MEMORY_GROWTH",
|
||||
"-sUSE_PTHREADS=1",
|
||||
"-lexports.js",
|
||||
]
|
||||
|
||||
cflags = [ "-pthread" ]
|
||||
@@ -40,8 +41,8 @@ wasm_lib("skwasm") {
|
||||
]
|
||||
} else {
|
||||
ldflags += [
|
||||
"-O1",
|
||||
"--closure=0",
|
||||
"-Oz",
|
||||
"--closure=1",
|
||||
"-flto",
|
||||
"-sEXPORTED_FUNCTIONS=[stackAlloc]",
|
||||
]
|
||||
|
||||
@@ -15,10 +15,8 @@ inline SkMatrix createMatrix(const SkScalar* f) {
|
||||
}
|
||||
|
||||
inline SkRRect createRRect(const SkScalar* f) {
|
||||
const SkScalar* twelveFloats = reinterpret_cast<const SkScalar*>(f);
|
||||
const SkRect* rect = reinterpret_cast<const SkRect*>(twelveFloats);
|
||||
const SkVector* radiiValues =
|
||||
reinterpret_cast<const SkVector*>(twelveFloats + 4);
|
||||
const SkRect* rect = reinterpret_cast<const SkRect*>(f);
|
||||
const SkVector* radiiValues = reinterpret_cast<const SkVector*>(f + 4);
|
||||
|
||||
SkRRect rr;
|
||||
rr.setRectRadii(*rect, radiiValues);
|
||||
|
||||
Reference in New Issue
Block a user