aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
Commit message (Collapse)AuthorAge
* remove monobenchGravatar Mike Klein2017-08-11
| | | | | | | | | I'm betting big on ok bench. This is a forcing function. Change-Id: I8c359b7d712e16f8f0cbb90591801e0014073288 Reviewed-on: https://skia-review.googlesource.com/33660 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* ok, add a bench sourceGravatar Mike Klein2017-08-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This new source acts like other sources (GMs, SKPs) for benchmarks. It times multiple samples (controlled by samples=N, default 20), and each of those samples uses the same strategy as monobench, growing loops exponentially until it runs for at least 10ms. When done it prints the fastest and the two slowest samples. In practice the 100th percentile sample is very different from the next slowest due to caching, and the fastest is always interesting. Because these benchmarks run in whatever execution engine ok has selected, on non-Windows platforms you have some real control over the interaction between benchmarks. In its default "fork" mode each benchmark runs independently in its own process, so the 100th percentiles really stand out. The other modes "thread" and "serial" work as you'd expect too. Here's an example where you can see how the different interactions work: out/ok bench:samples=100 8888 filter:search=text_16_AA fork [text_16_AA_WT] 2.32µs @0 6.23µs @99 24.3ms @100 [text_16_AA_FF] 2.41µs @0 5.7µs @99 23.3ms @100 [text_16_AA_88] 2.55µs @0 5.6µs @99 24.8ms @100 [text_16_AA_BK] 1.97µs @0 5.44µs @99 23.2ms @100 out/ok bench:samples=100 8888 filter:search=text_16_AA thread [text_16_AA_FF] 2.45µs @0 23.5µs @99 24.8ms @100 [text_16_AA_WT] 2.52µs @0 17.8µs @99 24.7ms @100 [text_16_AA_88] 2.55µs @0 19.7µs @99 25.1ms @100 [text_16_AA_BK] 1.8µs @0 14.7µs @99 25.1ms @100 out/ok bench:samples=100 8888 filter:search=text_16_AA serial [text_16_AA_88] 2.35µs @0 3.53µs @99 16.7ms @100 [text_16_AA_FF] 2.09µs @0 2.73µs @99 2.91µs @100 [text_16_AA_BK] 1.75µs @0 2.46µs @99 2.65µs @100 [text_16_AA_WT] 2.1µs @0 3.16µs @99 3.17µs @100 In the first "fork" case all runs are independent and have roughly the same profile. "thread" looks similar except you can see them contending at the 99th percentile. In "serial", the first bench warms up the rest, so their 100th percentiles are all much faster. Change-Id: I01a9f8c54b540221a9f232b271bb8ef3fda2569c Reviewed-on: https://skia-review.googlesource.com/33585 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Replace interp() with clut_{3,4}D stages.Gravatar Mike Klein2017-08-10
| | | | | | | | | | | | | | | I tried to follow exactly the same strategy as a start. (Though I did fix the off-by-one dimensions.) It does rather look like we only need 3D and 4D now that I've looked at the call sites. Looks like about a 20% speedup. Change-Id: I8b1af64750ad1750716ee1ab0767e64591c7206a Reviewed-on: https://skia-review.googlesource.com/32842 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Added SkJSONWriterGravatar Brian Osman2017-08-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a stand-alone helper class for writing properly structured JSON to an SkWStream. It currently solves two problems (although this CL only uses it in one context): 1) Performance. Writing out JSON this way is about 10x faster than using JSONCPP. For the large amounts of data generated by the tracing system, that's a big win. 2) Makes it easy to emit structured JSON from code that's not fully centralized. We'd like to spit out JSON that describes a GrContext, GrGpu, GrCaps, etc... Doing that with simple string manipulation is complex, and spreads this logic over all those functions. Using JSONCPP adds yet another (large) third party library dependency (that we only build into our own tools right now). This went through several revisions. I originally planned it as a stateful SkString wrapper, so the user could just build their JSON as a string. That's O(N^2), though, because SkString grows by a (small) constant amount. Even using a better growth strategy still means needing RAM for all the resulting text, which is usually pointless. This version has a constant memory cost, so writing huge amounts of JSON to disk (tracing a long DM run can emit 100's of MBs) doesn't stress resources. Bug: skia: Change-Id: Ia716524b246db0f97d332da60d2ce9903069e748 Reviewed-on: https://skia-review.googlesource.com/31204 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* add tool_util to compare imagesGravatar Mike Reed2017-08-08
| | | | | | | | Bug: skia: Change-Id: I826190aa15cf42a3ca7f3c7d5271ead5b514c116 Reviewed-on: https://skia-review.googlesource.com/32220 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* simplify gm matricesGravatar Mike Reed2017-08-08
| | | | | | | | | | | | rm gm that appears to have been there solely for pdf, but we don't use it for that now. Bug: skia: Change-Id: I3cf88db923c2445b7c95dda14da679a594117643 Reviewed-on: https://skia-review.googlesource.com/31760 Reviewed-by: Derek Sollenberger <djsollen@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Add AAA and DAA toggles to viewerGravatar Yuqian Li2017-08-07
| | | | | | | | Bug: skia: Change-Id: I0ee397d2b2c81a25918cb28be426cf5162da772f Reviewed-on: https://skia-review.googlesource.com/30561 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Remove SkLightingShader and associated classesGravatar Robert Phillips2017-08-07
| | | | | | | | Change-Id: I8050414c30dfdb5df23ca79955adc5ba3a29d3f5 Reviewed-on: https://skia-review.googlesource.com/31140 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* fix links and missing constructorGravatar Cary Clark2017-08-04
| | | | | | | | | Docs-Preview: https://skia.org/?cl=31145 Bug: skia: 6898 Change-Id: Ic94a15551f3683d9de5d3bda53394d2efce0d6a4 Reviewed-on: https://skia-review.googlesource.com/31145 Commit-Queue: Cary Clark <caryclark@skia.org> Reviewed-by: Cary Clark <caryclark@skia.org>
* canvas include checkpointGravatar Cary Clark2017-08-03
| | | | | | | | | | | | All fixes to bookmaker to allow creating SkCanvas.h Docs-Preview: https://skia.org/?cl=29022 TBR=caryclark@google.com Bug: skia: 6898 Change-Id: If10638fbc77cfe680f21868c97f9c0643b87ebf9 Reviewed-on: https://skia-review.googlesource.com/29022 Commit-Queue: Cary Clark <caryclark@skia.org> Reviewed-by: Cary Clark <caryclark@skia.org>
* Disable Delta AA for MSVC for nowGravatar Yuqian Li2017-08-03
| | | | | | | | | | | | | Perf showed that DAA is slow with MSVC. Disable it until I find out why. Bug: skia: Change-Id: If30c24e97fa42e3a7ce143a1b1d06e4a3f278d13 TBR: mtklein@google.com Reviewed-on: https://skia-review.googlesource.com/30584 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Add support for object creation/snapshot/deletion eventsGravatar Brian Osman2017-08-03
| | | | | | | | | | | | | - Bring back some previously deleted macros and helper types. - Automatically inject base_type information into snapshot events, to allow simpler tracking of polymorphic object types. - Fix JSON formatting of pointer values (they were serializing as bool). Bug: skia: Change-Id: Iac7803f72ce5396ffd2fbcb5a36d76745c5e3f3e Reviewed-on: https://skia-review.googlesource.com/28220 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
* Chromium lkgr is no longer updated. Use lkcrGravatar Ravi Mistry2017-08-03
| | | | | | | | Bug: skia:6916 Change-Id: I16badf80c3b34e517b8baab161150c9434f325aa Reviewed-on: https://skia-review.googlesource.com/30100 Commit-Queue: Ravi Mistry <rmistry@google.com> Reviewed-by: Eric Boren <borenet@google.com>
* Update webpages_playback.py to use the new Golang impl of WPRsGravatar Ravi Mistry2017-08-02
| | | | | | | | | NoTry: true Bug: skia:6901 Change-Id: I1a0dc706f9494c261c2f609df81a37cc60970fdd Reviewed-on: https://skia-review.googlesource.com/30060 Commit-Queue: Ravi Mistry <rmistry@google.com> Reviewed-by: Eric Boren <borenet@google.com>
* clang on windows supportGravatar Mike Klein2017-07-31
| | | | | | | | | | | | | | | | | 1) Run python bin/fetch-clang-win 2) Set clang_win = "../bin/clang_win" 3) ??? 4) Profit Most changes here are to pass the right -mfoo flags to Clang to enable advanced instruction sets, or fixed warning-as-errors. BUG=skia:2679 Change-Id: Ieed145d35c209131c7c16fdd3ee11a3de4a1a921 Reviewed-on: https://skia-review.googlesource.com/28740 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* fix self referencesGravatar Cary Clark2017-07-31
| | | | | | | | | | | | | | | try removing self references in method definitions. If this creates awkward wording, it can always be allowed in another CL. Also tighten rules for identifying function references in include comments. R=briansoman@google.com, caryclark@google.com TBR=reed@google.com Bug: skia:6898 Change-Id: I1a0e6b2a76dacfe71d134deb4589fb74e6611a03 Reviewed-on: https://skia-review.googlesource.com/28624 Commit-Queue: Cary Clark <caryclark@skia.org> Reviewed-by: Cary Clark <caryclark@skia.org>
* fix capitalizationGravatar Cary Clark2017-07-31
| | | | | | | | | | | | | | | Fix 'arcs' at sentence start to Arcs. This fix corrected other capitalizations as well, and exposed some mis-capitalizations in the bmh doc. R=brianosman@google.com TBR=reed@google.com Bug: skia: Change-Id: I4d51388556f7e8ff868a9236ce76745915560327 Reviewed-on: https://skia-review.googlesource.com/28241 Commit-Queue: Cary Clark <caryclark@skia.org> Reviewed-by: Cary Clark <caryclark@skia.org>
* Enable delta AA by defaultGravatar Yuqian Li2017-07-29
| | | | | | | | | | | | The earlier CL doesn't change the flag definition so it's not turned on yet. Bug: skia: Change-Id: Id278ae5fc27d703ab7f6628bed95093d32cd7d0b TBR: caryclark@google.com, fmalita@chromium.org Reviewed-on: https://skia-review.googlesource.com/28161 Commit-Queue: Yuqian Li <liyuqian@google.com> Reviewed-by: Yuqian Li <liyuqian@google.com>
* fix output header in bookmakerGravatar Cary Clark2017-07-28
| | | | | | | | | | | | change underscore to space if needed remove bmh_ prefix TBR=caryclark@google.com Bug: skia: Change-Id: I9d4d29c7ff91d9d29bf8740d163724f371e5e211 Reviewed-on: https://skia-review.googlesource.com/28044 Reviewed-by: Cary Clark <caryclark@skia.org> Commit-Queue: Cary Clark <caryclark@skia.org>
* bookmaker initial checkinGravatar Cary Clark2017-07-28
| | | | | | | | | | | | bookmaker is a tool that generates documentation backends from a canonical markup. Documentation for bookmaker itself is evolving at docs/usingBookmaker.bmh, which is visible online at skia.org/user/api/bmh_usingBookmaker Change-Id: Ic76ddf29134895b5c2ebfbc84603e40ff08caf09 Reviewed-on: https://skia-review.googlesource.com/28000 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Cary Clark <caryclark@google.com>
* Remove internal use of SkTypeface::Style.Gravatar Ben Wagner2017-07-27
| | | | | | | Change-Id: I71cf04b12be95a54b7fb47d048ba1f8672ed9a8f Reviewed-on: https://skia-review.googlesource.com/27760 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* factor Engine out of ok coreGravatar Mike Klein2017-07-26
| | | | | | | | | | | | | | This makes Engines (task execution strategies: serial, thread, fork) pluggable just like most of the rest of ok. It removes the thread and process limits, as I find myself rarely caring about what they are exactly. Instead of limiting to num-cores, we just allow any number of concurrent threads, and any number of concurrent child processes subject to OS limitations. Change-Id: Icef49d86818fe9a4b7380efb60e73e40bc2e6b73 Reviewed-on: https://skia-review.googlesource.com/27140 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Add --traceMatch argument to filter tracing categoriesGravatar Brian Osman2017-07-26
| | | | | | | | | Bug: skia: Change-Id: I1449f0f4d7d9ab6225d98c601eafa7461a2a7dde Reviewed-on: https://skia-review.googlesource.com/27120 Commit-Queue: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Revert "ok, exit() child processes instead of _exit()"Gravatar Mike Klein2017-07-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9ac801c12c48b67b48e5a8ef2876a093b7de73fc. Reason for revert: breaks threaded mode. Original change's description: > ok, exit() child processes instead of _exit() > > We want the atexit() hook to print deferred logs (crash dumps, etc.) only when the main, parent process exits. Ending the child processes with _exit() instead of exit() avoids calling atexit() hooks, but also global destructors. This is more complex than we need: we can just print before main() exits. Only the main, parent process gets there. > > This now runs each child process' global destructors, which makes trace.json "work": we get a trace of whichever child process finishes last. It's a start. > > Change-Id: I0cc2b12592f0f79e73a43a160b9fd06dba1fee25 > Reviewed-on: https://skia-review.googlesource.com/26800 > Commit-Queue: Mike Klein <mtklein@chromium.org> > Reviewed-by: Brian Osman <brianosman@google.com> TBR=mtklein@chromium.org,brianosman@google.com Change-Id: I695dddaab3b5a51e4698bb7222fc723b544a1d64 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/26943 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Fix viewer state that has empty state/optionGravatar Yuqian Li2017-07-26
| | | | | | | | | | | | | If the value or option is empty (as was for kInstancedRenderingStateName), our Android Java application will throw exception and skip the remaining state objects. That would result in missing "Softkeys" and "FPS" for Raster backend in Android Viewer app. Bug: skia: Change-Id: I6f600bbb94509ca5389eac2d681304a00427ecdb Reviewed-on: https://skia-review.googlesource.com/26527 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* add Make factory to SkMemoryStream (simplify call-sites)Gravatar Mike Reed2017-07-26
| | | | | | | | Bug: skia:6888 Change-Id: Ia4e432673ed089a91229697c8dde0489f220000d Reviewed-on: https://skia-review.googlesource.com/26884 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Automatically prepend "disabled-by-default-" to TRACE categoriesGravatar Brian Osman2017-07-26
| | | | | | | | | | | Ensures that all Skia events are disabled by default in Chrome, and eliminates redundant typing. Bug: skia: Change-Id: I289c5e5a01084fcf4cccf512da65a4727f4aeca2 Reviewed-on: https://skia-review.googlesource.com/26880 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* ok, exit() child processes instead of _exit()Gravatar Mike Klein2017-07-26
| | | | | | | | | | | We want the atexit() hook to print deferred logs (crash dumps, etc.) only when the main, parent process exits. Ending the child processes with _exit() instead of exit() avoids calling atexit() hooks, but also global destructors. This is more complex than we need: we can just print before main() exits. Only the main, parent process gets there. This now runs each child process' global destructors, which makes trace.json "work": we get a trace of whichever child process finishes last. It's a start. Change-Id: I0cc2b12592f0f79e73a43a160b9fd06dba1fee25 Reviewed-on: https://skia-review.googlesource.com/26800 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
* New analytic AA scan converter using delta (I call it DAA for now)Gravatar Yuqian Li2017-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DAA is: 1. Much simpler than AAA. SkScan_AAAPath.cpp is about 1700 lines. SkScan_DAAPath.cpp is about 300 lines. The whole DAA CL is only about 800 lines. 2. Much faster than AAA for complicated paths. The speedup applies to GL backend (including ccpr)! Here's the frame time of 'SampleApp --slide Chart' on macbook pro: AAA-raster: 33ms DAA-raster: 21ms AAA-gl: 30ms DAA-gl: 20ms AAA-ccpr: 18ms DAA-ccpr: 12ms My linux desktop doesn't have SSE3 so the speedup is smaller (~25% for Chart). I believe that DAA is so fast that I can enable it for any paths (AAA is not enabled by default for complicated paths because it is slow; hence our older supersampling scan converter is used for stroking on Chart for AAA-xxx config.) 3. The SkCoverageDelta is suitable for threaded backend with out-of-order concurrent scan conversion as commented in the source code. Maybe we can also just send deltas to GPU. 4. Similar to most analytic path renderers, the quality is on the best ground-truth level, unless there are intersections within a pixel. The intersections look good to my eyes although theoretically that could be arbitrary far from the ground truth (see my AAA slides). 5. For simple paths, such as circle, triangle, rrect, etc., DAA is slower than AAA. But DAA is faster than our older supersampling scan converter in most cases. As those simple paths usually don't constitute the bottleneck of a picture (skp or svg), I strongly recommend use DAA. 6. DAA also heavily favors blitMask so it may work quite well with SkRasterPipeline and SkRasterPipelineBlitter. Finally, please check https://skia-review.googlesource.com/c/22420/ which accelerate DAA by specializing blitCoverageDeltas for SkARGB32_Blitter and SkARGB32_Black_Blitter. It brings a little(<5%) speedup. But I couldn't figure out how to reduce the duplicate code so I don't intend to land it. Bug: skia: Change-Id: I3b7ed6a727447922e645b1acb737a506e7c09a4c Reviewed-on: https://skia-review.googlesource.com/19666 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* use unique_ptr for codec factoriesGravatar Mike Reed2017-07-25
| | | | | | | | | | Will need guards for android (at least) Bug: skia: Change-Id: I2bb8e656997984489ef1f2e41cd3d301c4e7b947 Reviewed-on: https://skia-review.googlesource.com/26040 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Add Make[backend] calls for creating GrContextsGravatar Greg Daniel2017-07-25
| | | | | | | | | Docs-Preview: https://skia.org/?cl=26369 Bug: skia: Change-Id: I460ee63e466f85b05918479f068a2e5ca2d70550 Reviewed-on: https://skia-review.googlesource.com/26369 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* sprinkle more tracing in GM, tests, and ok, and add TRACE_FUNCGravatar Mike Klein2017-07-24
| | | | | | | Change-Id: I562d438bd65e9fd900cfc6831f971b4af25c8ae6 Reviewed-on: https://skia-review.googlesource.com/26361 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* ok, basic tracing supportGravatar Mike Klein2017-07-24
| | | | | | | | | | | | | | | | | | | | | | | | | | This doesn't do anything in the default process-per-task mode, because those child tasks exit using _exit(), which doesn't trigger the event tracer destructor to flush. I don't remember exactly why I exit with _exit(), so I'm going to have to follow up on that. But written this way as I think I'm at least initializing the tracing in the right place for each process for the future. In threaded (-j -1) and serial (-j 0) modes, everything seems to work great. I'm also thinking I might add a tracer like the SkDebugf tracer but using ok_log(), which handles interlaced logging from concurrent tasks better than vanilla SkDebugf. Example: ninja -C out ok; and out/ok gm 8888 filter:search=fontmgr_bounds trace -j -1 Change-Id: Ia3cdad930ce65e6fd12fa74f3fb00894e35138d3 Reviewed-on: https://skia-review.googlesource.com/26350 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* ok, do not print time or memory use for skipped testsGravatar Mike Klein2017-07-24
| | | | | | | Change-Id: I6feb4924ab67e1da08f923315ef6d3a580881b23 Reviewed-on: https://skia-review.googlesource.com/26340 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Faster, thread-safe implementationGravatar Brian Osman2017-07-24
| | | | | | | | | Bug: skia: Change-Id: I401c5a9885c348aa424ab07b094acecddb209490 Reviewed-on: https://skia-review.googlesource.com/25860 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* add suggested decode color type to colorspaceinfoGravatar Mike Klein2017-07-24
| | | | | | | | | | | | | | | | | E.g. ~/skia (decode-as|✚1…) $ ninja -C out/ colorspaceinfo; and out/colorspaceinfo --input ~/Downloads/prophoto.png ninja: Entering directory `out/' [2/2] link colorspaceinfo SkCodec would naturally decode as colorType=RGBA_8888 Color Profile Description: "Google/Skia/215028B4833C240E0583AFE600C80A79" ... Change-Id: Id36efadaa84e9ffa5d67153e074be8a8426b6c42 Reviewed-on: https://skia-review.googlesource.com/26140 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* have resources return unique_ptr for streamGravatar Mike Reed2017-07-23
| | | | | | | | Bug: skia: Change-Id: I649f4435d06704a5a581a481fe3c46b6ec677baf Reviewed-on: https://skia-review.googlesource.com/26041 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Tracing cleanup and bugfixesGravatar Brian Osman2017-07-21
| | | | | | | | | | | | | | | | TraceID was unused, remove it. Simplify casting logic by using the same union helper as the macros. This fixes a bug that was present in the bool handling - we were treating the union value as a pointer, so we were dereferencing random stack memory. Luckily it never crashes, we did get the wrong values for bools. Bug: skia: Change-Id: I15d44756214f34c1f6479980d9a487ac7f3d8f6c Reviewed-on: https://skia-review.googlesource.com/25801 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Add strikeout font metrics.Gravatar Ben Wagner2017-07-21
| | | | | | | | | | | | | | This also updates create_test_font so that it can be built, compiles, and uses SkFontStyle instead of SkTypeface::Style. BUG=b/63669723 Change-Id: I6eb0f851853f4721cf8e5052255b5b6750c3257f Reviewed-on: https://skia-review.googlesource.com/24740 Reviewed-by: Cary Clark <caryclark@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Ben Wagner <bungeman@google.com>
* Add category support to JSON and SkDebugf tracingGravatar Brian Osman2017-07-21
| | | | | | | | Bug: skia: Change-Id: I4d0bdb9d954e49b79ace0552d7b74b36a512c00d Reviewed-on: https://skia-review.googlesource.com/25642 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
* First stab at JSON event tracerGravatar Brian Osman2017-07-20
| | | | | | | | | | | | | | | | | | | | Not yet thread safe (so it forces threading off). Builds JSON on the fly, so overhead is certainly bad. Plan to fix all of that, but this at least "works". There is now one tracing flag: 'trace'. - 'debugf' installs the SkDebugf tracer. - 'atrace' installs the Android ATrace tracer. - Any other value is interpreted as a filename, and produces a JSON file for chrome://tracing. All three modes work in DM, nanobench, and Viewer. Bug: skia: Change-Id: I3fbc22382b99418a508c670be2770195c0a1c364 Reviewed-on: https://skia-review.googlesource.com/24781 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* convert over to 2d-modeGravatar Mike Klein2017-07-20
| | | | | | | | | | | | [√] convert all stages to use SkJumper_MemoryCtx / be 2d-compatible [√] convert compile to 2d also, remove 1d run/compile [√] convert all call sites [√] no diffs Change-Id: I3b806eb8fe0c3ec043359616409f7cd1211a1e43 Reviewed-on: https://skia-review.googlesource.com/24263 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Remove GrBackendTextureDescGravatar Brian Salomon2017-07-20
| | | | | | | Change-Id: I2b123d1782400e97ab2ce2f11e3e3d325a13e6c8 Reviewed-on: https://skia-review.googlesource.com/24748 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Update gpu caps for valid sample counts.Gravatar Greg Daniel2017-07-19
| | | | | | | | | | | | Instead of query and maxSampleCount and using that to cap, we now have each config store its supported values and when requested returns either the next highest or equal supported value, or if non the max config supported. Bug: skia: Change-Id: I8802d44c13b3b1703ee54a7e69b82102d4b8dc2d Reviewed-on: https://skia-review.googlesource.com/24302 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Remove GrLegacyMeshDrawOp and GrPipelineBuilderGravatar Brian Salomon2017-07-19
| | | | | | | Change-Id: Ib301a0e7d4b4c4f05417d28862017307949748c9 Reviewed-on: https://skia-review.googlesource.com/23584 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Add SkDebugf trace event handler.Gravatar Brian Salomon2017-07-19
| | | | | | | | | Also adds more trace events to GPU backend. Change-Id: Ifa5f0cd4b1fd582f0cc30d37d9e6414dc498c75d Reviewed-on: https://skia-review.googlesource.com/24622 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Remove GrAnalyticRectOp, the last legacy GrMeshDrawOpGravatar Brian Salomon2017-07-19
| | | | | | | Change-Id: I2b8d1f4c1585af4a157d269a526874bccc74ac81 Reviewed-on: https://skia-review.googlesource.com/23484 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Revert "Revert "Make GrAtlasTextOp a non-legacy GrMeshDrawOp""Gravatar Brian Salomon2017-07-19
| | | | | | | | | | | | | This reverts commit e3e9628ecf863f433f26bf6107d6a39ced57fe30. Adds blendmode_mask_* benchs to blacklist for Chromecast. Otherwise a clean revert of the revert. Bug: skia: Change-Id: I9f64ae55804fa4aad97c1785834281039570c56c Reviewed-on: https://skia-review.googlesource.com/24409 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Do not move over webpage archives, they are needed for capturing SKPsGravatar Ravi Mistry2017-07-18
| | | | | | | | | NoTry: true Bug: skia:6850 Change-Id: I35ac2c10ae58561ab5424033d9bb5e14b75c526f Reviewed-on: https://skia-review.googlesource.com/24327 Commit-Queue: Ravi Mistry <rmistry@google.com> Reviewed-by: Eric Boren <borenet@google.com>
* guard references to SkColorTableGravatar Mike Reed2017-07-18
| | | | | | | | Bug: skia:6828 Change-Id: I0c8c78e70b118f51cb59dc45675e4ddcd4776108 Reviewed-on: https://skia-review.googlesource.com/24260 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>