aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/remote_demo.cpp
Commit message (Collapse)AuthorAge
* fonts: Reland push font remoting.Gravatar Khushal2018-05-02
| | | | | | | | | | | | | | | | | | | This relands the following changes: 1) https://skia-review.googlesource.com/c/skia/+/120283 2) https://skia-review.googlesource.com/c/skia/+/125029 3) https://skia-review.googlesource.com/c/skia/+/125140 The original changes had to be reverted due to a memory leak in SkBaseDevice from SkTextBlobCacheDiffCanvas. This has been addressed by https://skia-review.googlesource.com/c/skia/+/125160 TBR=herb@google.com Bug: skia:7515, 831354 Change-Id: I73f4fcb1c397f31bf01553ff48c71ed2d6dd0770 Reviewed-on: https://skia-review.googlesource.com/125326 Commit-Queue: Khusal Sagar <khushalsagar@chromium.org> Reviewed-by: Khusal Sagar <khushalsagar@chromium.org>
* Revert "fonts: Set up remote glyph caching to push fonts."Gravatar Mike Klein2018-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 101d56359a5a5dc3b8a2a4149ac171e25eb0bec0. Reason for revert: 5 of 5 Original change's description: > fonts: Set up remote glyph caching to push fonts. > > Currently the SkStrikeClient is designed to pull fonts from the server > on demand, and to pre-fetch a batched request by analyzing the ops using > a SkTextBlobCacheDiffCanvas. This change modifies the design to support > a push based model, where the server pushes fonts required by the client > and sets up the requisite SkGlyphCaches on the client prior to > rasterizing the ops. > > This model still relies on the SkTextBlobCacheDiffCanvas for analyzing > the glyphs required for rasterizing an op. The glyph caches required for > raster are locked and missing glyphs to be sent to the client are tracked > by the SkStrikeServer. The embedder can serialize this font data at any > point, but must ensure that this data is deserialized by the > SkStrikeClient at the remote end, before rasterizing any ops analyzed > prior to serialization. Any refs on the caches are released once the > font data is serialized by the server. > > The locking of glyph caches relies on the embedder providing discardable > handles. These handles can be created on the server and serialized to be > sent to the client, and map to an instance of SkGlyphCache. This allows > the server to control the lifetime of the caches on the client. > > Bug: skia:7515 > Change-Id: Id39f346b47b60899778404bbd0429ee811d0e53b > Reviewed-on: https://skia-review.googlesource.com/120283 > Commit-Queue: Khusal Sagar <khushalsagar@chromium.org> > Reviewed-by: Herb Derby <herb@google.com> TBR=mtklein@google.com,herb@google.com,khushalsagar@chromium.org Change-Id: If72caf968ddcbf70b8b9d71782a2339a118ed202 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7515 Reviewed-on: https://skia-review.googlesource.com/125264 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* fonts: Set up remote glyph caching to push fonts.Gravatar Khushal2018-05-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the SkStrikeClient is designed to pull fonts from the server on demand, and to pre-fetch a batched request by analyzing the ops using a SkTextBlobCacheDiffCanvas. This change modifies the design to support a push based model, where the server pushes fonts required by the client and sets up the requisite SkGlyphCaches on the client prior to rasterizing the ops. This model still relies on the SkTextBlobCacheDiffCanvas for analyzing the glyphs required for rasterizing an op. The glyph caches required for raster are locked and missing glyphs to be sent to the client are tracked by the SkStrikeServer. The embedder can serialize this font data at any point, but must ensure that this data is deserialized by the SkStrikeClient at the remote end, before rasterizing any ops analyzed prior to serialization. Any refs on the caches are released once the font data is serialized by the server. The locking of glyph caches relies on the embedder providing discardable handles. These handles can be created on the server and serialized to be sent to the client, and map to an instance of SkGlyphCache. This allows the server to control the lifetime of the caches on the client. Bug: skia:7515 Change-Id: Id39f346b47b60899778404bbd0429ee811d0e53b Reviewed-on: https://skia-review.googlesource.com/120283 Commit-Queue: Khusal Sagar <khushalsagar@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* Remove all notion of transport from the API - V2.Gravatar Herb Derby2018-04-16
| | | | | | | | | | | | There is only a need to pass buffers in and out of the system. All transport is external to the system. BUG=skia:7515 Change-Id: Ie50cbc3fa1b9776e56dab8e49e91ce640e0b3954 Reviewed-on: https://skia-review.googlesource.com/119893 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Revert "Remove all notion of transport from the API."Gravatar Herb Derby2018-04-08
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4961a938586e3c46cf80f15ecb70a011324bfe59. Reason for revert: Breaks MSVC Original change's description: > Remove all notion of transport from the API. > > There is only a need to pass buffers in and out of the system. > All transport is external to the system. > > Change-Id: I26dfc8e0b4cce9969395c96d5230078e7dca3f3d > Reviewed-on: https://skia-review.googlesource.com/119062 > Commit-Queue: Herb Derby <herb@google.com> > Reviewed-by: Khushal Sagar <khushalsagar@google.com> TBR=herb@google.com,reed@google.com,khushalsagar@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I62cbac1be4483702ba7464822d93fb9f818f88b7 Reviewed-on: https://skia-review.googlesource.com/119580 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Remove all notion of transport from the API.Gravatar Herb Derby2018-04-06
| | | | | | | | | | There is only a need to pass buffers in and out of the system. All transport is external to the system. Change-Id: I26dfc8e0b4cce9969395c96d5230078e7dca3f3d Reviewed-on: https://skia-review.googlesource.com/119062 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Khushal Sagar <khushalsagar@google.com>
* Clean up buffering and serializatoin.Gravatar Herb Derby2018-04-04
| | | | | | | | | BUG=skia:7515 Change-Id: Id580e8f464c6263fa32a5d6347f505b00bba29d7 Reviewed-on: https://skia-review.googlesource.com/118460 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Various cleanup to remote_demoGravatar Herb Derby2018-03-27
| | | | | | | | | | | | | Integrate SkRemoteGlyphCacheRenderer into SkStrikeServer Add a Timer. Remove unused code. BUG=skia:7515 Change-Id: Idffb477af71cbcc4035df190e29e8910b61aa6e5 Reviewed-on: https://skia-review.googlesource.com/116485 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Move cache difference code into remote cache filesGravatar Herb Derby2018-03-26
| | | | | | | | | BUG=skia:7515 Change-Id: I59e75d460b4ed4d0a737c833520b2335808a4ce4 Reviewed-on: https://skia-review.googlesource.com/115706 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Regularize SkGlyphCache creation.Gravatar Herb Derby2018-03-20
| | | | | | | | | | | | | This allows no need for downcasting for specialized use of SkScalerContext for the remote case. This allows cache priming to be used in a single process. BUG=skia:7515 Change-Id: I963a50e36af9deef5a3414fc8a4c94ccfc38deaf Reviewed-on: https://skia-review.googlesource.com/115121 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Apply filterTextFlags so the fonts are the same.Gravatar Herb Derby2018-03-16
| | | | | | | | | | | | | | | | | | In order to apply filterTextFlags correctly, teach TrackLayerDevice how to process save and restore layers. At this point, I don't see any other traffic than the cache warming traffic. This code has a performance between 82% and 105% of just drawing the picture. BUG=skia:7515 Change-Id: I44736be46884f18b6d120d4b5ca582f34dbdff0f Reviewed-on: https://skia-review.googlesource.com/114641 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Add glyph cache warming - prototypeGravatar Herb Derby2018-03-14
| | | | | | | | | | | | | | | | | A system for prewarming the cache using a single "RPC" This improve performance by ~5X. This is a checkin of rough code so I can use small changes clean it up. BUG=skia:7515 Change-Id: Id0192b4f533c257b0a7eea0170b1e25c336d6432 Reviewed-on: https://skia-review.googlesource.com/105440 Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Collapse metrics and image into a single call.Gravatar Herb Derby2018-02-05
| | | | | | | | | BUG=skia:7515 Change-Id: I518f6010a2f6265666de22f0eaa021f2e330ceaa Reviewed-on: https://skia-review.googlesource.com/103023 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Generate cache traffic each iterationGravatar Herb Derby2018-02-05
| | | | | | | | | | | | | | | The old timing system would generate cache traffic for the first drawing of the picture caching everyting on the GPU side. Further iterations would just use the cache. This change forces cache traffic to be generated each iteration. BUG=skia:7515 Change-Id: I0d857e123796cdc7d655634446082598bef3f962 Reviewed-on: https://skia-review.googlesource.com/103021 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Herb Derby <herb@google.com>
* Consolidate all the id handling and caching code.Gravatar Herb Derby2018-02-01
| | | | | | | | | BUG=skia:7515 Change-Id: Iab31e8cadfaa1ce09d85aab9cc84a3e614ea5e45 Reviewed-on: https://skia-review.googlesource.com/100420 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Herb Derby <herb@google.com>
* Fix typeface duplication problem.Gravatar Herb Derby2018-01-26
| | | | | | | | | | | | | | | This makes the prototype twice as fast. The code was creating a new SkTypefaceProxy each time any SkFontid was received. This caused the unique id on the SkTypeface base class to increment. Therefore every string of characters got a new descriptor. BUG=skia:7515 Change-Id: I2d31f79a7ad119fed246fd5b39fd55759d919554 Reviewed-on: https://skia-review.googlesource.com/99980 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Add cache for handling of contexts.Gravatar Herb Derby2018-01-25
| | | | | | | | | | | | | | | | Added scaler context cache on the Renderer side that maps descriptors to scaler contexts. Added preliminary timing code. Remove unused print statements. BUG=skia:7515 Change-Id: I156ba656aab113e0ceae0c2ea0f9f3c1d3d61d6a Reviewed-on: https://skia-review.googlesource.com/99540 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Herb Derby <herb@google.com>
* Start of cross process SkScalerContext.Gravatar Mike Klein2018-01-24
Change-Id: I16d9293cbc0bef1bdce1260d1bd9b43d8853d070 Reviewed-on: https://skia-review.googlesource.com/93641 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Herb Derby <herb@google.com>