aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/text/GrTextBlobCache.cpp
Commit message (Collapse)AuthorAge
* Reland "Make GPU cache invalidation SkMessageBus messages go to one GrContext."Gravatar Brian Salomon2018-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | This is a reland of f4c5bb9aba485aa47c27b15905d81992b7cf4707 Original change's description: > Make GPU cache invalidation SkMessageBus messages go to one GrContext. > > Makes it so the template param to SkMessageBus must implement: > bool shouldSend(uint32_t inboxID) const > > Updates all GPU backend message types to only go to the GrContext that > is adding a cache entry. > > Bug: skia: > Change-Id: I3e8a4eb90654b7b8ac57cac9fb508c0ef1d51058 > Reviewed-on: https://skia-review.googlesource.com/140220 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Reviewed-by: Jim Van Verth <jvanverth@google.com> Bug: skia: Change-Id: I8402bfe3ed0170c99936d47050458817030b473b Reviewed-on: https://skia-review.googlesource.com/140801 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Make GPU cache invalidation SkMessageBus messages go to one GrContext."Gravatar Brian Salomon2018-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f4c5bb9aba485aa47c27b15905d81992b7cf4707. Reason for revert: Accidentally submitted without CQ Original change's description: > Make GPU cache invalidation SkMessageBus messages go to one GrContext. > > Makes it so the template param to SkMessageBus must implement: > bool shouldSend(uint32_t inboxID) const > > Updates all GPU backend message types to only go to the GrContext that > is adding a cache entry. > > Bug: skia: > Change-Id: I3e8a4eb90654b7b8ac57cac9fb508c0ef1d51058 > Reviewed-on: https://skia-review.googlesource.com/140220 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Reviewed-by: Jim Van Verth <jvanverth@google.com> TBR=jvanverth@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: Iadb667d8027341703d254325320ddaa528fb33a1 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/140800 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Make GPU cache invalidation SkMessageBus messages go to one GrContext.Gravatar Brian Salomon2018-07-11
| | | | | | | | | | | | | | Makes it so the template param to SkMessageBus must implement: bool shouldSend(uint32_t inboxID) const Updates all GPU backend message types to only go to the GrContext that is adding a cache entry. Bug: skia: Change-Id: I3e8a4eb90654b7b8ac57cac9fb508c0ef1d51058 Reviewed-on: https://skia-review.googlesource.com/140220 Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* Rename GrAtlasTextBlob -> GrTextBlobGravatar Herb Derby2018-05-29
| | | | | | | Change-Id: I61311b48f206890dfd1a20796d7d678cd05ef5a3 Reviewed-on: https://skia-review.googlesource.com/130140 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Remove memory pool use from SkTextBlobCacheGravatar Herb Derby2018-05-24
| | | | | | | | | | Track used size explicitly in the cache enabling DDL to use the LRU. Change-Id: I3fef593e9252172dd160fd7636254550b95ca0a2 Reviewed-on: https://skia-review.googlesource.com/130022 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Update GrTextBlobCache for DDLGravatar Robert Phillips2018-02-15
| | | | | | | | | Although, theoretically, we could update the DDLs to maintain pointers to the GrMemoryPools being used by their GrAtlasTextBlobs this method seems simpler. Change-Id: I4835284630b9cd29eb78cf25bcdfe5c56974a8cb Reviewed-on: https://skia-review.googlesource.com/107345 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* Send TextBlobCache purge messages only to owning cache.Gravatar Jim Van Verth2017-12-14
| | | | | | | | Bug: 703297 Change-Id: I95cdaa5bdebadd5ce88ae3ee468c59baa08353c6 Reviewed-on: https://skia-review.googlesource.com/85046 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Ensure we flush TextBlobCache message queue.Gravatar Jim Van Verth2017-12-13
| | | | | | | | | | | | If we create and delete TextBlobs without actually renderering them, their deletion messages can back up in the message queue. This adds a routine to GrContext to ensure these messages get flushed. Bug: 703297 Change-Id: Icc222373ac2a954dc3b77190cad79070ea562ba2 Reviewed-on: https://skia-review.googlesource.com/82686 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Purge GrTextBlobCache entries on SkTextBlob deletionGravatar Florin Malita2017-03-14
| | | | | | | | | Similar to the SkImage purge mechanism. Change-Id: I0b7fb1bad507a3c7f30a4f7514bedd894d1748ac Reviewed-on: https://skia-review.googlesource.com/9631 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Revert "Revert "Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead ↵Gravatar Florin Malita2017-03-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of raw ptrs"" This reverts commit 3304c447b953dad79fe7f355184ac13ed7e302e0. Reason for revert: Fix for SkTHashMap issue landed Original change's description: > Revert "Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrs" > > This reverts commit db3ceb86421fb9da86bb920e3a1f0957beec08d9. > > Reason for revert: observing some strange budget behavior w/ instrumented Chromium builds; need to investigate. > > Original change's description: > > Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrs > > > > Refactor to store sk_sps, and minimize explicit ref manipulation. > > > > Change-Id: Ie3d18e5fe1cefbbc5c2f3c4941287a24038522a6 > > Reviewed-on: https://skia-review.googlesource.com/9490 > > Commit-Queue: Florin Malita <fmalita@chromium.org> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > > > TBR=bsalomon@google.com,robertphillips@google.com,fmalita@chromium.org,reviews@skia.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: I8ca9862ad1519a9ec69ad1ce8e4d129b0dae7b0a > Reviewed-on: https://skia-review.googlesource.com/9524 > Reviewed-by: Florin Malita <fmalita@google.com> > Commit-Queue: Florin Malita <fmalita@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org,fmalita@chromium.org,fmalita@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I1ba50e3b574381717fbbf46b829d72aceff8f7fe Reviewed-on: https://skia-review.googlesource.com/9535 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Revert "Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrs"Gravatar Florin Malita2017-03-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit db3ceb86421fb9da86bb920e3a1f0957beec08d9. Reason for revert: observing some strange budget behavior w/ instrumented Chromium builds; need to investigate. Original change's description: > Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrs > > Refactor to store sk_sps, and minimize explicit ref manipulation. > > Change-Id: Ie3d18e5fe1cefbbc5c2f3c4941287a24038522a6 > Reviewed-on: https://skia-review.googlesource.com/9490 > Commit-Queue: Florin Malita <fmalita@chromium.org> > Reviewed-by: Brian Salomon <bsalomon@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,fmalita@chromium.org,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I8ca9862ad1519a9ec69ad1ce8e4d129b0dae7b0a Reviewed-on: https://skia-review.googlesource.com/9524 Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Florin Malita <fmalita@google.com>
* Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrsGravatar Florin Malita2017-03-09
| | | | | | | | | Refactor to store sk_sps, and minimize explicit ref manipulation. Change-Id: Ie3d18e5fe1cefbbc5c2f3c4941287a24038522a6 Reviewed-on: https://skia-review.googlesource.com/9490 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Refactor GrTextBlobCacheGravatar Florin Malita2017-03-08
| | | | | | | | | | | Instead of a single-level cache with blob-id-derived key, refactor GrTextBlobCache as a two-level cache with a direct blob-id key (to support efficient lookup by id in future CLs). Change-Id: Idf29c05224faeb04919610a3935572773d5aba03 Reviewed-on: https://skia-review.googlesource.com/9400 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Remove GrTextBlobCache/GrAtlasTextBlob friendlinessGravatar joshualitt2016-02-10
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1686113002 Review URL: https://codereview.chromium.org/1686113002
* cleanup textblob cache sanity check and prevent it from bitrottingGravatar joshualitt2016-02-10
| | | | | | | | TBR=bsalomon@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684513004 Review URL: https://codereview.chromium.org/1684513004
* Add assert that memory pool is empty when GrTextBlobCache freesGravatar joshualitt2016-01-05
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1555993005 Review URL: https://codereview.chromium.org/1555993005
* Move all text stuff to its own folderGravatar joshualitt2015-12-11
BUG=skia: Review URL: https://codereview.chromium.org/1521453002