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

Unified Diff: tools/lua/gradients.lua

Issue 2160583002: Add filename to gradient scrape (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix line length problem Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/lua/gradients.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/lua/gradients.lua
diff --git a/tools/lua/gradients.lua b/tools/lua/gradients.lua
index 2a14ff637b990b821993994a19345e0b915d8769..833b8b9ca13f6a9f5d02aa0227a365a9569661ac 100644
--- a/tools/lua/gradients.lua
+++ b/tools/lua/gradients.lua
@@ -1,5 +1,12 @@
-function sk_scrape_startcanvas(c, fileName) end
-function sk_scrape_endcanvas(c, fileName) end
+filename = ""
+
+function sk_scrape_startcanvas(c, fileName)
+ filename = fileName
+end
+
+function sk_scrape_endcanvas(c, fileName)
+
+end
LuaDoubleNearlyZero = 1.0 / bit32.lshift(1.0, 12)
@@ -27,6 +34,8 @@ function sk_scrape_accumulate(t)
gradients[i] = {}
+ gradients[i].filename = filename
+
gradients[i].colorCount = g.colorCount
gradients[i].type = g.type
gradients[i].tile = g.tile
@@ -70,7 +79,8 @@ function sk_scrape_summarize()
end
end
- io.write(string.format("%d %s %s %d %d %s %s\n",
+ io.write(string.format("%s %d %s %s %d %d %s %s\n",
+ v.filename,
v.colorCount,
v.type,
v.tile,
« no previous file with comments | « no previous file | tools/lua/gradients.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698