aboutsummaryrefslogtreecommitdiffhomepage
path: root/site
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2015-07-08 10:56:01 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-08 10:56:01 -0700
commit5f0b0ad5d9c6d3345ccb5ae902a006e85c10e19b (patch)
treed26a8cceab023263fbdf517fec1b7b722a6d662a /site
parent8de81806db43c1a1a7bafdb95c77ac4fa4a67f49 (diff)
doc: add instructions to capture a `.skp` from chromium
Diffstat (limited to 'site')
-rw-r--r--site/user/tips.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/site/user/tips.md b/site/user/tips.md
index e76990b783..9b86bf1b4c 100644
--- a/site/user/tips.md
+++ b/site/user/tips.md
@@ -16,6 +16,27 @@ drawBitmapNine():
bitmap.extractSubset(&subset, rect);
canvas->drawBitmapNine(subset, ...);
+### Capturing a `.skp` file on a web page in Chromium.
+
+1. Launch Chrome or Chromium with `--no-sandbox --enable-gpu-benchmarking`
+2. Open the JS console (ctrl-shift-J)
+3. Execute: `chrome.gpuBenchmarking.printToSkPicture('/tmp')`
+ This returns "undefined" on success.
+
+Open the resulting file in the Skia Debugger:
+
+ bin/sync-and-gyp
+ ninja -C out/Release debugger
+ out/Release/debugger /tmp/layer_0.skp &
+
+Or use `dm` to rasterize it.
+
+ bin/sync-and-gyp
+ ninja -C out/Release dm
+ out/Release/dm --src skp --skps /tmp/layer_0.skp -w /tmp \
+ --config 8888 gpu pdf --verbose
+ ls -l /tmp/*/skp/layer_0.skp.*
+
FAQ
---