aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/atlastext
Commit message (Collapse)AuthorAge
* Move one leaf loop from GPU to glyph drawerGravatar Herb Derby2018-07-31
| | | | | | | | | | | | Encapsulate the bitmap inner loop of regenerate in the SkGlyphRunListDrawer. This changed required placing an SkGlyphRunListDrawer in the two TextTargets. Change-Id: I7ef7a2d0074fe898fce4da82d26ea1f47e1f7a98 Reviewed-on: https://skia-review.googlesource.com/144302 Reviewed-by: Jim Van Verth <jvanverth@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Make SkInternalAtlasTextTarget use glyph runsGravatar Herb Derby2018-07-30
| | | | | | | | Change-Id: I14f296c9d394288d2c28ab7f09b17c1a4d1ef49d Reviewed-on: https://skia-review.googlesource.com/144125 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Auto-Submit: Herb Derby <herb@google.com>
* Remove clamping of kPlus with F16 configsGravatar Brian Osman2018-07-11
| | | | | | | | | | | | | | | | | The most common use-case for F16 is to draw things that are explicitly outside of [0,1]. We can't prevent out-of-range values in general, users could just draw out-of-range content in src mode. We've decided that it's best to avoid surprising behavior, and trust the user in these situations. This effectively reverts https://skia-review.googlesource.com/c/skia/+/48183 Bug: skia: Change-Id: I71c2dd925c567e2862d96ab70c752f19245a69c4 Reviewed-on: https://skia-review.googlesource.com/140500 Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Move op memory storage to GrContext (take 2)Gravatar Robert Phillips2018-06-19
| | | | | | | | | | TBR=bsalomon@google.com Change-Id: I4a448694d4114d83cd3a720cfc8bd37de51733d1 Reviewed-on: https://skia-review.googlesource.com/135707 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Move op memory storage to GrContext"Gravatar Robert Phillips2018-06-15
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c8cee446bf9c07da8848bbd032abf26e79966ac1. Reason for revert: TSAN issues Original change's description: > Move op memory storage to GrContext > > TBR=bsalomon@google.com > Change-Id: Ifa95bf0073b9d948f2c937d10088b7734b971f90 > Reviewed-on: https://skia-review.googlesource.com/131500 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: Ia0d2b7408314d9b67d57388315376bbea23d3780 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/135181 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Move op memory storage to GrContextGravatar Robert Phillips2018-06-15
| | | | | | | | | TBR=bsalomon@google.com Change-Id: Ifa95bf0073b9d948f2c937d10088b7734b971f90 Reviewed-on: https://skia-review.googlesource.com/131500 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Plumb GrContext everywhereGravatar Robert Phillips2018-06-12
| | | | | | | | | | There is no good way to split the monster CL up. This breaks out the GrContext plumbing but doesn't use it. Change-Id: I90856d428d372bcec3f8821e6364667b367927d4 Reviewed-on: https://skia-review.googlesource.com/133382 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@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>
* Rename GrAtlasTextContext -> GrTextContextGravatar Herb Derby2018-05-24
| | | | | | | | Change-Id: I309b39425afc9b45095241eeb299096bc426afed Reviewed-on: https://skia-review.googlesource.com/130029 Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Make GrCaps and GrShaderCaps private.Gravatar Brian Salomon2018-05-11
| | | | | | | | | Moves getCaps() from GrContext to GrContextPriv and removes unused refCaps(). Change-Id: Ic6a8951b656c0d1b2773eae73bff8e88af819866 Reviewed-on: https://skia-review.googlesource.com/127389 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* move SkIPoint16 to private headerGravatar Mike Reed2018-04-04
| | | | | | | | | Bug: skia: Change-Id: Ib8045ac7cc24a44c4b70e73153c6faf098730b63 Reviewed-on: https://skia-review.googlesource.com/118721 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Cary Clark <caryclark@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Remove SkAutoGlyphCache decls that happen to workGravatar Herb Derby2018-03-22
| | | | | | | | | | ...and fix sample code. Change-Id: I673770125064f8451e3d88ec4929a68409935ad1 Reviewed-on: https://skia-review.googlesource.com/115995 Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Remove GrRestrictedAtlasManagerGravatar Robert Phillips2018-03-08
| | | | | | | | | Philosophically this relies on: https://skia-review.googlesource.com/c/skia/+/111807 (Revise Text & Small Path Atlas so instantiation failure is handled at flush time) Change-Id: I4fdcf1af8c5e9ffefdfb973104045f4f5d223a4e Reviewed-on: https://skia-review.googlesource.com/112702 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revise Text & Small Path Atlas so instantiation failure is handled at flush timeGravatar Robert Phillips2018-03-07
| | | | | | | | | This paves the way to having the AtlasTextOps not need the RestrictedAtlasManager at op creation time. Change-Id: I1028faba730d50d3d3349a4c0809465d036ed611 Reviewed-on: https://skia-review.googlesource.com/111807 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Fission GrAtlasGlyphCache in two (take 2)Gravatar Robert Phillips2018-03-01
| | | | | | | | | | | | | | | | | | | | | Reland all the things This CL splits the old GrAtlasGlyphCache into a GrAtlasGlyphCache and an GrAtlasManager. The GrAtlasManager itself is split into a rather limited base class (GrRestrictedAtlasManager) and the all powerful GrAtlasManager. The GrRestrictedAtlasManager is available at op creation time and provides access to the proxies backing the atlases. The full GrAtlasManager is only available at flush time and allows instantiation of the proxies and uploading to them. In the DDL world all of the DDL Contexts will receive a GrRestrictedAtlasManager-version of the GrAtlasManager in the main thread. This future atlas manager will have had all of its GrDrawOpAtlases created (but not instantiated) so there should be no race conditions. TBR=jvanverth@google.com Change-Id: I05c6cd8d301bf2decca39765e5cae62993d9da04 Reviewed-on: https://skia-review.googlesource.com/111362 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Separate creation time & flush time behavior in GrDrawOpAtlas (take 3)Gravatar Robert Phillips2018-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | This CL clarifies what is going on in the GrDrawOpAtlas and GrAtlasGlyphCache. For the GrDrawOpAtlas: At creation time all the allowed pages are created (with their backing GrTextureProxies) but they aren't instantiated. The GrDrawOpAtlas::instantiate call is called in preFlushCB and allocates any pages known to be needed at the start of flush GrDrawOpAtlas::addToAtlas is called at flush time and, if a new page is activated, will instantiated it at that time. During compaction, an unused page will be deInstantiated but its Plots and backing GrTextureProxy will remain alive. The GrAtlasGlyphCache reflects the changes to the GrDrawOpAtlas It now carries a GrProxyProvider for when it needs to create an atlas It passes in a GrResourceProvider* at flush time to allow instantiation. It does not, yet, allocate that GrDrawOpAtlases it might ever require. TBR=bsalomon@google.com Change-Id: I276d339d81e7b709140e082a7b58c5584f73ab70 Reviewed-on: https://skia-review.googlesource.com/111100 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* Revert "Revert "Revert "Separate creation time & flush time behavior in ↵Gravatar Robert Phillips2018-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GrDrawOpAtlas (take 2)""" This reverts commit 934c3d0c548d254a0d986963ee751caf0ffcb500. Reason for revert: Chrome Original change's description: > Revert "Revert "Separate creation time & flush time behavior in GrDrawOpAtlas (take 2)"" > > This reverts commit 84d823a5e2a03b09f7db4964218b9e04e821c878. > > Reason for revert: The DFT diffs don't repro on Windows so I'm chalking it up to minor device differences > > Original change's description: > > Revert "Separate creation time & flush time behavior in GrDrawOpAtlas (take 2)" > > > > This reverts commit 96165ebeaa36a2aae0eedaf12d81f53d3caf999a. > > > > Reason for revert: DFT GMs w/ LCD text are slightly different > > > > Original change's description: > > > Separate creation time & flush time behavior in GrDrawOpAtlas (take 2) > > > > > > This CL clarifies what is going on in the GrDrawOpAtlas and GrAtlasGlyphCache. > > > > > > For the GrDrawOpAtlas: > > > At creation time all the allowed pages are created (with their backing GrTextureProxies) but they aren't instantiated. > > > > > > The GrDrawOpAtlas::instantiate call is called in preFlushCB and allocates any pages known to be needed at the start of flush > > > > > > GrDrawOpAtlas::addToAtlas is called at flush time and, if a new page is activated, will instantiated it at that time. > > > > > > During compaction, an unused page will be deInstantiated but its Plots and backing GrTextureProxy will remain alive. > > > > > > The GrAtlasGlyphCache reflects the changes to the GrDrawOpAtlas > > > It now carries a GrProxyProvider for when it needs to create an atlas > > > It passes in a GrResourceProvider* at flush time to allow instantiation. > > > > > > It does not, yet, allocate that GrDrawOpAtlases it might ever require. > > > > > > Change-Id: Ie9b64b13e261b01ee14be09fbf7e17841b7781dc > > > Reviewed-on: https://skia-review.googlesource.com/109749 > > > Reviewed-by: Jim Van Verth <jvanverth@google.com> > > > Commit-Queue: Robert Phillips <robertphillips@google.com> > > > > TBR=jvanverth@google.com,robertphillips@google.com > > > > Change-Id: I62efc61c8394477e54d6e79fa2f65180c91a4515 > > No-Presubmit: true > > No-Tree-Checks: true > > No-Try: true > > Reviewed-on: https://skia-review.googlesource.com/110220 > > Reviewed-by: Robert Phillips <robertphillips@google.com> > > Commit-Queue: Robert Phillips <robertphillips@google.com> > > TBR=jvanverth@google.com,robertphillips@google.com > > Change-Id: I7c87b4523f9b53285f0de5c2d741a25893522d9a > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/110221 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=jvanverth@google.com,robertphillips@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I7dd73ab0159f38595f21b21eef3becc10aa0934d Reviewed-on: https://skia-review.googlesource.com/111080 Reviewed-by: Robert Phillips <robertphillips@google.com>
* Revert "Fission GrAtlasGlyphCache in two"Gravatar Robert Phillips2018-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit acf17904d6286f2a63a5d895541804d0ea1be646. Reason for revert: Chrome Original change's description: > Fission GrAtlasGlyphCache in two > > This CL splits the old GrAtlasGlyphCache into a GrAtlasGlyphCache and an GrAtlasManager. > > The GrAtlasManager itself is split into a rather limited base class (GrRestrictedAtlasManager) > and the all powerful GrAtlasManager. The GrRestrictedAtlasManager is available at op creation > time and provides access to the proxies backing the atlases. The full GrAtlasManager is > only available at flush time and allows instantiation of the proxies and uploading to them. > > In the DDL world all of the DDL Contexts will receive a GrRestrictedAtlasManager-version of the > GrAtlasManager in the main thread. This future atlas manager will have had all of its > GrDrawOpAtlases created (but not instantiated) so there should be no race conditions. > > Change-Id: I9967d3a4116af50128f390c5039a712b8cd4db08 > Reviewed-on: https://skia-review.googlesource.com/108001 > Commit-Queue: 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: I7c760ea1a9f041a310b96d552aa1497ee5902cd8 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/111040 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Fission GrAtlasGlyphCache in twoGravatar Robert Phillips2018-02-27
| | | | | | | | | | | | | | | | | | This CL splits the old GrAtlasGlyphCache into a GrAtlasGlyphCache and an GrAtlasManager. The GrAtlasManager itself is split into a rather limited base class (GrRestrictedAtlasManager) and the all powerful GrAtlasManager. The GrRestrictedAtlasManager is available at op creation time and provides access to the proxies backing the atlases. The full GrAtlasManager is only available at flush time and allows instantiation of the proxies and uploading to them. In the DDL world all of the DDL Contexts will receive a GrRestrictedAtlasManager-version of the GrAtlasManager in the main thread. This future atlas manager will have had all of its GrDrawOpAtlases created (but not instantiated) so there should be no race conditions. Change-Id: I9967d3a4116af50128f390c5039a712b8cd4db08 Reviewed-on: https://skia-review.googlesource.com/108001 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* Revert "Revert "Separate creation time & flush time behavior in ↵Gravatar Robert Phillips2018-02-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GrDrawOpAtlas (take 2)"" This reverts commit 84d823a5e2a03b09f7db4964218b9e04e821c878. Reason for revert: The DFT diffs don't repro on Windows so I'm chalking it up to minor device differences Original change's description: > Revert "Separate creation time & flush time behavior in GrDrawOpAtlas (take 2)" > > This reverts commit 96165ebeaa36a2aae0eedaf12d81f53d3caf999a. > > Reason for revert: DFT GMs w/ LCD text are slightly different > > Original change's description: > > Separate creation time & flush time behavior in GrDrawOpAtlas (take 2) > > > > This CL clarifies what is going on in the GrDrawOpAtlas and GrAtlasGlyphCache. > > > > For the GrDrawOpAtlas: > > At creation time all the allowed pages are created (with their backing GrTextureProxies) but they aren't instantiated. > > > > The GrDrawOpAtlas::instantiate call is called in preFlushCB and allocates any pages known to be needed at the start of flush > > > > GrDrawOpAtlas::addToAtlas is called at flush time and, if a new page is activated, will instantiated it at that time. > > > > During compaction, an unused page will be deInstantiated but its Plots and backing GrTextureProxy will remain alive. > > > > The GrAtlasGlyphCache reflects the changes to the GrDrawOpAtlas > > It now carries a GrProxyProvider for when it needs to create an atlas > > It passes in a GrResourceProvider* at flush time to allow instantiation. > > > > It does not, yet, allocate that GrDrawOpAtlases it might ever require. > > > > Change-Id: Ie9b64b13e261b01ee14be09fbf7e17841b7781dc > > Reviewed-on: https://skia-review.googlesource.com/109749 > > Reviewed-by: Jim Van Verth <jvanverth@google.com> > > Commit-Queue: Robert Phillips <robertphillips@google.com> > > TBR=jvanverth@google.com,robertphillips@google.com > > Change-Id: I62efc61c8394477e54d6e79fa2f65180c91a4515 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/110220 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=jvanverth@google.com,robertphillips@google.com Change-Id: I7c87b4523f9b53285f0de5c2d741a25893522d9a No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/110221 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Separate creation time & flush time behavior in GrDrawOpAtlas (take 2)"Gravatar Robert Phillips2018-02-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 96165ebeaa36a2aae0eedaf12d81f53d3caf999a. Reason for revert: DFT GMs w/ LCD text are slightly different Original change's description: > Separate creation time & flush time behavior in GrDrawOpAtlas (take 2) > > This CL clarifies what is going on in the GrDrawOpAtlas and GrAtlasGlyphCache. > > For the GrDrawOpAtlas: > At creation time all the allowed pages are created (with their backing GrTextureProxies) but they aren't instantiated. > > The GrDrawOpAtlas::instantiate call is called in preFlushCB and allocates any pages known to be needed at the start of flush > > GrDrawOpAtlas::addToAtlas is called at flush time and, if a new page is activated, will instantiated it at that time. > > During compaction, an unused page will be deInstantiated but its Plots and backing GrTextureProxy will remain alive. > > The GrAtlasGlyphCache reflects the changes to the GrDrawOpAtlas > It now carries a GrProxyProvider for when it needs to create an atlas > It passes in a GrResourceProvider* at flush time to allow instantiation. > > It does not, yet, allocate that GrDrawOpAtlases it might ever require. > > Change-Id: Ie9b64b13e261b01ee14be09fbf7e17841b7781dc > Reviewed-on: https://skia-review.googlesource.com/109749 > Reviewed-by: Jim Van Verth <jvanverth@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=jvanverth@google.com,robertphillips@google.com Change-Id: I62efc61c8394477e54d6e79fa2f65180c91a4515 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/110220 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Separate creation time & flush time behavior in GrDrawOpAtlas (take 2)Gravatar Robert Phillips2018-02-26
| | | | | | | | | | | | | | | | | | | | | | | | This CL clarifies what is going on in the GrDrawOpAtlas and GrAtlasGlyphCache. For the GrDrawOpAtlas: At creation time all the allowed pages are created (with their backing GrTextureProxies) but they aren't instantiated. The GrDrawOpAtlas::instantiate call is called in preFlushCB and allocates any pages known to be needed at the start of flush GrDrawOpAtlas::addToAtlas is called at flush time and, if a new page is activated, will instantiated it at that time. During compaction, an unused page will be deInstantiated but its Plots and backing GrTextureProxy will remain alive. The GrAtlasGlyphCache reflects the changes to the GrDrawOpAtlas It now carries a GrProxyProvider for when it needs to create an atlas It passes in a GrResourceProvider* at flush time to allow instantiation. It does not, yet, allocate that GrDrawOpAtlases it might ever require. Change-Id: Ie9b64b13e261b01ee14be09fbf7e17841b7781dc Reviewed-on: https://skia-review.googlesource.com/109749 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Separate creation time & flush time behavior in GrDrawOpAtlas"Gravatar Robert Phillips2018-02-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 056c1a821afcfbe606615ad1a7d1b554549d0846. Reason for revert: GM issues Original change's description: > Separate creation time & flush time behavior in GrDrawOpAtlas > > This CL clarifies what is going on in the GrDrawOpAtlas and GrAtlasGlyphCache. > > For the GrDrawOpAtlas: > At creation time all the allowed pages are created (with their backing GrTextureProxies) but they aren't instantiated. > > The GrDrawOpAtlas::instantiate call is called in preFlushCB and allocates any pages known to be needed at the start of flush > > GrDrawOpAtlas::addToAtlas is called at flush time and, if a new page is activated, will instantiated it at that time. > > During compaction, an unused page will be deInstantiated but its Plots and backing GrTextureProxy will remain alive. > > The GrAtlasGlyphCache reflects the changes to the GrDrawOpAtlas > It now carries a GrProxyProvider for when it needs to create an atlas > It passes in a GrResourceProvider* at flush time to allow instantiation. > > It does not, yet, allocate that GrDrawOpAtlases it might ever require. > > Change-Id: I54909b7a3ba4bec2db5f1218f6a2a3a1636f66d6 > Reviewed-on: https://skia-review.googlesource.com/108520 > Commit-Queue: 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: I36eafe46209380f533aa84e831d1c9d18844b6be No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/109280 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Separate creation time & flush time behavior in GrDrawOpAtlasGravatar Robert Phillips2018-02-21
| | | | | | | | | | | | | | | | | | | | | | | | This CL clarifies what is going on in the GrDrawOpAtlas and GrAtlasGlyphCache. For the GrDrawOpAtlas: At creation time all the allowed pages are created (with their backing GrTextureProxies) but they aren't instantiated. The GrDrawOpAtlas::instantiate call is called in preFlushCB and allocates any pages known to be needed at the start of flush GrDrawOpAtlas::addToAtlas is called at flush time and, if a new page is activated, will instantiated it at that time. During compaction, an unused page will be deInstantiated but its Plots and backing GrTextureProxy will remain alive. The GrAtlasGlyphCache reflects the changes to the GrDrawOpAtlas It now carries a GrProxyProvider for when it needs to create an atlas It passes in a GrResourceProvider* at flush time to allow instantiation. It does not, yet, allocate that GrDrawOpAtlases it might ever require. Change-Id: I54909b7a3ba4bec2db5f1218f6a2a3a1636f66d6 Reviewed-on: https://skia-review.googlesource.com/108520 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* Pull non-substantive changes out of omnibus CLGravatar Robert Phillips2018-02-21
| | | | | | | | | | These come from: https://skia-review.googlesource.com/c/skia/+/108001 (Fission GrAtlasGlyphCache in two) Bug: skia: Change-Id: Ife15cad018f9ddedec578fcd6aa07da00a77196e Reviewed-on: https://skia-review.googlesource.com/109026 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Change signature of GrAtlasGlyphCache::getProxiesGravatar Robert Phillips2018-02-20
| | | | | | | | | | | Split out of https://skia-review.googlesource.com/c/skia/+/108001 (Fission GrAtlasGlyphCache in two) TBR=bsalomon@google.com Change-Id: I573730fdeddf178915eb5f5b8cf59a3ab29e0654 Reviewed-on: https://skia-review.googlesource.com/108441 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Introduce GrColorTypeGravatar Brian Salomon2018-02-20
| | | | | | | | | | | | | | | | | | This begins the journey towards using different types to refer to CPU data and GPU texture formats. This is one part of removing GrPixelConfig and more directly using GL/VK texture formats GrColorType represents a particular layout of color/gray/alpha channels in CPU memory. It does not refer to texture formats or sRGB-encoding. It is basically SkColorType specialized to the GPU backend with some formats added and some removed. Read/WritePixel interfaces use GrColorType to describe the CPU side of the transaction. There's still a lot of punting to GrPixelConfig in API-specific code. There's a lot more to be done. Bug: 6718 Bug: 7580 Change-Id: I8d813ae9a4416a06596f22a4b87da02091989718 Reviewed-on: https://skia-review.googlesource.com/107264 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Move more internal methods from GrContext to GrContextPriv (take 3)Gravatar Robert Phillips2018-01-22
| | | | | | | | Change-Id: Ied630e61cf95780bf85032867e6ce663e1ef9c2f Reviewed-on: https://skia-review.googlesource.com/98000 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Move more internal methods from GrContext to GrContextPriv (take 2)"Gravatar Leon Scroggins2018-01-20
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c22e50bd317fe3658445c04e18a6e319d746c510. Reason for revert: Speculative fix for Android roll Original change's description: > Move more internal methods from GrContext to GrContextPriv (take 2) > > Change-Id: I47108910517d61edeb52f82793d384fdb5605d45 > Reviewed-on: https://skia-review.googlesource.com/97241 > Commit-Queue: Robert Phillips <robertphillips@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: I3a77ac33c5f48529357cf9c683d5f4cacaa2379f No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/97582 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Move more internal methods from GrContext to GrContextPriv (take 2)Gravatar Robert Phillips2018-01-19
| | | | | | | Change-Id: I47108910517d61edeb52f82793d384fdb5605d45 Reviewed-on: https://skia-review.googlesource.com/97241 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Move more internal methods from GrContext to GrContextPriv"Gravatar Hal Canary2018-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f440cecbfdf1910104f36aedd0e963da2ae8b6a8. Reason for revert: breaking android builds. Original change's description: > Move more internal methods from GrContext to GrContextPriv > > TBR=bsalomon@google.com > Change-Id: Ia8cf0e0d30451c69bc7a08215aafa6abe6e0ddbe > Reviewed-on: https://skia-review.googlesource.com/97080 > Commit-Queue: Robert Phillips <robertphillips@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: If263f8161f0fbe3fc6ee8f34bb09e237705c3694 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/97200 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Move more internal methods from GrContext to GrContextPrivGravatar Robert Phillips2018-01-19
| | | | | | | | TBR=bsalomon@google.com Change-Id: Ia8cf0e0d30451c69bc7a08215aafa6abe6e0ddbe Reviewed-on: https://skia-review.googlesource.com/97080 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Move GrOpFlushState out of GrDrawingManager and onto the stackGravatar Robert Phillips2018-01-18
| | | | | | | Change-Id: If1b3481af7637bfed8a73d75be41c6422319951f Reviewed-on: https://skia-review.googlesource.com/96540 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Add matrix stack to SkAtlasTextTarget.Gravatar Brian Salomon2017-12-20
| | | | | | | | | Makes SkAtlasTextRenderer::SDFVertex now has a 3 component position vector. Change-Id: I7ec1a8068fb84388a82e1748d6e9d02820d55abd Reviewed-on: https://skia-review.googlesource.com/84202 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* Fix SkInternalAtlasTextContext to update advance the flush token after ↵Gravatar Brian Salomon2017-11-30
| | | | | | | | | | | issuing each draw. This was causing SkAtlasTextTarget:flush() calls beyond the first to skip the uploads of glyphs added to the atlas after the first flush(). Change-Id: I291b88d50629e38914d4b6af21fc25d8a41fbd9d Reviewed-on: https://skia-review.googlesource.com/77584 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Batch ops together in SkAtasTextTargetGravatar Brian Salomon2017-11-27
| | | | | | | Change-Id: I7f2b03dd965079f801d66b670bdeb1d01bbf0fd6 Reviewed-on: https://skia-review.googlesource.com/76160 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Require glyph positions in SkAtlasTextTarget::drawTextGravatar Brian Salomon2017-11-20
| | | | | | | Change-Id: Idf0977befc8ed4fd9eb3b733db5e945457b2164c Reviewed-on: https://skia-review.googlesource.com/73701 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Make SkAtlasTextTarget use glyph IDsGravatar Brian Salomon2017-11-20
| | | | | | | | Bug: skia: Change-Id: Idefd69f02f62fea22c41a3476676773221c3ae81 Reviewed-on: https://skia-review.googlesource.com/73700 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Revert "Add Atlas Text interface for rendering SDF glyphs.""Gravatar Brian Salomon2017-11-19
| | | | | | | | | | This reverts commit 9c2202ffc22b4293b48a4edeafa1b5d2bab8bb83. Bug: skia: Change-Id: I482ddf74f8e40d3d0908c840ba5c6ff981ccefbd Reviewed-on: https://skia-review.googlesource.com/73345 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Add Atlas Text interface for rendering SDF glyphs."Gravatar Greg Daniel2017-11-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 39631f3df172feb385527a5d125bc53b0bded7e6. Reason for revert: break google3 rool Original change's description: > Add Atlas Text interface for rendering SDF glyphs. > > This new API is built upon SDF text atlas code from the GPU backend. Unlike using the GPU > backend to draw text, this set of interfaces allows the client to render the SDF glyphs. The > client issues text draws to potentially multiple targets and then the client flushes. The > client then gets commands from Skia with data to put into a texture atlas and vertices to > draw that reference the texture. The client is responsible for creating the texture, uploading > the SDF data to the texture, and drawing the vertices provided by Skia. > > Change-Id: Ie9447e19b85f0ce1c2b942e5216c787a74f335d3 > Reviewed-on: https://skia-review.googlesource.com/59360 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> TBR=jvanverth@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: I4aad0c99e645b476fd8ba25731f2a10e8802bb25 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/73420 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Add Atlas Text interface for rendering SDF glyphs.Gravatar Brian Salomon2017-11-17
This new API is built upon SDF text atlas code from the GPU backend. Unlike using the GPU backend to draw text, this set of interfaces allows the client to render the SDF glyphs. The client issues text draws to potentially multiple targets and then the client flushes. The client then gets commands from Skia with data to put into a texture atlas and vertices to draw that reference the texture. The client is responsible for creating the texture, uploading the SDF data to the texture, and drawing the vertices provided by Skia. Change-Id: Ie9447e19b85f0ce1c2b942e5216c787a74f335d3 Reviewed-on: https://skia-review.googlesource.com/59360 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>