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

Unified Diff: tools/lua/dump_clipstack_at_restore.lua

Issue 177933003: Add getClipStack method to lua SkCanvas (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: remove extra code from lua script Created 6 years, 10 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 | « src/utils/SkLua.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/lua/dump_clipstack_at_restore.lua
diff --git a/tools/lua/dump_clipstack_at_restore.lua b/tools/lua/dump_clipstack_at_restore.lua
new file mode 100644
index 0000000000000000000000000000000000000000..d53f5a3712b924acd3ca49b7b5faefa7fb604728
--- /dev/null
+++ b/tools/lua/dump_clipstack_at_restore.lua
@@ -0,0 +1,25 @@
+function sk_scrape_startcanvas(c, fileName)
+ canvas = c
+ clipstack = {}
+ restoreCount = 0
+end
+
+function sk_scrape_endcanvas(c, fileName)
+ canvas = nil
+end
+
+function sk_scrape_accumulate(t)
+ if (t.verb == "restore") then
+ restoreCount = restoreCount + 1;
+ io.write("Clip Stack at restore #", restoreCount, ":\n")
+ for i = 1, #clipstack do
+ local element = clipstack[i];
+ io.write("\t", element["op"], ", ", element["type"], ", aa:", tostring(element["aa"]), "\n")
+ end
+ io.write("\n")
+ else
+ clipstack = canvas:getClipStack()
+ end
+end
+
+function sk_scrape_summarize() end
« no previous file with comments | « src/utils/SkLua.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698