aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
Commit message (Collapse)AuthorAge
* Disable use of directly wrapping msaa RTs on VulkanGravatar Greg Daniel2017-04-20
| | | | | | | | | | | | | | | Currently the Vulkan backend is set up to always treat the "resolve" target as the main VkImage in a render target and the msaa is a side cart image. This makes it difficult to just wrap an msaa image that we don't own. However, unlike GL the equivalent FBO 0 will never be multisampled so there isn't much use for the functionality. Once we find a need for it we can find a way to refactor to make it work. Bug: skia: Change-Id: I121e9c72a70c2a6f1aaddba2dbae19d8bddc3998 Reviewed-on: https://skia-review.googlesource.com/13980 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert "Revert "Plumb GrBackendTexture throughout skia.""Gravatar Greg Daniel2017-04-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7fa5c31c2c9af834bee66d5fcf476e250076c8d6. Reason for revert: Relanding this change now that other fixes have landed. Original change's description: > Revert "Plumb GrBackendTexture throughout skia." > > This reverts commit 7da62b9059f3c1d31624a0e4da96ee5f908f9c12. > > Reason for revert: fix android roll > > Original change's description: > > Plumb GrBackendTexture throughout skia. > > > > Bug: skia: > > Change-Id: I1bae6768ee7229818a83ba608035a1f7867e6875 > > Reviewed-on: https://skia-review.googlesource.com/13645 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Robert Phillips <robertphillips@google.com> > > > > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org,stani@google.com > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: I5cb8763cc837c83ebc6d10366fe2dd3efe35fb89 > Reviewed-on: https://skia-review.googlesource.com/13773 > Reviewed-by: Stan Iliev <stani@google.com> > Commit-Queue: Stan Iliev <stani@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org,brianosman@google.com,stani@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I92bc074e4fe37fa5c83186afadc472c03802e8f2 Reviewed-on: https://skia-review.googlesource.com/13975 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Add abandoned GPU check to createTextureProxyGravatar Robert Phillips2017-04-20
| | | | | | | | | | I'm guessing the crash is actually on the first 'fGpu' reference in createTextureProxy after the GPU context has been abandoned. Bug: 712929 Change-Id: Ia6742da7073c2320e592b42fcf2d0e7c04eeefb9 Reviewed-on: https://skia-review.googlesource.com/13966 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Remove all config conversion modes except round-to-nearestGravatar Brian Osman2017-04-20
| | | | | | | | | | | On all GPUs where we can perfectly round-trip, this mode does so. This mode fails on Mali 400 and Tegra 3, but nothing works there. Bug: skia: Change-Id: Ifb045fc772a5b1c03b51b5cb2ae039fe792d17bb Reviewed-on: https://skia-review.googlesource.com/13271 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* rectangle texture scaling is now handled in skslcGravatar Ethan Nicholas2017-04-20
| | | | | | | | Bug: skia: Change-Id: I658a95576143d69656cd63aec44ff65d430d332f Reviewed-on: https://skia-review.googlesource.com/13813 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Remove incorrect assertGravatar Brian Osman2017-04-20
| | | | | | | | | | | | We only need to verify that we've tested the PM conversion if we're about to use GrConfigConversionEffect. For the else case, no such guarantee is made, so the assert is wrong. Bug: chromium:713462 Change-Id: I5ffcc0c5f7de4e9614e9ccd83140acc9ab4f7283 Reviewed-on: https://skia-review.googlesource.com/13962 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Disable multisampling on Vulkan Nexus Player botGravatar Greg Daniel2017-04-19
| | | | | | | | Bug: skia: Change-Id: Ic0dcca7a5dd21f1bfd1e40c78f98ac4c9f7e9ee5 Reviewed-on: https://skia-review.googlesource.com/13815 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert "Plumb GrBackendTexture throughout skia."Gravatar Stan Iliev2017-04-19
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7da62b9059f3c1d31624a0e4da96ee5f908f9c12. Reason for revert: fix android roll Original change's description: > Plumb GrBackendTexture throughout skia. > > Bug: skia: > Change-Id: I1bae6768ee7229818a83ba608035a1f7867e6875 > Reviewed-on: https://skia-review.googlesource.com/13645 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org,stani@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I5cb8763cc837c83ebc6d10366fe2dd3efe35fb89 Reviewed-on: https://skia-review.googlesource.com/13773 Reviewed-by: Stan Iliev <stani@google.com> Commit-Queue: Stan Iliev <stani@google.com>
* Plumb GrBackendTexture throughout skia.Gravatar Greg Daniel2017-04-18
| | | | | | | | Bug: skia: Change-Id: I1bae6768ee7229818a83ba608035a1f7867e6875 Reviewed-on: https://skia-review.googlesource.com/13645 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Fix missing tolerance in GrPathUtils::worstCasePointCountGravatar Robert Phillips2017-04-18
| | | | | | | | | | | | https://skia-review.googlesource.com/c/10752/ (Use correct tolerance for conic chopping in MSAA and default path renderers) changed the tolerance used in createGeom but didn't change the setting in worstCasePointCount. Bug: 711936, 712749 Change-Id: I540d8bc8cfdebc3eae5204e1acfeba3cefc2b12e Reviewed-on: https://skia-review.googlesource.com/13768 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Fix resolve assert in vulkanGravatar Greg Daniel2017-04-18
| | | | | | | | Bug: skia: Change-Id: I4fbf067112901a86faa7df301d3442281f563bcb Reviewed-on: https://skia-review.googlesource.com/13767 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Add backend safe classes for passing in external texture and render targets ↵Gravatar Greg Daniel2017-04-18
| | | | | | | | | | | | | | | | | into gpu This CL adds the GrBackend* classes as well as just updates the API for SkSurface and SkImage. The implementation on SkSurface/Image and the plumbing down into Ganesh will be in an additional CL. Besides the change to use the type safe classes, we also pull the SurfaceFlags, origin, samples, out of the descriptor and pass those in directly. Bug: skia: Change-Id: I9702981fe26c3d5d7d2cbcf6977ba569d356d854 Reviewed-on: https://skia-review.googlesource.com/13122 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Fix some bugs with read/writePixelsGravatar Brian Osman2017-04-18
| | | | | | | | | | | | | | | | | | | | - On both GL and Vulkan, we must draw if writing to an MSAA surface. Otherwise we just write to the resolve target texture, which gets overwritten on the next resolve. - On Vulkan, we must draw if the target isn't a texture. (This check was already present in onWritePixels). - On Vulkan, when reading from an MSAA surface as a different config, we don't need the readConfig to be renderable with MSAA - the temp surface is always created non-MSAA. - Added tests for these fixes, verified that they failed previously. Bug: skia: Change-Id: Ia2d5025d7a8f8de8630413453f83b58028dd41aa Reviewed-on: https://skia-review.googlesource.com/13691 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Allow the dst of vulkan resolves to be a non RTGravatar Greg Daniel2017-04-18
| | | | | | | | Bug: skia: Change-Id: I79884127719b2364c2a986beda8856bee0583a5b Reviewed-on: https://skia-review.googlesource.com/13724 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Revert "Split up opLists"Gravatar Robert Phillips2017-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit bc8ee52d4649afdc972599e5ef2a2a543867985d. Reason for revert: Instanced rendering is broken Original change's description: > Split up opLists > > Split into: > https://skia-review.googlesource.com/c/11793/ (Remove lastProxy capability from GrSurface) > > Change-Id: I903ba30e17de4aab8cb0d2cc3281ae5c262142f9 > Reviewed-on: https://skia-review.googlesource.com/11581 > Commit-Queue: Robert Phillips <robertphillips@google.com> > Reviewed-by: Brian Osman <brianosman@google.com> > TBR=egdaniel@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ic3ae650630a09730d40da4a9587d9e25a9dd5e6c Reviewed-on: https://skia-review.googlesource.com/13725 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Split up opListsGravatar Robert Phillips2017-04-18
| | | | | | | | | | Split into: https://skia-review.googlesource.com/c/11793/ (Remove lastProxy capability from GrSurface) Change-Id: I903ba30e17de4aab8cb0d2cc3281ae5c262142f9 Reviewed-on: https://skia-review.googlesource.com/11581 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Re-enable deferred proxies in ChromeGravatar Robert Phillips2017-04-18
| | | | | | | | | | | Chrome has branched. TBR=bsalomon@google.com Change-Id: I578deafd63af9e86ff8f7cf8f8ccad6a901c1b21 Reviewed-on: https://skia-review.googlesource.com/13687 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Pass GrSurfaceContext into read/writeSurfacePixelsGravatar Robert Phillips2017-04-18
| | | | | | | | | This is mainly so writeSurfacePixels can have continuity of surfaceContext when it draws. Change-Id: I34f1dc5c4c3dcfa7bf91aa3ad72b7a48ed9de1a9 Reviewed-on: https://skia-review.googlesource.com/13595 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Split cleanup changes out of bigger CL (take 2)Gravatar Robert Phillips2017-04-18
| | | | | | | | | | | | | This are split out of: https://skia-review.googlesource.com/c/11581/ (Split up opLists) This is a reland of: https://skia-review.googlesource.com/c/13585/ (Split cleanup changes out of bigger CL) TBR=bsalomon@google.com Change-Id: Id0d5c764953230412e78ae6aa654f8dfae998c60 Reviewed-on: https://skia-review.googlesource.com/13643 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Pass LC_ALL_MASK to newlocaleGravatar Eric Karl2017-04-17
| | | | | | | | | | | | | | | This change fixes an issue with GrAutoLocaleSetter, which was using the C library LC_ALL mask with newlocale. Instead the xlocale LC_ALL_MASK should be used (these do not match on all platforms). See: http://man7.org/linux/man-pages/man3/newlocale.3.html Bug: 711683 Change-Id: I6dba140e72b095f75667f0dcc98480d8d4562191 Reviewed-on: https://skia-review.googlesource.com/13601 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Re-arrange GrResourceProvider's texture creation methodsGravatar Robert Phillips2017-04-17
| | | | | | | | | This is all in service of removing the last raw writeSurfacePixels (that we can do anything about) Change-Id: Ic84f677b2440b20e5fcc23e787584db0cfaecd01 Reviewed-on: https://skia-review.googlesource.com/13584 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Revert "Split cleanup changes out of bigger CL"Gravatar Mike Klein2017-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit cd11c809f206af0da3ce1779dee3c91193baa7b0. Reason for revert: assert(rtp->getLastOpList()) Original change's description: > Split cleanup changes out of bigger CL > > This are split out of: https://skia-review.googlesource.com/c/11581/ (Split up opLists) > > TBR=bsalomon@google.com > > Change-Id: I1239e806a30a93d3c17ad933f118b98a5077dd3a > Reviewed-on: https://skia-review.googlesource.com/13585 > Commit-Queue: Robert Phillips <robertphillips@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ia3ef7322fe830a6a4dc29226ce931d35d181c6e0 Reviewed-on: https://skia-review.googlesource.com/13641 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Split cleanup changes out of bigger CLGravatar Robert Phillips2017-04-17
| | | | | | | | | | | This are split out of: https://skia-review.googlesource.com/c/11581/ (Split up opLists) TBR=bsalomon@google.com Change-Id: I1239e806a30a93d3c17ad933f118b98a5077dd3a Reviewed-on: https://skia-review.googlesource.com/13585 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Further refactor read/writeSurfacePixelsGravatar Brian Osman2017-04-17
| | | | | | | | | | | | | | | Detect the situation where we're going to want to do PM/UPM, and want to use GrConfigConverionEffect, but be unable (due to the lack of a round-trip pair). This lets us hoist the SW premul work (in writeSurfacePixels), and avoid all the cascading failure logic in both functions. (We never try to create the PM/UPM effects unless we know that they're going to work). Bug: skia:5853 Change-Id: I0077447cd4be93bba273f8d2826b1ec0f4915c6c Reviewed-on: https://skia-review.googlesource.com/13592 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* hide lockpixels api behind flagGravatar Mike Reed2017-04-17
| | | | | | | | | | | | | | guarded by SK_SUPPORT_OBSOLETE_LOCKPIXELS needs https://codereview.chromium.org/2820873002/# to land first Bug: skia:6481 Change-Id: I1c39902cbf6fe99f622adfa8192733b95f7fea09 Change-Id: I1c39902cbf6fe99f622adfa8192733b95f7fea09 Reviewed-on: https://skia-review.googlesource.com/13580 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Remove lastOpList capability from GrSurfaceGravatar Robert Phillips2017-04-17
| | | | | | | | | | | This is split out of: https://skia-review.googlesource.com/c/11581/ (Split up opLists) TBR=bsalomon@google.com Change-Id: I80d589b42918ddd77538484c808b069576691da4 Reviewed-on: https://skia-review.googlesource.com/11793 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* sk_sp-ify opList creation & storageGravatar Robert Phillips2017-04-14
| | | | | | | Change-Id: Idd4d81cd248ad2b2169028ac2e269a66c9cad26b Reviewed-on: https://skia-review.googlesource.com/13400 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Improve accuracy of cubic classificationGravatar Chris Dalton2017-04-14
| | | | | | | | | | | | | | | | | | - Updates the logic to reflect the Loop-Blinn paper instead of the GPU gems website. - Removes the threshold for detecting local cusps. The serpentine codepath works for these cusps anyway, so what we really want to know is whether the discriminant is negative. - Makes sure to not scale the inflection function by 1/0. - Shifts the inflection function coefficients in d[] so they match the paper. - Stores the cubic discriminant in d[0]. Bug: skia: Change-Id: I909a522a0fd27c9c8dfbc27d968bc43eeb7a416f Reviewed-on: https://skia-review.googlesource.com/13304 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Further unify logic in readSurfacePixels and writeSurfacePixelsGravatar Brian Osman2017-04-13
| | | | | | | | | | | | | | | | | | | | Hoist simple failure checks to the beginning, apply logic in the same sequence in both functions. Factor out some common logic. Remove redundant checking inside other helper functions (that are only used from here). I'm inching towards better sRGB and color-conversion support in these functions, but I don't want that intertwined with the legacy premul software fallback. Next step is probably to diverge at the top-level, and keep the current code as "legacy" versions, with new versions that don't have the fallback logic, only used for configs and color space scenarios where it doesn't matter. Bug: skia:5853 Change-Id: I327be5f0186a16ceda9440670fb0646acaef7766 Reviewed-on: https://skia-review.googlesource.com/13337 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Move GrAtlasGlyphCache over to SkArenaAlloc from SkVarAlloc.Gravatar Herb Derby2017-04-13
| | | | | | | Change-Id: Ibeee7235d30c68be9fd4f68ecf30a65c7ecb78f5 Reviewed-on: https://skia-review.googlesource.com/13020 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Remove GrRenderTargetOpList::discard & move functionality to ↵Gravatar Robert Phillips2017-04-13
| | | | | | | | | GrRenderTargetContext Change-Id: If84ffb7b01543a44179837d683c0a4c004e52f63 Reviewed-on: https://skia-review.googlesource.com/13335 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Store the GrBackend we are using on GrContextGravatar Greg Daniel2017-04-13
| | | | | | | | | | | | | | As we start adding more functionality to external clients and passing data around, we will need to know what backend we are working with at a layer higher that GrGpu. TBR=bsalomon@google.com Bug: skia: Change-Id: Ifee527ea0c1046469401a39e0500f84a46bb3081 Reviewed-on: https://skia-review.googlesource.com/13275 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Make all GrRenderTargetOpList ops store a GrRenderTarget pointerGravatar Robert Phillips2017-04-13
| | | | | | | Change-Id: I39652b4b8b2ba96b5206304dfc51395283c3fe16 Reviewed-on: https://skia-review.googlesource.com/13332 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Do sRGB premul/unpremul on the GPUGravatar Brian Osman2017-04-13
| | | | | | | | | | | | | | | | | | Previously, the early check would decide that sRGB pixel configs were okay (because they're 8888-unorm). Then we'd go to make the effect and decide that we didn't want them to work. This led to the software fallback. The software fallback was obviously slower, but also doing non-linear premul/unpremul operations. Eventually, whether or not the premul is linear should be dictated by the destination color space, but for now, this is an improvement (and only affects the one GM that tests this feature). Bug: skia: Change-Id: I0cf1ad5a7f552135ac1da728c6db2977652a433b Reviewed-on: https://skia-review.googlesource.com/13321 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Fix cubic KLM solvingGravatar csmartdalton2017-04-12
| | | | | | | | | | | | Fixes calc_inverse_transpose_power_basis_matrix() to look for the determinant with the largest ABSOLUTE VALUE. BUG=skia: Change-Id: I70e26cc7ab9955d2e094fb7581f0ec9f5e0ae2d9 Reviewed-on: https://skia-review.googlesource.com/13081 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Disable deferred proxies for Chrome branchGravatar Robert Phillips2017-04-12
| | | | | | | | | Chrome is branching again and Proxy instantiation is still occurring at a bad spot in Skia. Change-Id: I2f6bed7f1833737aa9bb7fd819ff108cffaeaf1d Reviewed-on: https://skia-review.googlesource.com/13133 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Remove discard from GrRenderTarget & force it to always go through a ↵Gravatar Robert Phillips2017-04-11
| | | | | | | | | | | | | | | RenderTargetContext This is a bit sloppy in that it ignores some instances where discards were being issued before. The creation of the temp RTContext in the RenderTarget's discard method was causing an extra split in the opLists. This is split out of: https://skia-review.googlesource.com/c/10284/ (Omnibus: Remove GrSurface-derived classes from ops) Change-Id: Ic366d303280635763b0fae238c4df37c04fb8503 Reviewed-on: https://skia-review.googlesource.com/11125 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Rm makeRenderTargetContext in favor of deferred version"Gravatar Robert Phillips2017-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d83ec0441279b79551b4ecb4598696249ea55145. Reason for revert: various bot failures Original change's description: > Rm makeRenderTargetContext in favor of deferred version > > Change-Id: Ifdf67453607256ba7cdb0837263377bd83907212 > Reviewed-on: https://skia-review.googlesource.com/13001 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I4e67a20cbe658b24725dcf386ac8bfdd127647ea Reviewed-on: https://skia-review.googlesource.com/13131 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Rm makeRenderTargetContext in favor of deferred versionGravatar Robert Phillips2017-04-11
| | | | | | | Change-Id: Ifdf67453607256ba7cdb0837263377bd83907212 Reviewed-on: https://skia-review.googlesource.com/13001 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* getDeferredTextureImageData(): preserve color space in legacy modeGravatar Matt Sarett2017-04-10
| | | | | | | | Bug: skia: Change-Id: Ib205f6104827b734635df6932d6dcfdc2248d091 Reviewed-on: https://skia-review.googlesource.com/12103 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* PM/UPM conversion improvementsGravatar Brian Osman2017-04-10
| | | | | | | | | | | | | Snap input values to N / 255 before doing PM/UPM conversions, and add a new round-to-nearest conversion pair. With the pre-snapping, that pair is chosen by (almost?) every GPU we have. This now lets us round trip perfectly on Mali GPUs (which were falling back to SW before). Bug: skia: Change-Id: I0cebf1382e1c829aedfef4ec1614d7fa980057b5 Reviewed-on: https://skia-review.googlesource.com/11520 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* constexprify GrBlend.h and GrPorterDuffXferProcessor.cppGravatar Brian Salomon2017-04-10
| | | | | | | | | | Also remove some unused functions from GrBlend.h and related unit test. Bug: skia: Change-Id: Id8ad0057a02f65a9e19dc75e4b88709a762f4139 Reviewed-on: https://skia-review.googlesource.com/12623 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Move ref counting out of GrProcessor and into subclasses.Gravatar Brian Salomon2017-04-10
| | | | | | | | | | | | | This will allow different subclasses to use different models for lifetime management. GrXferProcessor moves to simple ref counting since they don't own GrGpuResources. This also constifies GrXferProcessor factories. Change-Id: I6bea0ea8de718874063224232f9da50887868b16 Reviewed-on: https://skia-review.googlesource.com/11792 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* consolidate read/writePixels in GrSurfaceContextGravatar Robert Phillips2017-04-10
| | | | | | | Change-Id: I118fcd49990597d4dfea92efd3f9d99e52fdbfab Reviewed-on: https://skia-review.googlesource.com/11481 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Revert "Revert "Create GrXferProcessor while doing GrProcessorSet analysis.""Gravatar Brian Salomon2017-04-08
| | | | | | | | | | This reverts commit 5dac9b3b5bf7e9c06c207cb92e257535c7d9ec95. Bug: skia: Change-Id: I3db2ec6776eb10c1f863b3992a2c8048c54b130f Reviewed-on: https://skia-review.googlesource.com/12620 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Create GrXferProcessor while doing GrProcessorSet analysis."Gravatar Brian Salomon2017-04-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0ae0e23696f2ef08503040f8c02765eb58b26ddf. Reason for revert: static assert failure on ios build Original change's description: > Create GrXferProcessor while doing GrProcessorSet analysis. > > > Bug: skia: > Change-Id: I62a628f9c0536ffb05c8f9d0c9ded5657f93b48e > Reviewed-on: https://skia-review.googlesource.com/11482 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ifd57367b0326dd2b53c622705a868e246645d589 Reviewed-on: https://skia-review.googlesource.com/12104 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Create GrXferProcessor while doing GrProcessorSet analysis.Gravatar Brian Salomon2017-04-08
| | | | | | | | Bug: skia: Change-Id: I62a628f9c0536ffb05c8f9d0c9ded5657f93b48e Reviewed-on: https://skia-review.googlesource.com/11482 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Allow Vulkan to upload to main mip level without uploading to all levels.Gravatar Greg Daniel2017-04-07
| | | | | | | | | | | | It should be allowed for the client to upload original data to a texture via writePixels and then we just regenerate the mipmaps. I think it also resonable to limit this to either writting to all levels or just the top level. Bug: skia: Change-Id: I66943cca54c2a7187a781788653948fb69c17c68 Reviewed-on: https://skia-review.googlesource.com/11798 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Make GrCopySurfaceOp friendlier to GrSurfaceProxy (take 2)Gravatar Robert Phillips2017-04-07
| | | | | | | | | Reland of: https://skia-review.googlesource.com/c/11325/ (Make GrCopySurfaceOp friendlier to GrSurfaceProxy) Change-Id: Ibe7312cebe7793af5803353a1499fbe7874c558f Reviewed-on: https://skia-review.googlesource.com/11780 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Update stencil ops to have a parallel proxyIDGravatar Robert Phillips2017-04-06
| | | | | | | Change-Id: I842c7f2011c8b9d4487cec4349de8b77f326a381 Reviewed-on: https://skia-review.googlesource.com/11360 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>