aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
Commit message (Collapse)AuthorAge
* Refactor Vulkan support to support FuchsiaGravatar Michael Jurka2017-04-05
| | | | | | | | | | | | | | | | | - Refactor runtime lookup of Vulkan functions - Support Magma surfaces - Add build flags to toggle Vulkan support BUG=skia: Change-Id: Ic71965c453507882521443006c4155c7481a9a3f Reviewed-on: https://skia-review.googlesource.com/9342 Commit-Queue: Greg Daniel <egdaniel@google.com> Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Michael Jurka <mikejurka@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv ↵Gravatar Robert Phillips2017-04-05
| | | | | | | | | | | | | (take 2) This is in service of: https://skia-review.googlesource.com/c/11125/ (Add parallel proxyID to StencilOps & RenderTargetOpList) where I want a better choke point for texture creation to improve discard handling. This is a reland of: https://skia-review.googlesource.com/c/11200/ (Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv) Change-Id: Icd0a90d2beb483dc24ed87c3bace9c817019e148 Reviewed-on: https://skia-review.googlesource.com/11326 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Add SkImage::makeColorSpace() to public APIGravatar Matt Sarett2017-04-05
| | | | | | | | | | | | | Gives Chrome the flexibility to xform and cache SkImages before they reach the SkColorSpaceXformCanvas. Bug: skia: Change-Id: I1f188f385b953b5a958c15578ea66deffb4dc6c5 Reviewed-on: https://skia-review.googlesource.com/11290 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Reed <reed@google.com>
* Delete SkPixelRefFactoryGravatar Matt Sarett2017-04-05
| | | | | | | | | | No one seems to be using this. Bug: skia: Change-Id: Iab0644dda2c62bd58159e0a1537138aa2e1ebcbc Reviewed-on: https://skia-review.googlesource.com/11203 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Allow FPs to elevate default precision for the entire fragment programGravatar Brian Osman2017-04-05
| | | | | | | | | | | | | | | | | Currently, GrConfigConversionEffect is able to round-trip on many mobile GPUs because it uses highp for all intermediate variables (including the texture fetch result). Separating the texture sample into a different processor breaks that. This is a blunt instrument, not to be used lightly. This reverts commit dffe9827b18444d1426859d9035f9f0087201f44. Bug: skia: Change-Id: I940af3256c47e6672a008d516db9e55669672ca3 Reviewed-on: https://skia-review.googlesource.com/11345 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "Rm readPixels from GrSurface & move read/writeSurfacePixels to ↵Gravatar Robert Phillips2017-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | GrContextPriv" This reverts commit fb0bd98a43fa11e09705837418167dd72bb4a361. Reason for revert: ANGLE failures Original change's description: > Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv > > This is in service of: https://skia-review.googlesource.com/c/11125/ (Add parallel proxyID to StencilOps & RenderTargetOpList) where I want a better choke point for texture creation to improve discard handling. > > Change-Id: If57a7de47edc0853dae7bc61337d9acdc03d63b0 > Reviewed-on: https://skia-review.googlesource.com/11200 > 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: I7241070dc1f9df47181061e07adab141f9857974 Reviewed-on: https://skia-review.googlesource.com/11324 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* remove SK_SUPPORT_LEGACY_PAINT_TEXTDECORATIONGravatar Mike Reed2017-04-05
| | | | | | | | Bug: skia: Change-Id: I8187fdc554de5f052b953ce1a41e4fa8af6e5b16 Reviewed-on: https://skia-review.googlesource.com/11323 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPrivGravatar Robert Phillips2017-04-05
| | | | | | | | | This is in service of: https://skia-review.googlesource.com/c/11125/ (Add parallel proxyID to StencilOps & RenderTargetOpList) where I want a better choke point for texture creation to improve discard handling. Change-Id: If57a7de47edc0853dae7bc61337d9acdc03d63b0 Reviewed-on: https://skia-review.googlesource.com/11200 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* remove legacy canvas helpersGravatar Mike Reed2017-04-05
| | | | | | | | Bug: skia: Change-Id: I79e08adb49556be506e6198d9fadda684bcb08f2 Reviewed-on: https://skia-review.googlesource.com/11321 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Respect kRectsMustMatchForMSAASrc_BlitFramebufferFlag in dst setupGravatar Eric Karl2017-04-04
| | | | | | | | | | | | | | | Crurently, when preparing a texture for blitFramebuffer, we ignore the kRectsMustMatchForMSAASrc_BlitFramebufferFlag, and may attempt to copy from one src rect to a different dst rect. This change updates initDescForDstCopy and setupDstTexture to allocate larger textures if necessary and accomodate this flags requirements. Bug: 658277 Change-Id: If4489ac3192dcf6f9996494c63821279721d0a12 Reviewed-on: https://skia-review.googlesource.com/11141 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Move the ability to access textures, buffers, and image storages out from ↵Gravatar Brian Salomon2017-04-04
| | | | | | | | | | | GrProcessor. GrXferProcessor can no longer use this functionality so it is moved to a new intermediate class inherited by GrFragmentProcessor and GrPrimitiveProcessor. Change-Id: I4f30c89bdceb2d77b602bf0646107e0780881c26 Reviewed-on: https://skia-review.googlesource.com/11202 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Fully remove coord transform precision codeGravatar Brian Osman2017-04-04
| | | | | | | | | | Coord transforms are always computed and interpolated at high precision. Bug: skia: Change-Id: I5f7eadc2080df8ad5cbb080835c0dba09c59e63e Reviewed-on: https://skia-review.googlesource.com/11180 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert[4] "clean up (partially) colortable api""""Gravatar Mike Reed2017-04-03
| | | | | | | | | | | | | | Fixes: - create temp api for android to pass nullptr - don't release and access sk_sp<SkData> at the same time in parameters This reverts commit b14131c1851eea6acbd34cc42a8f860daed36b21. Bug: skia: Change-Id: Ic0e4f62520ba9f35455499ed30d306ad19d998a8 Reviewed-on: https://skia-review.googlesource.com/11129 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Use SkTransferFunctionBehavior in SkImageGeneratorGravatar Matt Sarett2017-04-03
| | | | | | | | | | | | This fixes SkColorSpaceXformCanvas gms that expect non-linear premuls from the codec. BUG=skia: Change-Id: I5dc236d0cd760c23605a26e9c33ddb18955f9231 Reviewed-on: https://skia-review.googlesource.com/10164 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Matt Sarett <msarett@google.com>
* Convert all coord transforms to high precisionGravatar Brian Osman2017-04-03
| | | | | | | | | | | | Testing this to see what the performance/quality tradeoff is. This is known to fix some gradient bugs on Mali, but we want to observe perf and see if it slows thigs down. Bug: skia:5654 Change-Id: I988410478e89576b8e81786f49e627915e224d42 Reviewed-on: https://skia-review.googlesource.com/11128 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* move vertex-mode enum into SkVerticesGravatar Mike Reed2017-04-03
| | | | | | | | | BUG=skia:6366 Change-Id: I3c0bf96cce6d32c9b8d12d16a772aaa6f18981aa Reviewed-on: https://skia-review.googlesource.com/11062 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "Revert "Allow FPs to elevate default precision for the ↵Gravatar Brian Osman2017-04-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | entire fragment program""" This reverts commit ec53c636b781830cb6146bb32106d4ee44651fcc. Reason for revert: Mali GMs look bad. Original change's description: > Revert "Revert "Allow FPs to elevate default precision for the entire fragment program"" > > This reverts commit 903c3f70400462e191ccbca63393b2df3fe2dd11. > > Reason for revert: Vulkan issue fixed in compiler. > > Original change's description: > > Revert "Allow FPs to elevate default precision for the entire fragment program" > > > > This reverts commit 92d7ccafdf896cf19764e025873d13315a76842d. > > > > Reason for revert: Vulkan errors. > > > > Original change's description: > > > Allow FPs to elevate default precision for the entire fragment program > > > > > > Currently, GrConfigConversionEffect is able to round-trip on many mobile > > > GPUs because it uses highp for all intermediate variables (including the > > > texture fetch result). Separating the texture sample into a different > > > processor breaks that. > > > > > > This is a blunt instrument, not to be used lightly. > > > > > > Bug: skia: > > > Change-Id: I2ab365e3da79628069e2eb727c43c2bf45bfd789 > > > Reviewed-on: https://skia-review.googlesource.com/10162 > > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > > Commit-Queue: Brian Osman <brianosman@google.com> > > > > > > > TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com,ethannicholas@google.com,reviews@skia.org > > NOPRESUBMIT=true > > NOTREECHECKS=true > > NOTRY=true > > > > Change-Id: Iee5bb409f86a9cabecc76bd1273a5b3cef6af179 > > Reviewed-on: https://skia-review.googlesource.com/10967 > > Reviewed-by: Brian Osman <brianosman@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > > > TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org,brianosman@google.com,ethannicholas@google.com > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: I733a0ecc40b58d8727f0259b5498c8e6610cedce > Reviewed-on: https://skia-review.googlesource.com/11010 > Reviewed-by: Brian Osman <brianosman@google.com> > Commit-Queue: Brian Osman <brianosman@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org,brianosman@google.com,ethannicholas@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: Ic3274a0a8b776e811354c3441391ffdc80678292 Reviewed-on: https://skia-review.googlesource.com/11061 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "Revert[2] "clean up (partially) colortable api"""Gravatar Mike Reed2017-04-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9920b10f5292838f00600f676c4578cd11705e60. Reason for revert: trying to get details on w2k failure https://chromium-swarm.appspot.com/task?id=354345d34ba3b310&refresh=10 Caught exception 3221225477 EXCEPTION_ACCESS_VIOLATION, was running: unit test HugeBlurImageFilter unit test FontNames unit test Codec_PngRoundTrip unit test ClampRange unit test FontHost unit test ColorMatrixFilter f16 image scaled_codec_premul abnormal.wbmp 565 image brd_android_codec_divisor_0.167 interlaced3.png_0.167 unit test Codec_png unit test ImageFilterBlurLargeImage unit test FontObj unit test DrawText unit test GrShape 565 image brd_android_codec_divisor_0.333 interlaced2.png_0.333 unit test PathOpsOpCubicsThreaded unit test PathOpsOpLoopsThreaded unit test FontMgr unit test ColorToHSVRoundTrip unit test Image_Serialize_Encoding_Failure Likely culprit: unit test Image_Serialize_Encoding_Failure step returned non-zero exit code: -1073741819 Original change's description: > Revert[2] "clean up (partially) colortable api"" > > This reverts commit 1d1165ca6575e082b892c5460492c411618783ad. > > Bug: skia: > Change-Id: Idbc0634ae3cec2e79f592d252de8751b077e6408 > Reviewed-on: https://skia-review.googlesource.com/11024 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ia4e73434b083224baa36092c69526c2f59bb16aa Reviewed-on: https://skia-review.googlesource.com/11025 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert[2] "clean up (partially) colortable api""Gravatar Mike Reed2017-04-01
| | | | | | | | | | This reverts commit 1d1165ca6575e082b892c5460492c411618783ad. Bug: skia: Change-Id: Idbc0634ae3cec2e79f592d252de8751b077e6408 Reviewed-on: https://skia-review.googlesource.com/11024 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Respect kRectsMustMatchForMSAASrc_BlitFramebufferFlag in dst setup"Gravatar Mike Klein2017-04-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d58f040532f2f5a63d24bd17d7c588e52c0b99c3. Reason for revert: tests/BlendTest is failing on the Nexus Player: https://chromium-swarm.appspot.com/task?id=353ffc638e202210 https://chromium-swarm.appspot.com/task?id=353ff5e35819ab10 Original change's description: > Respect kRectsMustMatchForMSAASrc_BlitFramebufferFlag in dst setup > > Crurently, when preparing a texture for blitFramebuffer, we ignore the > kRectsMustMatchForMSAASrc_BlitFramebufferFlag, and may attempt to > copy from one src rect to a different dst rect. > > This change updates initDescForDstCopy and setupDstTexture to allocate > larger textures if necessary and accomodate this flags requirements. > > Bug: 658277 > Change-Id: I9f45a03d4055e0ad87c01e1d826287695096e609 > Reviewed-on: https://skia-review.googlesource.com/10941 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > TBR=bsalomon@google.com,ericrk@chromium.org,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I0fd6ca95bbc342f21978783b0103073179017795 Reviewed-on: https://skia-review.googlesource.com/11016 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Respect kRectsMustMatchForMSAASrc_BlitFramebufferFlag in dst setupGravatar Eric Karl2017-04-01
| | | | | | | | | | | | | | | Crurently, when preparing a texture for blitFramebuffer, we ignore the kRectsMustMatchForMSAASrc_BlitFramebufferFlag, and may attempt to copy from one src rect to a different dst rect. This change updates initDescForDstCopy and setupDstTexture to allocate larger textures if necessary and accomodate this flags requirements. Bug: 658277 Change-Id: I9f45a03d4055e0ad87c01e1d826287695096e609 Reviewed-on: https://skia-review.googlesource.com/10941 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Revert "Allow FPs to elevate default precision for the entire ↵Gravatar Brian Osman2017-03-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fragment program"" This reverts commit 903c3f70400462e191ccbca63393b2df3fe2dd11. Reason for revert: Vulkan issue fixed in compiler. Original change's description: > Revert "Allow FPs to elevate default precision for the entire fragment program" > > This reverts commit 92d7ccafdf896cf19764e025873d13315a76842d. > > Reason for revert: Vulkan errors. > > Original change's description: > > Allow FPs to elevate default precision for the entire fragment program > > > > Currently, GrConfigConversionEffect is able to round-trip on many mobile > > GPUs because it uses highp for all intermediate variables (including the > > texture fetch result). Separating the texture sample into a different > > processor breaks that. > > > > This is a blunt instrument, not to be used lightly. > > > > Bug: skia: > > Change-Id: I2ab365e3da79628069e2eb727c43c2bf45bfd789 > > Reviewed-on: https://skia-review.googlesource.com/10162 > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > > > TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com,ethannicholas@google.com,reviews@skia.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: Iee5bb409f86a9cabecc76bd1273a5b3cef6af179 > Reviewed-on: https://skia-review.googlesource.com/10967 > Reviewed-by: Brian Osman <brianosman@google.com> > Commit-Queue: Brian Osman <brianosman@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org,brianosman@google.com,ethannicholas@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I733a0ecc40b58d8727f0259b5498c8e6610cedce Reviewed-on: https://skia-review.googlesource.com/11010 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "Allow FPs to elevate default precision for the entire fragment program"Gravatar Brian Osman2017-03-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 92d7ccafdf896cf19764e025873d13315a76842d. Reason for revert: Vulkan errors. Original change's description: > Allow FPs to elevate default precision for the entire fragment program > > Currently, GrConfigConversionEffect is able to round-trip on many mobile > GPUs because it uses highp for all intermediate variables (including the > texture fetch result). Separating the texture sample into a different > processor breaks that. > > This is a blunt instrument, not to be used lightly. > > Bug: skia: > Change-Id: I2ab365e3da79628069e2eb727c43c2bf45bfd789 > Reviewed-on: https://skia-review.googlesource.com/10162 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Brian Osman <brianosman@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com,ethannicholas@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Iee5bb409f86a9cabecc76bd1273a5b3cef6af179 Reviewed-on: https://skia-review.googlesource.com/10967 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "clean up (partially) colortable api"Gravatar Mike Klein2017-03-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2e491a6a113c5e16a3b7bede5fa6f588deeb928d. Reason for revert: Windows unit tests failing? Original change's description: > clean up (partially) colortable api > > Needs this to land: https://codereview.chromium.org/2789853002/ > > Bug: skia: > Change-Id: I38d916a546b7fa64d000d973e695ddda24a589e7 > Reviewed-on: https://skia-review.googlesource.com/10600 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Matt Sarett <msarett@google.com> > TBR=msarett@google.com,scroggo@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I626e7edfcea82576a440dcaa851a04cedee6233f Reviewed-on: https://skia-review.googlesource.com/10966 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Add tracking of unique proxyID beside unique renderTargetID in auditTrail ↵Gravatar Robert Phillips2017-03-31
| | | | | | | | | | | and clearOp Split out of: https://skia-review.googlesource.com/c/10284/ (Omnibus: Remove GrSurface-derived classes from ops) Change-Id: I5845a47d94decc455ec3b1f0a5876b1c82aa32e8 Reviewed-on: https://skia-review.googlesource.com/10750 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Allow FPs to elevate default precision for the entire fragment programGravatar Brian Osman2017-03-31
| | | | | | | | | | | | | | | Currently, GrConfigConversionEffect is able to round-trip on many mobile GPUs because it uses highp for all intermediate variables (including the texture fetch result). Separating the texture sample into a different processor breaks that. This is a blunt instrument, not to be used lightly. Bug: skia: Change-Id: I2ab365e3da79628069e2eb727c43c2bf45bfd789 Reviewed-on: https://skia-review.googlesource.com/10162 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* clean up (partially) colortable apiGravatar Mike Reed2017-03-31
| | | | | | | | | | Needs this to land: https://codereview.chromium.org/2789853002/ Bug: skia: Change-Id: I38d916a546b7fa64d000d973e695ddda24a589e7 Reviewed-on: https://skia-review.googlesource.com/10600 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Revert "Respect kRectsMustMatchForMSAASrc_BlitFramebufferFlag in dst setup"Gravatar Brian Salomon2017-03-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e0ff6ab272dcc5c4d6f3b509da7e0e97acada814. Reason for revert: a bunch of bots failed. Original change's description: > Respect kRectsMustMatchForMSAASrc_BlitFramebufferFlag in dst setup > > Crurently, when preparing a texture for blitFramebuffer, we ignore the > kRectsMustMatchForMSAASrc_BlitFramebufferFlag, and may attempt to > copy from one src rect to a different dst rect. > > This change updates initDescForDstCopy and setupDstTexture to allocate > larger textures if necessary and accomodate this flags requirements. > > Bug: 658277 > Change-Id: I500f10dba5700f5f7a7acad04bcdbc9ac9994835 > Reviewed-on: https://skia-review.googlesource.com/10247 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > TBR=bsalomon@google.com,ericrk@chromium.org,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I7fbd6c2652fe71c707d3120b035e0365fbc7fa66 Reviewed-on: https://skia-review.googlesource.com/10920 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Respect kRectsMustMatchForMSAASrc_BlitFramebufferFlag in dst setupGravatar Eric Karl2017-03-31
| | | | | | | | | | | | | | | Crurently, when preparing a texture for blitFramebuffer, we ignore the kRectsMustMatchForMSAASrc_BlitFramebufferFlag, and may attempt to copy from one src rect to a different dst rect. This change updates initDescForDstCopy and setupDstTexture to allocate larger textures if necessary and accomodate this flags requirements. Bug: 658277 Change-Id: I500f10dba5700f5f7a7acad04bcdbc9ac9994835 Reviewed-on: https://skia-review.googlesource.com/10247 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Add glPolygonMode support.Gravatar Jim Van Verth2017-03-30
| | | | | | | | | Mainly added because it's useful for rendering in wireframe mode. Change-Id: I84dab43ce5b56a48d47dd16d4c98fa7648bb1f0b Reviewed-on: https://skia-review.googlesource.com/10530 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Make xformer class for SkCSXCanvas, use for draw loopersGravatar Matt Sarett2017-03-30
| | | | | | | | | | Fixes draw looper gms in gbr-8888 config. Bug: skia: Change-Id: I0a9306cc0523c82f2ad9516752d79c1d86b1e295 Reviewed-on: https://skia-review.googlesource.com/10644 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Add GrSurfaceProxy* parameter to GrContext::flushGravatar Robert Phillips2017-03-30
| | | | | | | | | Split out of: https://skia-review.googlesource.com/c/10284/ (Omnibus: Remove GrSurface-derived classes from ops) Change-Id: I12c66a6fa826c2363b21ece56391fb352d12d6b3 Reviewed-on: https://skia-review.googlesource.com/10541 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* More GrSurfaceProxy-clean upGravatar Robert Phillips2017-03-29
| | | | | | | | | Split out of: https://skia-review.googlesource.com/c/10484/ (Omnibus: Push instantiation of GrTextures later (post TextureSampler)) Change-Id: I1ee39a23c749e420dce0ad561ee1c8b09bdcc763 Reviewed-on: https://skia-review.googlesource.com/10485 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Remove GrXferProcessor::getOptimizations.Gravatar Brian Salomon2017-03-29
| | | | | | | | | | This replaces GrXferProcessor::getOptimizations with a new function on GrXPFactory. The results are made available via FragmentProcessorAnalysis. Bug: skia: Change-Id: I535985458c9d13ad858cac94e957e2fdbe332036 Reviewed-on: https://skia-review.googlesource.com/10218 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Remove GrSurface::flushWritesGravatar Robert Phillips2017-03-29
| | | | | | | Change-Id: Ifac5af00ef852ee212964baa113b490a03e0168d Reviewed-on: https://skia-review.googlesource.com/10293 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Add codec and color xform support for 565Gravatar Matt Sarett2017-03-28
| | | | | | | | Bug: skia: Change-Id: I23184acc4e17d38861d27ab81172048a24c400d2 Reviewed-on: https://skia-review.googlesource.com/10288 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Matt Sarett <msarett@google.com>
* Implement SkBlurDrawLooper with SkLayerDrawLooperGravatar Matt Sarett2017-03-28
| | | | | | | | | | | | This allows us to delete SkBlurDrawLooper (and leave only one draw looper implementation). BUG=skia: Change-Id: I549af86b81babf19e3649bdffffe2fdb0b308d5a Reviewed-on: https://skia-review.googlesource.com/10101 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Derek Sollenberger <djsollen@google.com>
* Fix gaussianedge GMGravatar Robert Phillips2017-03-28
| | | | | | | Change-Id: Ia4523ea13992b325cb59f42e4458a199c7a98c4b Reviewed-on: https://skia-review.googlesource.com/10219 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Use SkTransferFunctionBehavior for raster pixel conversionsGravatar Matt Sarett2017-03-28
| | | | | | | | | | | Fixes some gbr-8888 behaviors. BUG=skia: Change-Id: I1351b043129f7ed0e125bfdb626a0ecaf64c15cc Reviewed-on: https://skia-review.googlesource.com/10169 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Matt Sarett <msarett@google.com>
* Add height function to shadow tessellators.Gravatar Jim Van Verth2017-03-27
| | | | | | | | | | Prep work for adding perspective support. Bug: skia: Change-Id: Id07d3050afb3f0d001b885e482adb8d03125b619 Reviewed-on: https://skia-review.googlesource.com/10167 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Change SkMemory to the more accurately named SkMalloc.Gravatar Herb Derby2017-03-27
| | | | | | | Change-Id: I6b08a74234b99bac866bad71014b94f7ec2d4bc8 Reviewed-on: https://skia-review.googlesource.com/10188 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* quick-fix to surface doxGravatar Mike Reed2017-03-24
| | | | | | | | | | BUG=skia: Change-Id: I63cab1d5467fa908358a46199dc44cfe53c20f4f Reviewed-on: https://skia-review.googlesource.com/10115 Commit-Queue: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Delete SkColorSpace::ColorSpaceFlagsGravatar Matt Sarett2017-03-24
| | | | | | | | | BUG=skia: Change-Id: Ia0688876915cd773614ca0c4ccd467cf6e7c603e Reviewed-on: https://skia-review.googlesource.com/10105 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Add SkTransferFunctionBehavior flag: Use in codec and encoderGravatar Matt Sarett2017-03-24
| | | | | | | | | | | | | | This is a step towards removing the non-linear blending flag from SkColorSpace. The flag on SkColorSpace used to control the premul behavior - now it is controlled by this option. BUG=skia: Change-Id: Ia29bd8c2b0596a93c6aa14332dcd9bd39e388a90 Reviewed-on: https://skia-review.googlesource.com/10008 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* SkBlurDrawLooper: Start by deleting flagsGravatar Matt Sarett2017-03-23
| | | | | | | | | | | Android is the only user of this looper. They never pass any flags. BUG=skia: Change-Id: I87b02ef7bc0ed94bca82637d60adddf34575a3e6 Reviewed-on: https://skia-review.googlesource.com/10057 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Replace Thinkness with Thickness.Gravatar Ben Wagner2017-03-23
| | | | | | | | | | | | | The FontMetricsFlags::kUnderlineThinknessIsValid_Flag has a typo in it. Fortunately no user currently uses this enumeration value by name but instead uses the getter so the name can be updated. BUG=skia:6174 Change-Id: I810260d826482de1da8876cd9739d24b3bfb0f95 Reviewed-on: https://skia-review.googlesource.com/10050 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Only perform SkSafeRef race detection if on android frameworkGravatar Derek Sollenberger2017-03-23
| | | | | | | Change-Id: If524a02e916d711057d6f2102efb0404b1c0b988 Reviewed-on: https://skia-review.googlesource.com/10036 Commit-Queue: Ravi Mistry <rmistry@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Make reference counted assignment check for races.Gravatar Derek Sollenberger2017-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If SkRefCnt_SafeAssign is erroneously invoked simultaneously by two threads on the same destination, a likely outcome is that the reference count of an object other than the replaced dst will be decremented. This results in an extra reference count decrement, which usually means that the final reference count decrement will be applied to a random location in an object that has already been reallocated. This is exceedingly hard to debug. We add a hack to detect such data races with sufficiently high probability, so that such a data race bug should sometimes actually generate bug reports that lend themselves to diagnosis. We detect changes within a relatively larger range that normally includes several (typically slow) memory fences. Not all such changes would provoke a crash. Even if we decrement the wrong reference count, there's a chance we would decrement a dead location. Thus, to avoid potentially adding instability, we currently only log. This change tries to minimize additional runtime overhead. The macro is only expanded a few dozen times, so we do not worry too much about code size. Bug: b/31227650 Change-Id: Ia40c9ed2c4d0fa578ea682fbec4b71a2ef22a5d1 Reviewed-on: https://skia-review.googlesource.com/9994 Commit-Queue: Derek Sollenberger <djsollen@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Revert "Revert "Add a new GrResourceCache purging mechanism for purging ↵Gravatar Brian Salomon2017-03-22
| | | | | | | | | | | unused resources."" This reverts commit 20c322ef0cd04cf8e2592879d05d9f4e6cb19596. Change-Id: I6df9a8594484837672308dc2c21c7c29b76ffa2c Reviewed-on: https://skia-review.googlesource.com/10013 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add Swizzle FP, and remove swizzle logic from GrConfigConversionEffectGravatar Brian Osman2017-03-22
| | | | | | | | | | | Trying to decompose read/writePixels into some reusable chunks. BUG=skia:5853 Change-Id: If08b004b008e8ca7d464d9dc47068e487bae850a Reviewed-on: https://skia-review.googlesource.com/10015 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>