Add filename to gradient scrape
BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2160583002 Review-Url: https://codereview.chromium.org/2160583002
This commit is contained in:
parent
eb9a84aa57
commit
f023e6879c
@ -1,5 +1,12 @@
|
|||||||
function sk_scrape_startcanvas(c, fileName) end
|
filename = ""
|
||||||
function sk_scrape_endcanvas(c, fileName) end
|
|
||||||
|
function sk_scrape_startcanvas(c, fileName)
|
||||||
|
filename = fileName
|
||||||
|
end
|
||||||
|
|
||||||
|
function sk_scrape_endcanvas(c, fileName)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
LuaDoubleNearlyZero = 1.0 / bit32.lshift(1.0, 12)
|
LuaDoubleNearlyZero = 1.0 / bit32.lshift(1.0, 12)
|
||||||
|
|
||||||
@ -27,6 +34,8 @@ function sk_scrape_accumulate(t)
|
|||||||
|
|
||||||
gradients[i] = {}
|
gradients[i] = {}
|
||||||
|
|
||||||
|
gradients[i].filename = filename
|
||||||
|
|
||||||
gradients[i].colorCount = g.colorCount
|
gradients[i].colorCount = g.colorCount
|
||||||
gradients[i].type = g.type
|
gradients[i].type = g.type
|
||||||
gradients[i].tile = g.tile
|
gradients[i].tile = g.tile
|
||||||
@ -70,7 +79,8 @@ function sk_scrape_summarize()
|
|||||||
end
|
end
|
||||||
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.colorCount,
|
||||||
v.type,
|
v.type,
|
||||||
v.tile,
|
v.tile,
|
||||||
|
@ -12,6 +12,7 @@ def create_database(inpath, outpath):
|
|||||||
with sqlite3.connect(outpath) as conn:
|
with sqlite3.connect(outpath) as conn:
|
||||||
c = conn.cursor();
|
c = conn.cursor();
|
||||||
c.execute('''CREATE TABLE IF NOT EXISTS gradients (
|
c.execute('''CREATE TABLE IF NOT EXISTS gradients (
|
||||||
|
FileName TEXT,
|
||||||
ColorCount INTEGER,
|
ColorCount INTEGER,
|
||||||
GradientType TEXT,
|
GradientType TEXT,
|
||||||
TileMode TEXT,
|
TileMode TEXT,
|
||||||
@ -27,7 +28,8 @@ def create_database(inpath, outpath):
|
|||||||
for line in [line.strip() for line in results]:
|
for line in [line.strip() for line in results]:
|
||||||
gradients.append(line.split());
|
gradients.append(line.split());
|
||||||
|
|
||||||
c.executemany("INSERT INTO gradients VALUES (?, ?, ?, ?, ?, ?, ?)",
|
c.executemany(
|
||||||
|
"INSERT INTO gradients VALUES (?, ?, ?, ?, ?, ?, ?, ?)",
|
||||||
gradients);
|
gradients);
|
||||||
|
|
||||||
conn.commit();
|
conn.commit();
|
||||||
|
Loading…
Reference in New Issue
Block a user