@@ -249,7 +249,7 @@ def gen_windows(arch, self_contained, args):
249249 "/guard:cf" ,
250250 ])
251251
252- def build_target (target_os , arch , self_contained , debug ):
252+ def build_target (target_os , arch , self_contained , debug , graphite ):
253253 output_name = f"{ target_os } _{ arch } "
254254 if debug :
255255 output_name += "_debug"
@@ -275,8 +275,9 @@ def build_target(target_os, arch, self_contained, debug):
275275 "skia_enable_skottie" : True ,
276276 "skia_use_harfbuzz" : False ,
277277 "skia_enable_ganesh" : True ,
278- "skia_enable_graphite" : True ,
279- "skia_use_dawn" : True ,
278+ # Controlled by --graphite flag (default: False)
279+ "skia_enable_graphite" : bool (graphite ),
280+ "skia_use_dawn" : bool (graphite ),
280281 }
281282
282283 if canonical_os == "linux" :
@@ -347,6 +348,7 @@ def main():
347348 args = argv [2 :]
348349 self_contained = "--self-contained" in args
349350 debug = "--debug" in args
351+ graphite = "--graphite" in args
350352
351353 # prepend ../depot_tools to PATH
352354 depot_tools_path = os .path .abspath (os .path .join (os .path .dirname (__file__ ), ".." , "depot_tools" ))
@@ -355,9 +357,9 @@ def main():
355357
356358 if arch == "all" :
357359 for a in ["x64" , "arm64" ]:
358- build_target (target_os , a , self_contained , debug )
360+ build_target (target_os , a , self_contained , debug , graphite )
359361 else :
360- build_target (target_os , arch , self_contained , debug )
362+ build_target (target_os , arch , self_contained , debug , graphite )
361363
362364if __name__ == "__main__" :
363365 main ()
0 commit comments