| OLD | NEW |
| 1 Tips & FAQ | 1 Tips & FAQ |
| 2 ========== | 2 ========== |
| 3 | 3 |
| 4 + [Gyp Options](#gypdefines) | 4 + [Gyp Options](#gypdefines) |
| 5 + [Bitmap Subsetting](#bitmap-subsetting) | 5 + [Bitmap Subsetting](#bitmap-subsetting) |
| 6 + [Capture a `.skp` file on a web page in Chromium](#skp-capture) | 6 + [Capture a `.skp` file on a web page in Chromium](#skp-capture) |
| 7 + [How to add hardware acceleration in Skia](#hw-acceleration) | 7 + [How to add hardware acceleration in Skia](#hw-acceleration) |
| 8 + [Does Skia support Font hinting?](#font-hinting) | 8 + [Does Skia support Font hinting?](#font-hinting) |
| 9 + [Does Skia shape text (kerning)?](#kerning) | 9 + [Does Skia shape text (kerning)?](#kerning) |
| 10 + [How do I add drop shadow on text?](#text-shadow) | 10 + [How do I add drop shadow on text?](#text-shadow) |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 <span id="skp-capture"></span> | 96 <span id="skp-capture"></span> |
| 97 | 97 |
| 98 Capture a `.skp` file on a web page in Chromium | 98 Capture a `.skp` file on a web page in Chromium |
| 99 ----------------------------------------------- | 99 ----------------------------------------------- |
| 100 | 100 |
| 101 1. Launch Chrome or Chromium with `--no-sandbox --enable-gpu-benchmarking` | 101 1. Launch Chrome or Chromium with `--no-sandbox --enable-gpu-benchmarking` |
| 102 2. Open the JS console (ctrl-shift-J) | 102 2. Open the JS console (ctrl-shift-J) |
| 103 3. Execute: `chrome.gpuBenchmarking.printToSkPicture('/tmp')` | 103 3. Execute: `chrome.gpuBenchmarking.printToSkPicture('/tmp')` |
| 104 This returns "undefined" on success. | 104 This returns "undefined" on success. |
| 105 | 105 |
| 106 Open the resulting file in the Skia Debugger, rasterize it with `dm`, | 106 Open the resulting file in the [Skia Debugger](/dev/tools/debugger), rasterize i
t with `dm`, |
| 107 or use Skia's `SampleApp` to view it: | 107 or use Skia's `SampleApp` to view it: |
| 108 | 108 |
| 109 <!--?prettify lang=sh?--> | 109 <!--?prettify lang=sh?--> |
| 110 | 110 |
| 111 bin/sync-and-gyp | |
| 112 ninja -C out/Release debugger dm SampleApp | |
| 113 out/Release/debugger /tmp/layer_0.skp & | |
| 114 | |
| 115 out/Release/dm --src skp --skps /tmp/layer_0.skp -w /tmp \ | 111 out/Release/dm --src skp --skps /tmp/layer_0.skp -w /tmp \ |
| 116 --config 8888 gpu pdf --verbose | 112 --config 8888 gpu pdf --verbose |
| 117 ls -l /tmp/*/skp/layer_0.skp.* | 113 ls -l /tmp/*/skp/layer_0.skp.* |
| 118 | 114 |
| 119 out/Release/SampleApp --picture /tmp/layer_0.skp | 115 out/Release/SampleApp --picture /tmp/layer_0.skp |
| 120 | 116 |
| 121 * * * | 117 * * * |
| 122 | 118 |
| 123 <span id="hw-acceleration"></span> | 119 <span id="hw-acceleration"></span> |
| 124 | 120 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 SkBlurMaskFilter::ConvertRadiusToSigma(radius), 0)); | 199 SkBlurMaskFilter::ConvertRadiusToSigma(radius), 0)); |
| 204 canvas->drawText(text, strlen(text), x + xDrop, y + yDrop, blur); | 200 canvas->drawText(text, strlen(text), x + xDrop, y + yDrop, blur); |
| 205 canvas->drawText(text, strlen(text), x, y, paint); | 201 canvas->drawText(text, strlen(text), x, y, paint); |
| 206 } | 202 } |
| 207 | 203 |
| 208 <a href='https://fiddle.skia.org/c/@text_shadow'><img src='https://fiddle.skia.o
rg/i/@text_shadow_raster.png'></a> | 204 <a href='https://fiddle.skia.org/c/@text_shadow'><img src='https://fiddle.skia.o
rg/i/@text_shadow_raster.png'></a> |
| 209 | 205 |
| 210 * * * | 206 * * * |
| 211 | 207 |
| 212 <div style="margin-bottom:99%"></div> | 208 <div style="margin-bottom:99%"></div> |
| OLD | NEW |