doc: add instructions to capture a .skp
from chromium
NOTRY=true DOCS_PREVIEW= https://skia.org/user/tips?cl=1220783005 Review URL: https://codereview.chromium.org/1220783005
This commit is contained in:
parent
8de81806db
commit
5f0b0ad5d9
@ -16,6 +16,27 @@ drawBitmapNine():
|
|||||||
bitmap.extractSubset(&subset, rect);
|
bitmap.extractSubset(&subset, rect);
|
||||||
canvas->drawBitmapNine(subset, ...);
|
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
|
FAQ
|
||||||
---
|
---
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user