aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
Commit message (Collapse)AuthorAge
* Change behavior of custom image serial/deserialGravatar Mike Reed2018-03-08
| | | | | | | | | | | | | | | | New behavior is to *always* call the client's deserial image proc for all data. This allows the client to make decisions even on "std" image data like PNG. The change also means that if there is no client deserial image proc, Skia will still attempt to create an image from the data, even if it was written by a custom serial proc. Bug: skia:7706 Change-Id: Ia58bdd10b86d497f02187082c6373c029e9c8293 Reviewed-on: https://skia-review.googlesource.com/113302 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Add ability to uninstantiate lazy proxies after every flush.Gravatar Greg Daniel2018-03-08
| | | | | | | | | Bug: skia: Change-Id: Id32540cda54a9c5e3e6cb721776699be3cc8ac1a Reviewed-on: https://skia-review.googlesource.com/113263 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Fill in some missing virtuals from canvas subclassesGravatar Brian Osman2018-03-08
| | | | | | | | Bug: skia: Change-Id: If7306fa6c5a1619952e1159e6ebca8f04b4d9c8e Reviewed-on: https://skia-review.googlesource.com/113262 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Delazify wrapped backend textures/render target proxiesGravatar Brian Salomon2018-03-08
| | | | | | | | | | | These methods will fail on DDL contexts. This is in preparation for removing the ability to specify origin for lazy proxies. Change-Id: Iadcedfd4fce8ea2590729c974128e5c58cec38a8 Reviewed-on: https://skia-review.googlesource.com/112802 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@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>
* add TrimPathEffectGravatar Mike Reed2018-03-07
| | | | | | | | Bug: skia: Change-Id: I453fb81ded4435b33567e9c8a6f3abe9535d687f Reviewed-on: https://skia-review.googlesource.com/112820 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Initial texture data is never flipped when uploaded.Gravatar Brian Salomon2018-03-07
| | | | | | | | | The first bytes of the data always refer to the pixel accessed by texture coord (0, 0). Change-Id: I708702d90f35b3bc896a48c3c3fd6a0be73f505a Reviewed-on: https://skia-review.googlesource.com/112261 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Make GrReleaseProcHelper an SkWeakRefCntGravatar Greg Daniel2018-03-07
| | | | | | | | Bug: skia: Change-Id: Iccc22d477c17c4c58615e3f3bf9e551f9596b710 Reviewed-on: https://skia-review.googlesource.com/112562 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Cleaning up SkColorSpaceXform a bitGravatar Brian Osman2018-03-06
| | | | | | | | | | | | | | | | Remove SkColorSpaceXform_base from the inheritance chain. Move some enums only used within XYZ to be class scoped. Eliminate redundant context structs, and just use the SkJumper types directly. SkColorSpaceXform_Base still exists, but just to hold a couple static functions. Trying to untangle the dst gamma table mess next. Bug: skia: Change-Id: I6d2b7807c33e61a0d7df74e334356567d8a2c0e0 Reviewed-on: https://skia-review.googlesource.com/112601 Commit-Queue: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Add SkSurfaceCharacterization::createResizedGravatar Robert Phillips2018-03-06
| | | | | | | Change-Id: Ia98ce3cf6c0b9f9100eea9850af56048e43b8d07 Reviewed-on: https://skia-review.googlesource.com/112580 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* remove canvas internal privateGravatar Cary Clark2018-03-06
| | | | | | | | | | | | | interfaces not called externally and aren't used internally R=robertphillips@google.com,reed@google.com Bug: skia:6455 Change-Id: Iee98ce4380a28a831d9bffe99932b54421dd339a Reviewed-on: https://skia-review.googlesource.com/112481 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add GetTypefaceOrDefault to SkPaintPrivGravatar Herb Derby2018-03-06
| | | | | | | | | | | | Remove most uses of GetDefaultTypeface. SkTypeface has fewer friends. BUG=skia:7515 Change-Id: Iedec5b39b9ef8c638772be4971075491b59b740b Reviewed-on: https://skia-review.googlesource.com/112300 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Update Skia milestone to 67Gravatar Heather Miller2018-03-06
| | | | | | | | | TBR: reed Bug: skia: Change-Id: I11a5515c41d5bb7ed95294fdb63668c35d14d960 Reviewed-on: https://skia-review.googlesource.com/111326 Reviewed-by: Heather Miller <hcm@google.com>
* make compute helper for blurs privateGravatar Mike Reed2018-03-06
| | | | | | | | | | | Precursor for moving blurmaskfilter into core, since it is referenced by core code for drawShadow. Bug: skia: Change-Id: I900c6e10523115c75f45d2c410eb6a5ca56a6e4d Reviewed-on: https://skia-review.googlesource.com/112301 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Move internal calls from GrContext to GrContextPrivGravatar Robert Phillips2018-03-06
| | | | | | | | | | A mechanical bulk move just to get these out of the public API. TBR=bsalomon@google.com Change-Id: I813efbd54a09dd448275697c0e50947753a5cfd3 Reviewed-on: https://skia-review.googlesource.com/112262 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Remove routines no longer needed since stripping NVPRGravatar Herb Derby2018-03-05
| | | | | | | | Change-Id: Ia1a545cc5c52d9af654f980083803ece39a92614 Reviewed-on: https://skia-review.googlesource.com/112260 Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Remove BitmaskEnum from SkTypeface.Gravatar Ben Wagner2018-03-05
| | | | | | | | | | SkTypeface::Style is almost gone and is no longer marked as a BitmaskEnum. Change-Id: If61a2f46d130fbd8b50b5765119af951f12b189f Reviewed-on: https://skia-review.googlesource.com/112203 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* SkGlyphCache - update core routines.Gravatar Herb Derby2018-03-05
| | | | | | | | | | | | | | | | | - Allows different methods for creating SkGlyphCaches - Enables passing FontMetrics for cache creation. - Removes VisitCache - Removes VisitAll - Introduces SkExclusiveStrikePtr which should replaces SkAutoGlyphCache with simpler mechanism. BUG=skia:7515 Change-Id: Ibada35e3985335179d2cc8284a837fc525224c92 Reviewed-on: https://skia-review.googlesource.com/111063 Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@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>
* Revert "Revert "Add 1010102 support to Ganesh""Gravatar Brian Osman2018-03-02
| | | | | | | | | | This reverts commit ded47a50143470d1acdafa03e878cc7da5608038. Bug: skia: Change-Id: I7d7552e6ccc8591cae91426407ab13b628b93b68 Reviewed-on: https://skia-review.googlesource.com/111760 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Fix creation of extra GrContextThreadSafeProxies in DDL worldGravatar Robert Phillips2018-03-02
| | | | | | | | | | For the DDLContexts we simply want to reuse the threadSafeProxy from the main thread but we, obviously, still need to create one for the main DirectContext. TBR=bsalomon@google.com Change-Id: I99449bc375172c9004e2e80c21d95ab2d7708309 Reviewed-on: https://skia-review.googlesource.com/110781 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Make use of the buffer data null hint a GrContextOptionGravatar Robert Phillips2018-03-02
| | | | | | | | TBR=bsalomon@google.com Change-Id: I5a3fd18479ca8c95e1bc8c087c28346264049eb0 Reviewed-on: https://skia-review.googlesource.com/111604 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Add ctor to GrVkAllocGravatar Greg Daniel2018-03-02
| | | | | | | | | | TBR=bsalomon@google.com Bug: skia: Change-Id: I7b4b372674df6ff43f737ac1b3f2f63b87719b6a Reviewed-on: https://skia-review.googlesource.com/111660 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* SkString: remove externally unused ::setUTF16() from APIGravatar Hal Canary2018-03-01
| | | | | | | | | Moved to SkStringUtils in src/ Change-Id: I026e3a325570bbf34e90797d921cb2f05b9a29f6 Reviewed-on: https://skia-review.googlesource.com/111602 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* Revert "Add 1010102 support to Ganesh"Gravatar Brian Osman2018-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 44b61204d9f5681b9474db017577d56f42a32d66. Reason for revert: TSAN bot crashing Original change's description: > Add 1010102 support to Ganesh > > Adds gl1010102, gles1010102, vk1010102, and mtl1010102 > configs to DM. > > This uses the same saveLayer approach as CPU, switching > to 8888 so that we have enough alpha precision. > > Change-Id: I9f5b63747ec01031c8db97dadfc42f77e4863ccb > Reviewed-on: https://skia-review.googlesource.com/110500 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Brian Osman <brianosman@google.com> TBR=mtklein@google.com,bsalomon@google.com,brianosman@google.com Change-Id: I782e740763044c1ae78fb219161e37eec7617c74 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/111580 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Move atlas manager creation to GrContext derived classes (take 2)Gravatar Robert Phillips2018-03-01
| | | | | | | | TBR=bsalomon@google.com Change-Id: Ie10b7e770e24104d10c36ce7882126dd8551a8ba Reviewed-on: https://skia-review.googlesource.com/110822 Reviewed-by: Greg Daniel <egdaniel@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>
* Add 1010102 support to GaneshGravatar Brian Osman2018-03-01
| | | | | | | | | | | | | Adds gl1010102, gles1010102, vk1010102, and mtl1010102 configs to DM. This uses the same saveLayer approach as CPU, switching to 8888 so that we have enough alpha precision. Change-Id: I9f5b63747ec01031c8db97dadfc42f77e4863ccb Reviewed-on: https://skia-review.googlesource.com/110500 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@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>
* make SkDestinationSurfaceColorMode privateGravatar Cary Clark2018-02-28
| | | | | | | | | R=brianosman@google.com, reed@google.com Bug: skia: Change-Id: Ibbf91a664cc504737137717d9170ce4de09b017c Reviewed-on: https://skia-review.googlesource.com/111161 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* Remove deprecated drawShadow interfacesGravatar Jim Van Verth2018-02-28
| | | | | | | | Bug: skia:7263 Change-Id: I90fcc35e8d070b324287139ebecc3d15dbec0137 Reviewed-on: https://skia-review.googlesource.com/109164 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: 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>
* Revert "Move atlas manager creation to GrContext derived classes"Gravatar Robert Phillips2018-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e5b7ceeac865fb8a3bab82a73d65752c78682718. Reason for revert: Breaking Mus/Viz tests in Chrome roll Original change's description: > Move atlas manager creation to GrContext derived classes > > This CL relies on: https://skia-review.googlesource.com/c/skia/+/108001 (Fission GrAtlasGlyphCache in two) > > TBR=bsalomon@google.com > Change-Id: Ic3f91cea2238221b970f8ebbda99b10202925cd8 > Reviewed-on: https://skia-review.googlesource.com/110621 > Commit-Queue: Robert Phillips <robertphillips@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: I3973463b7b837145d9732171a91d82f0f0cea148 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/110821 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Refactor GrCaps::renderTargetWritePixelsSupported to support for some GL ↵Gravatar Brian Salomon2018-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | workarounds Make indirect path in writeSurfacePixels2 use a copy rather than a draw. Fix issue in GrVkGpu where render target dirty region is not updated after copy-as-draw Remove unnecessary resolve of MSAA RT in GrVkCopyManager. Splits WritePixelsNonTexture_Gpu test into MSAA and non-MSAA variants. MSAA variant blacklisted on Adreno because of: Bug: skia:7663 ~~~~~~AND~~~~~~~ Revert "Suppress CopySurface test on Nexus 7" This reverts commit b42b6169d52408a1712c2740655300465cd6ff1e. Bug: skia:7658 Change-Id: I8337d718efb41e266537744bbf5ff8b1545322a7 Reviewed-on: https://skia-review.googlesource.com/110700 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Move atlas manager creation to GrContext derived classesGravatar Robert Phillips2018-02-28
| | | | | | | | | | This CL relies on: https://skia-review.googlesource.com/c/skia/+/108001 (Fission GrAtlasGlyphCache in two) TBR=bsalomon@google.com Change-Id: Ic3f91cea2238221b970f8ebbda99b10202925cd8 Reviewed-on: https://skia-review.googlesource.com/110621 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@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>
* fix crasher in path-->regionGravatar Mike Reed2018-02-27
| | | | | | | | | Bug: skia:7491 Change-Id: I7e8b9fbe43098094d5935331107c3f40fb6971ec Reviewed-on: https://skia-review.googlesource.com/110721 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Cary Clark <caryclark@google.com> Reviewed-by: Yuqian Li <liyuqian@google.com>
* updated includesGravatar Cary Clark2018-02-27
| | | | | | | | | | | | update includes to latest bookmaker docs TBR=reed@google.com Bug: skia:6898 Change-Id: If42ab25f98a0f0d8b410ae30ca1cd641e19ce89f Reviewed-on: https://skia-review.googlesource.com/107021 Commit-Queue: Cary Clark <caryclark@skia.org> Reviewed-by: Cary Clark <caryclark@skia.org>
* Start on new GPU pixel ops implementation.Gravatar Brian Salomon2018-02-26
| | | | | | | | | | | | | The new ops attempt to be less optimal by falling back to CPU conversions rather than relying on intermediate draws and complex coordination between GrContext and GrGpu to determine how conversions are performed. This adds the new writePixels implementation. Change-Id: I7496d86d5a40277ed2ca63668881c160e54d80d3 Reviewed-on: https://skia-review.googlesource.com/109880 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add some additional checks for shadow generationGravatar Jim Van Verth2018-02-26
| | | | | | | Change-Id: I4dae4173ad879827e4e1fa3ad12aa0447d1df252 Reviewed-on: https://skia-review.googlesource.com/110360 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Revert "Revert "Fixes to alignment issues with regards to mapped vulkan ↵Gravatar Greg Daniel2018-02-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | memory."" This reverts commit 88fdee9bde97df106a8d81b450982b8296a2bc90. Reason for revert: Pre Fixes landed in other repos Original change's description: > Revert "Fixes to alignment issues with regards to mapped vulkan memory." > > This reverts commit 9fb6cf4c49b0f095e5cc005feb05b5522731421b. > > Reason for revert: breaks fuchsia > > Original change's description: > > Fixes to alignment issues with regards to mapped vulkan memory. > > > > Bug: skia: > > Change-Id: Ida9813fe774580a6d157b8eb8d330488c8e8c4bc > > Reviewed-on: https://skia-review.googlesource.com/109483 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Jim Van Verth <jvanverth@google.com> > > TBR=djsollen@google.com,egdaniel@google.com,jvanverth@google.com > > # Not skipping CQ checks because original CL landed > 1 day ago. > > Bug: skia: > Change-Id: If1223313cab27737ada401d1f3fe4b7ab849d03f > Reviewed-on: https://skia-review.googlesource.com/110040 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> Bug: skia: Change-Id: Ifeebf535c3617674846f7ef25e686ee11ceee65c Reviewed-on: https://skia-review.googlesource.com/110160 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Greg Daniel <egdaniel@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 "Fixes to alignment issues with regards to mapped vulkan memory."Gravatar Greg Daniel2018-02-25
| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9fb6cf4c49b0f095e5cc005feb05b5522731421b. Reason for revert: breaks fuchsia Original change's description: > Fixes to alignment issues with regards to mapped vulkan memory. > > Bug: skia: > Change-Id: Ida9813fe774580a6d157b8eb8d330488c8e8c4bc > Reviewed-on: https://skia-review.googlesource.com/109483 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Jim Van Verth <jvanverth@google.com> TBR=djsollen@google.com,egdaniel@google.com,jvanverth@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: skia: Change-Id: If1223313cab27737ada401d1f3fe4b7ab849d03f Reviewed-on: https://skia-review.googlesource.com/110040 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Fixes to alignment issues with regards to mapped vulkan memory.Gravatar Greg Daniel2018-02-23
| | | | | | | | Bug: skia: Change-Id: Ida9813fe774580a6d157b8eb8d330488c8e8c4bc Reviewed-on: https://skia-review.googlesource.com/109483 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* ccpr: Prefer atlas sizes under 4k on ARMGravatar Chris Dalton2018-02-22
| | | | | | | | Bug: skia: Change-Id: Ib5afb84647efe2e64a3ec2f9da422b39228431e9 Reviewed-on: https://skia-review.googlesource.com/108871 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* move some RRect methods into privGravatar Mike Reed2018-02-22
| | | | | | | | | | also, return radii by value instead of reference, in possible prep for changing underlying representation Bug: skia:7649 Change-Id: Iff42a49c53cc48171fc63462be366cc3500b2273 Reviewed-on: https://skia-review.googlesource.com/109385 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Brian Salomon <bsalomon@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>