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

Side by Side Diff: tools/lua/paths.lua

Issue 475433004: Add scraper to find paths that fallback to software (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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 | tools/lua/paths_agg.lua » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 function sk_scrape_startcanvas(c, fileName) end
robertphillips 2014/08/15 12:34:18 Comment up here about what this tracks and why ??
krajcevski 2014/08/15 15:13:52 Done.
2
3 function sk_scrape_endcanvas(c, fileName) end
4
5 draws = 0
6 drawPaths = 0
7 drawPathsAnti = 0
8 drawPathsConvex = 0
9 drawPathsConvexAnti = 0
10
11 function string.starts(String,Start)
12 return string.sub(String,1,string.len(Start))==Start
13 end
14
15 function updatePathVars(path, isAntiAlias)
16 if not path then
17 return
18 end
19
20 if path:isEmpty() then
21 return
22 end
23
24 if path:isRect() then
25 return
26 end
27
28 drawPaths = drawPaths + 1
29 if isAntiAlias then
30 drawPathsAnti = drawPathsAnti + 1
31 end
32
33 if path:isConvex() then
34 drawPathsConvex = drawPathsConvex + 1
35 if isAntiAlias then
36 drawPathsConvexAnti = drawPathsConvexAnti + 1
37 end
38 end
39 end
40
41 function sk_scrape_accumulate(t)
42 if (string.starts(t.verb, "draw")) then
43 draws = draws + 1
44 end
45
robertphillips 2014/08/15 12:34:18 if (string.starts(t.verb, "clip")) then clips
krajcevski 2014/08/15 15:13:52 Done.
46 if t.verb == "clipPath" then
47 local path = t.path
48 local antiAlias = t.aa
49 updatePathVars(path, antiAlias)
50 end
51
52 if t.verb == "drawPath" then
53 local paint = t.paint
54 local path = t.path
55 updatePathVars(path, paint:isAntiAlias())
56 end
57 end
58
59 function sk_scrape_summarize()
60 local swPaths = drawPathsAnti - drawPathsConvexAnti
61 io.write("\ndraws = draws + ", draws, "\n");
62 io.write("\ndrawPaths = drawPaths + ", drawPaths, "\n");
63 io.write("\nswPaths = swPaths + ", swPaths, "\n");
64 end
OLDNEW
« no previous file with comments | « no previous file | tools/lua/paths_agg.lua » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698