Also:
* clean up PolyUtils checks to be correct and consistent.
* fix some bugs discovered by the unit tests.
Bug: skia:
Change-Id: I1a8e07d13cb44fecc67344154dc1002f3f910f5d
Reviewed-on: https://skia-review.googlesource.com/138592
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Create FontMgrFontConfigTest.cpp file to test the above function.
Change-Id: I7716355f702af3d6f25574305914f0b82a4147ce
Reviewed-on: https://skia-review.googlesource.com/137133
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
It's a tiny, core-ish component -- might as well treat as such to
simplify dependencies.
Change-Id: I6f31ce2d151f9a629d88bfc7f15d64891d5150c0
Reviewed-on: https://skia-review.googlesource.com/135780
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Added some helper functions and put the booleans in a nested struct
(this is motivated by upcoming changes). Added a unit test of steps
against skcms, with round-tripping in both combinations.
Change-Id: Iea3d60cd52edb5259b5576b1422ed6f856cde815
Reviewed-on: https://skia-review.googlesource.com/134660
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Lots of completely unused bits and bobs removed.
I've decided SK_SUPPORT_UNITTEST and its single use are not
very compelling.
tests/CPlusPlusEleven was the only user of Sk32ToBool(),
and no longer generally needed.
Change-Id: I3ee75560f1e1e1cf5ad89ee7df8d7694b5dffdb3
Reviewed-on: https://skia-review.googlesource.com/133622
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This reverts commit 74b390d6b1.
Reason for revert: reverting to add patch for valgrind
Original change's description:
> Revert "Have draw(Text|PosText|PosTextH) use a single entry on the device"
>
> This reverts commit 4225b3220e.
>
> Reason for revert: made valgrind unhappy.
>
> Original change's description:
> > Have draw(Text|PosText|PosTextH) use a single entry on the device
> >
> > Handle the positioning of drawText at the canvas layer. Simplify
> > the code by removing similar implementations.
> >
> > Change-Id: I8b711783435072f560e29fca1dd934fa2e345ed2
> > Reviewed-on: https://skia-review.googlesource.com/127131
> > Reviewed-by: Ben Wagner <bungeman@google.com>
> > Commit-Queue: Herb Derby <herb@google.com>
>
> TBR=jvanverth@google.com,bungeman@google.com,herb@google.com
>
> Change-Id: I65c9d30ae6ecb1f87e8660e56d8f8ce5daab7551
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/132403
> Reviewed-by: Hal Canary <halcanary@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>
TBR=jvanverth@google.com,halcanary@google.com,bungeman@google.com,herb@google.com
Change-Id: I9bbb73aac447b51eb8215ac42331759fa4c9fa45
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/132580
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
No test tests, ok? Gotta draw the line somewhere.
Change-Id: I52284272f74a72a858910a143ecd4ad68fe3f1de
Reviewed-on: https://skia-review.googlesource.com/132410
Commit-Queue: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
This reverts commit 4225b3220e.
Reason for revert: made valgrind unhappy.
Original change's description:
> Have draw(Text|PosText|PosTextH) use a single entry on the device
>
> Handle the positioning of drawText at the canvas layer. Simplify
> the code by removing similar implementations.
>
> Change-Id: I8b711783435072f560e29fca1dd934fa2e345ed2
> Reviewed-on: https://skia-review.googlesource.com/127131
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
TBR=jvanverth@google.com,bungeman@google.com,herb@google.com
Change-Id: I65c9d30ae6ecb1f87e8660e56d8f8ce5daab7551
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/132403
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Handle the positioning of drawText at the canvas layer. Simplify
the code by removing similar implementations.
Change-Id: I8b711783435072f560e29fca1dd934fa2e345ed2
Reviewed-on: https://skia-review.googlesource.com/127131
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
PS5: Removes SkDestinationSurfaceColorMode, tracking of mipmap
mode on GrTexture, sRGB decode state per-texture. Because we
were often choosing sRGB configs for RGB color types, legacy
rendering would then be incorrect (too dark). So...
PS7: Stops ever using sRGB pixel configs when translating
image info or color type. Also removes a bunch of GrCaps bits
and a GrContextOption that are no longer relevant.
PS9: Adjusts surface creation unit test expectations, and
changes the raster rules accordingly.
At this point, sRGB configs are (obviously) going to be broken.
Locally, I ran 8888, gl, and the gbr- versions of both. Across
all GMs x configs, there are 13 diffs. 12 are GMs that create
surfaces with a color-space attached (and thus, the offscreen
is no longer getting sRGB pixel config). The only remainder
constructs an SkPictureImageGenerator, (with an attached color
space) and renders it to the gbr-gl canvas, which triggers a
a tagged surface inside the generator.
Bug: skia:
Change-Id: Ie5edfa157dd799f3121e8173fc4f97f6c8ed6789
Reviewed-on: https://skia-review.googlesource.com/131282
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This is a reland of 331c266ed7
Original change's description:
> Use GrVkMemoryAllocator for vulkan memory allocations in ganesh.
>
> Besides using the new allocator, the big logical change is that map
> and unmap calls form GrVkMemory are specc'd to map the entire GrVkAlloc
> instead of a specific offset and size as they did before. As a
> consequence of this, we move the handling of non-coherent alignment
> for flush/invalidate calls to GrVkMemory instead of the callers.
>
> Bug: skia:
> Change-Id: I794d713106602f27aa7e808c306bbb69fd2b67be
> Reviewed-on: https://skia-review.googlesource.com/130021
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
Bug: skia:
Change-Id: Ia9a4192d344449fb444d2adaa1d62ff1ede4b21d
Reviewed-on: https://skia-review.googlesource.com/131083
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This reverts commit 331c266ed7.
Reason for revert: breaking an intel vulkan bot
Original change's description:
> Use GrVkMemoryAllocator for vulkan memory allocations in ganesh.
>
> Besides using the new allocator, the big logical change is that map
> and unmap calls form GrVkMemory are specc'd to map the entire GrVkAlloc
> instead of a specific offset and size as they did before. As a
> consequence of this, we move the handling of non-coherent alignment
> for flush/invalidate calls to GrVkMemory instead of the callers.
>
> Bug: skia:
> Change-Id: I794d713106602f27aa7e808c306bbb69fd2b67be
> Reviewed-on: https://skia-review.googlesource.com/130021
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
Change-Id: I5237c00625dc95d3d9b36c1e5591762988d85562
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/131081
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Besides using the new allocator, the big logical change is that map
and unmap calls form GrVkMemory are specc'd to map the entire GrVkAlloc
instead of a specific offset and size as they did before. As a
consequence of this, we move the handling of non-coherent alignment
for flush/invalidate calls to GrVkMemory instead of the callers.
Bug: skia:
Change-Id: I794d713106602f27aa7e808c306bbb69fd2b67be
Reviewed-on: https://skia-review.googlesource.com/130021
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
We're not going to need the bit.
I've rewritten "esrgb" and "srgbnl" to express themselves the way I'd
like them to work. Their images are supressed in Gold already.
Change-Id: I6da58cc75dcb998cbfcf9a8f65de31c030adb494
Reviewed-on: https://skia-review.googlesource.com/130506
Reviewed-by: Brian Osman <brianosman@google.com>
* relocate all SkSG-related files under modules/sksg/
* fix various tidbits to make non-sksg builds possible
* drop obsolete SampleSGInval.cpp
Change-Id: I54e6c5bb1a09f45030fa8d607b3eb3f7cba78957
Reviewed-on: https://skia-review.googlesource.com/130025
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
Lots TODO.
Change-Id: I95edb764b85a5140d432adb506c3b537869e6df4
Reviewed-on: https://skia-review.googlesource.com/129933
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@chromium.org>
This is a reland of 339133f82c
Original change's description:
> start cleaning up non-skcms SkColorSpaceXforms
>
> I think this gets rid of
> - SkColorSpaceXform_Base
> - SkColorSpaceXform_XYZ
> - SkColorSpaceXform_A2B
> and lots of support code. Might be more left to clean up?
>
> Change-Id: I560d974d1e879dfd6a63ee2244a3dd88bd495c8a
> Reviewed-on: https://skia-review.googlesource.com/129512
> Commit-Queue: Brian Osman <brianosman@google.com>
> Auto-Submit: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: I33ee0d8bcfd72c401823a2e7d5168c9ecc9a5181
Reviewed-on: https://skia-review.googlesource.com/129624
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This reverts commit 339133f82c.
Reason for revert: broke NinePatchDrawableTest.testGetPadding? stranger things have happened.
Original change's description:
> start cleaning up non-skcms SkColorSpaceXforms
>
> I think this gets rid of
> - SkColorSpaceXform_Base
> - SkColorSpaceXform_XYZ
> - SkColorSpaceXform_A2B
> and lots of support code. Might be more left to clean up?
>
> Change-Id: I560d974d1e879dfd6a63ee2244a3dd88bd495c8a
> Reviewed-on: https://skia-review.googlesource.com/129512
> Commit-Queue: Brian Osman <brianosman@google.com>
> Auto-Submit: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=mtklein@chromium.org,brianosman@google.com
Change-Id: I9e76195481b8658b34936aeece278d81c286c0fa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/129680
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
I think this gets rid of
- SkColorSpaceXform_Base
- SkColorSpaceXform_XYZ
- SkColorSpaceXform_A2B
and lots of support code. Might be more left to clean up?
Change-Id: I560d974d1e879dfd6a63ee2244a3dd88bd495c8a
Reviewed-on: https://skia-review.googlesource.com/129512
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
This reverts commit b5f2897ab5.
Reason for revert: looks like this broke the build for DM in Google3. Need more include dirs there?
Original change's description:
> IWYU for tests starting with 'D'.
>
> Change-Id: I9189e4b56ce1635b627119733447c2ed4220753d
> Reviewed-on: https://skia-review.googlesource.com/129319
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>
TBR=bsalomon@google.com,bungeman@google.com,herb@google.com
Change-Id: I01aac7dae6114685a0652cbde3defccc8a42caea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/129443
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Code:
- Add a non-linear blending bit and makeNonlinearBlending()
to SkColorSpace
- remove enough F16=linear checks to make it possible to
create surfaces and encode pngs with nonlinear F16
Testing:
- add "esrgb" software config to DM, run it
- add "srgbnl" software config, run it
- deemphasize importance of "srgb" config on bots
- update unit tests to reflect relaxed F16 constraints
- add a new unit test file with _really_ basic tests,
and a new unit test that's not working yet
Bug: skia:7942
Change-Id: I8ac042bdf9f3d791765393b68fd9256375184d83
Reviewed-on: https://skia-review.googlesource.com/127325
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
We think we can evolve SkColorSpace_XYZ into the One True SkColorSpace.
Change-Id: If93493145d78b388f3a0739cc7ccd6e232380733
Reviewed-on: https://skia-review.googlesource.com/127326
Auto-Submit: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This reverts commit 101d56359a.
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>
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>
The implicit SkTCopyOnFirstWrite copy-ctor and assignment operator are
incorrect: fObj must point to the local copy, not to the source copy
(when a copy has been made).
Add corrected explicit copy (and move) ctor + assignment operator.
Also add a get() helper to facilitate rawptr access.
Change-Id: Ie3983e12c04eae4f32c40e3e267618cf02008c20
Reviewed-on: https://skia-review.googlesource.com/120442
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
The big api level change here is that the getBackendInfo calls now return by value
instead of a pointer. These changes are being made in support of Vulkan so that
the client can update the VkImageLayout on the GrBackendTexture and have that
update get reflected in our internal tracking of the image. This is done by storing
a ref counted GrVkImageLayout object on the GrBackendTexture and the GrVkImage.
Bug: skia:
Change-Id: I8c6158fd3a66eb61fef97ebf09ea5364bca3f1ae
Reviewed-on: https://skia-review.googlesource.com/119101
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Performs inset and outset operations on simple polygons and returns
a simple polygon, if possible.
Bug: skia:
Change-Id: I6d468174ad70b5279b736c532e19cbb84ff9f955
Reviewed-on: https://skia-review.googlesource.com/116483
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This will allow a client to make an SkImage that "wraps" a gpu texture,
however the client does need to supply the actual gpu texture at Image
creation time. Instead it is retrieve at flush time via a callback.
Bug: skia:
Change-Id: I6267a55ab7102101a7bd80a6f547b6a870d2df08
Reviewed-on: https://skia-review.googlesource.com/109021
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
This reverts commit 461ef7af88.
Prev CL to SkScan_Hairline.cpp fixed the bug that caused the earlier revert.
Bug: skia:
Change-Id: Ifd9a364c7546175be292f726e19465b72196b45e
Reviewed-on: https://skia-review.googlesource.com/112723
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
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>
This reverts commit 934c3d0c54.
Reason for revert: Chrome
Original change's description:
> Revert "Revert "Separate creation time & flush time behavior in GrDrawOpAtlas (take 2)""
>
> This reverts commit 84d823a5e2.
>
> 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 96165ebeaa.
> >
> > 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>
This reverts commit 84d823a5e2.
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 96165ebeaa.
>
> 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>
This reverts commit 96165ebeaa.
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>
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>
This reverts commit 056c1a821a.
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>
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>