aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrDrawOpAtlas.cpp
Commit message (Collapse)AuthorAge
* Alter GrSurface/GrSurfaceProxy flags to prepare for GrTexture/GrTextureProxy ↵Gravatar Robert Phillips2018-03-19
| | | | | | | | | | | | | | | | -specific flags This CL: moves GrRenderTarget::fFlags to GrSurface::fSurfaceFlags adds a GrInternalSurfaceFlags type and uses it for GrSurfaceProxy::fSurfaceFlags The goal of this is to provide a location where GrTexture/GrTextureProxy-specific flags (i.e., isExternal & isRectangle) can be stored. Change-Id: I8df7b79036a6853dd378ff6cf10d4b37c60dd511 Reviewed-on: https://skia-review.googlesource.com/114796 Reviewed-by: Brian Salomon <bsalomon@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>
* Remove GrSurfaceOrigin from GrSurfaceDesc.Gravatar Brian Salomon2018-03-05
| | | | | | | | | | | | This field has no interpretation at the GrTexture/GrGpu as the orientation is handled at the GrSurfaceProxy level. This change requires GrGpu to accept a GrSurfaceOrigin when creating a texture with initial data. The origin refers to the texel data to be uploaded. Longer term the plan is to remove this and require the data to be kTopLeft. Additionally, kBottomLeft will only be allowed for wrapped texture/RTs as this evolves. Change-Id: I7d25b0199aafd9bf3b74c39b2cae451acadcd772 Reviewed-on: https://skia-review.googlesource.com/111806 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@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>
* Clean up GrDrawOpAtlas (take 2)Gravatar Robert Phillips2018-03-01
| | | | | | | | | | Relanding all the things TBR=jvanverth@google.com Change-Id: Ie4ecdaee1c192c841817a54d64a9b3f70d28b28f Reviewed-on: https://skia-review.googlesource.com/111360 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 "Clean up GrDrawOpAtlas"Gravatar Robert Phillips2018-02-28
| | | | | | | | | | | | | | | | | | | | | | This reverts commit 9d57afd93e70d3bd40ed470b1de28ccc03b98208. Reason for revert: Chrome Original change's description: > Clean up GrDrawOpAtlas > > Change-Id: I18dea851fa950231c4106e2e049e74a678a03df2 > Reviewed-on: https://skia-review.googlesource.com/110380 > Reviewed-by: Jim Van Verth <jvanverth@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: Ibf879c12e5074d8c4a4ec8563cfdd7ed0afb6aec Reviewed-on: https://skia-review.googlesource.com/111041 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>
* Clean up GrDrawOpAtlasGravatar Robert Phillips2018-02-26
| | | | | | | Change-Id: I18dea851fa950231c4106e2e049e74a678a03df2 Reviewed-on: https://skia-review.googlesource.com/110380 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Robert Phillips <robertphillips@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>
* Pad atlas uploads to 4-byte boundariesGravatar Jim Van Verth2018-02-20
| | | | | | | Change-Id: I678358c176e318d89892ced5c76cd2662774a7d6 Reviewed-on: https://skia-review.googlesource.com/108566 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Jim Van Verth <jvanverth@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>
* Some more cleanup of GrDrawOpAtlas compactionGravatar Jim Van Verth2018-02-20
| | | | | | | Change-Id: Ica00285d0071a31a09dc87d68d7ae7dfabab17b7 Reviewed-on: https://skia-review.googlesource.com/108522 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Fix thrashing issue with multitextured atlas.Gravatar Jim Van Verth2018-02-17
| | | | | | | | | | | | | | To try to reduce memory usage, the atlas will look for space in the earliest created pages and then invalidate plots in the latest page to try to move those plots into an earlier one. The problem was that the available space was not being evicted, so we kept loading data back into the latest page. Bug: skia: Change-Id: Ic8668f6f66bf1153dbcb5edae7622fa9edfa71dd Reviewed-on: https://skia-review.googlesource.com/98801 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Make atlases instantiate themselves at flush timeGravatar Robert Phillips2018-02-09
| | | | | | | Change-Id: I5ed9794bd78c8e5d999e892f5672b9c590b44285 Reviewed-on: https://skia-review.googlesource.com/106000 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Split GrContext into Normal/DDL flavorsGravatar Robert Phillips2018-01-19
| | | | | | | | Change-Id: If37d8a236bd71e2d7121eaafb9d7c7b08328b10f Reviewed-on: https://skia-review.googlesource.com/84863 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@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>
* Move resourceProvider accessor to GrContextPriv (take 2)Gravatar Robert Phillips2018-01-16
| | | | | | | | TBR=bsalomon@google.com Change-Id: I3fd46ebfad0d04b8a2bfa6190f81308f3a6be620 Reviewed-on: https://skia-review.googlesource.com/95121 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Move resourceProvider accessor to GrContextPriv"Gravatar Hal Canary2018-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1f9ed8501b0007846b3032f4bfc38aee98c175a1. Reason for revert: 1. breaking android roll 2. breaking Build-Debian9-Clang-arm-Release-Android_API26 Original change's description: > Move resourceProvider accessor to GrContextPriv > > Change-Id: I5cddd620a7ec4b006b7359864ede58e9d4dd684e > Reviewed-on: https://skia-review.googlesource.com/94340 > 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: I20b2d267c0925f20453b635663654967199a1197 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/94964 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Move resourceProvider accessor to GrContextPrivGravatar Robert Phillips2018-01-16
| | | | | | | | Change-Id: I5cddd620a7ec4b006b7359864ede58e9d4dd684e Reviewed-on: https://skia-review.googlesource.com/94340 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Funnel most proxy creation through GrProxyProviderGravatar Robert Phillips2018-01-16
| | | | | | | | | This is to provide a choke point for DDL to create Lazy Proxies. Change-Id: If178da13bc6447b31b7601810236d34502d9efbd Reviewed-on: https://skia-review.googlesource.com/93303 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Modify fontcache GM to actually spill atlas.Gravatar Brian Salomon2017-11-06
| | | | | | | | | | | | Adds an option to GrDrawOpAtlas to disable multitexturing. Adds option to GrContextOptions to disable multitexturing for glyph atlases. Change-Id: If413ab7061538fa0e75628d252be4fd14215b6ba Reviewed-on: https://skia-review.googlesource.com/67802 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Make deferred upload handling and draw recording be virtual interfaces ↵Gravatar Brian Salomon2017-10-31
| | | | | | | | | | | | implemented by GrOpFlushState. The motivation for this is to allow other clients of GrDrawOpAtlas. Making GrMeshDrawOp::Target also be an abstract interface is somewhat incidental to this goal. Bug: skia: Change-Id: I0987adfa8a269aa2ca94147e933a2827d734c1cc Reviewed-on: https://skia-review.googlesource.com/65121 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Remove deferred upload types from GrDrawOp.h.Gravatar Brian Salomon2017-10-30
| | | | | | | | | This is motivated by exposing these to an upcoming atlas text rendering API that doesn't use ops. Change-Id: Id034dd43d13bc96fe1350fc6d8f699477bb74a05 Reviewed-on: https://skia-review.googlesource.com/65060 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Reduce the frequency of the text atlas compaction.Gravatar Derek Sollenberger2017-10-09
| | | | | | | Change-Id: I2e3e9add5f9a9074243d220fa37e610e6ad086c8 Reviewed-on: https://skia-review.googlesource.com/57111 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Derek Sollenberger <djsollen@google.com>
* Potential fix for Android regressionGravatar Jim Van Verth2017-10-03
| | | | | | | | Bug: skia: Change-Id: I1130084fd526f3cc0d39bfa5293d79ce408691b2 Reviewed-on: https://skia-review.googlesource.com/54361 Reviewed-by: Stan Iliev <stani@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Miscellaneous dynamic atlas fixes.Gravatar Jim Van Verth2017-09-28
| | | | | | | | | | | | | Make Chinese fling sample closer to Android test. Fix a bug in GrDrawOpAtlas::compact(), where the atlas generation wasn't incremented so the client didn't know it changed. Add some debug info for GrDrawOpAtlas. Add a comment in GrDrawOpAtlas::setLastUseTokenBulk. Change-Id: I79192a017870541a79731b1a22f665ec5deeff09 Reviewed-on: https://skia-review.googlesource.com/52761 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Adjust atlas tracking to get better usage.Gravatar Jim Van Verth2017-09-27
| | | | | | | | | | | Only overwrite LRU plots if they've aged out or we're at max pagecount. Make sure we only increment flush counts if the atlas has been used. Bug: skia:3550 Change-Id: I5c41e20f6c7db818dc08629d5f74401552ddf32f Reviewed-on: https://skia-review.googlesource.com/51243 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Shrink GrDrawOpAtlases when no longer needed, take 2.Gravatar Jim Van Verth2017-09-26
| | | | | | | | Bug: skia:3550 Change-Id: Id483a76b9edcf29f7ea0aad0dd8946a3655ba8f2 Reviewed-on: https://skia-review.googlesource.com/50600 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add animated cowboy sample from WebKit tests, and fix.Gravatar Jim Van Verth2017-09-25
| | | | | | | | Bug: chromium:712455 Change-Id: Ic9bb9b862abe01f112cc41d28589733460b15bc1 Reviewed-on: https://skia-review.googlesource.com/50181 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Revert "Shrink GrDrawOpAtlases when no longer needed"Gravatar Jim Van Verth2017-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7cf59526c9b1ab3682e875d449200e51f3b6ff32. Reason for revert: Red red bots... it's tearing me apart... Original change's description: > Shrink GrDrawOpAtlases when no longer needed > > Bug: skia:3550 > Change-Id: I7b09aa2b0fd22ed99694f32f9f395392ef80e238 > Reviewed-on: https://skia-review.googlesource.com/49901 > Commit-Queue: Jim Van Verth <jvanverth@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=jvanverth@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: I8331ec79b0796e1f75d7cc53b9753f886aea7fcd No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:3550 Reviewed-on: https://skia-review.googlesource.com/50220 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Shrink GrDrawOpAtlases when no longer neededGravatar Jim Van Verth2017-09-22
| | | | | | | | | Bug: skia:3550 Change-Id: I7b09aa2b0fd22ed99694f32f9f395392ef80e238 Reviewed-on: https://skia-review.googlesource.com/49901 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Fix TSAN issue with atlas expansion.Gravatar Jim Van Verth2017-09-20
| | | | | | | | | | | Removes SkString-related malloc from DM crash handler, and adds null check in ProxyRefTest. Bug: skia:3550 Change-Id: I143c532b5d231a426b1a96b854e1effd6379b673 Reviewed-on: https://skia-review.googlesource.com/48440 Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Temporarily disable atlas growth.Gravatar Jim Van Verth2017-09-18
| | | | | | | Change-Id: I01341f3233969225b846ee081e78868ebcf0a1c1 Reviewed-on: https://skia-review.googlesource.com/48040 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Revert "Revert "Allow GrDrawOpAtlas to grow as needed""Gravatar Jim Van Verth2017-09-18
| | | | | | | | Bug: skia:3550 Change-Id: I11a3b39ed7470542447f0e46141a26eef7a9bdaf Reviewed-on: https://skia-review.googlesource.com/47240 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Revert "Allow GrDrawOpAtlas to grow as needed"Gravatar Jim Van Verth2017-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 03168b8a62a0d3d14b7a0d14642df4d82203b87c. Reason for revert: Assert in resetting texture proxies. Original change's description: > Allow GrDrawOpAtlas to grow as needed > > Bug: skia:3550 > Change-Id: Ib5312c8c06ba8549d90545658df6686c45058255 > Reviewed-on: https://skia-review.googlesource.com/45841 > Commit-Queue: Jim Van Verth <jvanverth@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> TBR=jvanverth@google.com,robertphillips@google.com Change-Id: I05e084b4cefa57e558f296d6087d4f03fa16ac81 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:3550 Reviewed-on: https://skia-review.googlesource.com/47140 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Allow GrDrawOpAtlas to grow as neededGravatar Jim Van Verth2017-09-15
| | | | | | | | Bug: skia:3550 Change-Id: Ib5312c8c06ba8549d90545658df6686c45058255 Reviewed-on: https://skia-review.googlesource.com/45841 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add support for additional textures in GrDrawOpAtlasGravatar Jim Van Verth2017-09-12
| | | | | | | | | | Step two in supporting growable/shrinkable atlases. Bug: skia:3550 Change-Id: I0cdec2a9f59cc8ced071bfeec2f8ed5a228c4b7a Reviewed-on: https://skia-review.googlesource.com/43260 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Move texture proxy allocation for atlas to constructor.Gravatar Jim Van Verth2017-09-01
| | | | | | | | | This is to set up for allocating additional texture proxies as needed. Change-Id: Ibc0480c30d8efd6ccf8278f6dbdd3bfa3ee2397d Reviewed-on: https://skia-review.googlesource.com/41744 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Make op-level texture uploading be GrProxy-basedGravatar Robert Phillips2017-07-28
| | | | | | | Change-Id: I898d626eff059fa7c687357b536d09409a174358 Reviewed-on: https://skia-review.googlesource.com/28001 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Pull non-substantive changes out of omnibus GrSurface CLGravatar Robert Phillips2017-07-27
| | | | | | | | | https://skia-review.googlesource.com/c/26363 (Remove origin field from GrSurface) is already too large. This pulls some of the cosmetic changes out for separate review. Change-Id: I1d8b95522144b2f4cbd916ef38faa3dde6f78087 Reviewed-on: https://skia-review.googlesource.com/27840 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@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>
* Tracing macro cleanup continuedGravatar Brian Osman2017-07-26
| | | | | | | | | | | - Remove one especially chatty event, and one pointless test - Use TRACE_FUNC everywhere, rather than manual strings Bug: skia: Change-Id: Icb795294009150ca9a260436738d79546a733337 Reviewed-on: https://skia-review.googlesource.com/26701 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
* Reduce dependence on GrSurface's origin field (take 3)Gravatar Robert Phillips2017-07-25
| | | | | | | | | TBR=bsalomon@google.com Change-Id: I8c95c6774897dbd87e3c5c87d92f75c5b64d4e76 Reviewed-on: https://skia-review.googlesource.com/26424 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>