aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
* Re-enable processor optimization test with some fixes.Gravatar Brian Salomon2017-02-09
| | | | | | | | | Enables on GL (for now) Change-Id: I5f5a38632963dd705f8434e8627eb33446e8f027 Reviewed-on: https://skia-review.googlesource.com/7721 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* [4fGradient] Relax interval checksGravatar Florin Malita2017-02-09
| | | | | | | | | | | | | | | | | | | We're currently considering intervals open at one extremity, in order to ensure that a given value is always contained in a single interval. This creates problems with synthetic clamp intervals [1, +inf), for t == +inf (no interval can contain it). Treat intervals as closed at both extremities instead. This introduces some ambiguitiy for overlapping values (contained in both adjacent intervals), but solves the more serious problem above. BUG=skia:6213 Change-Id: I33064f762fa9c2b914615e27977115d6654b12f4 Reviewed-on: https://skia-review.googlesource.com/8270 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Remove last use of ktx.hGravatar Herb Derby2017-02-09
| | | | | | | | | | | If this breaks something in Google3, revert it. Change-Id: Id719a87b6ca95c41d06f44f05ee1fdd430d4e0a2 Reviewed-on: https://skia-review.googlesource.com/8262 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Don't batch circles and circular rrects beyond index limitGravatar Jim Van Verth2017-02-09
| | | | | | | | | | BUG=skia:6158, chromium:690144, chromium:688582, chromium:684112 Change-Id: I7a6d1fb73cbe6cb4328848acd153ff2505b5fea2 Reviewed-on: https://skia-review.googlesource.com/8256 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Revert "skslc type constructor cleanups"Gravatar Ethan Nicholas2017-02-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6f223283661c1ddc4a5334d2464804c6b6ba3ffa. Reason for revert: bot breakage Original change's description: > skslc type constructor cleanups > > BUG=skia: > > Change-Id: I87108b5e107419d99c996ef032eda512a68451ab > Reviewed-on: https://skia-review.googlesource.com/8117 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> > TBR=egdaniel@google.com,ethannicholas@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: I1c9a8c4c62c7dd0f724f22000507112641d25e3b Reviewed-on: https://skia-review.googlesource.com/8259 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
* Include correct header in SkFontMgr_custom_empty_factory.cpp.Gravatar Ben Wagner2017-02-09
| | | | | The SkFontMgr_New_Custom_Empty function used to be declared in SkFontMgr_custom.h, but is now declared in SkFontMgr_empty.h.
* Revert "added support for sk_ClipDistance"Gravatar Ethan Nicholas2017-02-09
| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8b8c76506a9a3b07246e6c2770e35dfc413da97a. Reason for revert: breaks Vulkan Original change's description: > added support for sk_ClipDistance > > Change-Id: I14fd921cace23ab37a1e5e9d5da94d92d3688680 > Reviewed-on: https://skia-review.googlesource.com/8225 > Reviewed-by: Chris Dalton <csmartdalton@google.com> > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> > TBR=csmartdalton@google.com,ethannicholas@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I84d6bc75738eb9a8e090aa60e6421f2437a027b2 Reviewed-on: https://skia-review.googlesource.com/8246 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
* Split custom font managers.Gravatar Ben Wagner2017-02-09
| | | | | | | | | | | | Some users would like to use the empty font manager, but the directory gont manager brings in extra dependencies to work which would otherwise be unneeded. Allow these users to build just the bits of code they actually need. Change-Id: Ib029ef2682883509bad5a2aa39f1ef55631f4d8a Reviewed-on: https://skia-review.googlesource.com/8200 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* skslc type constructor cleanupsGravatar Ethan Nicholas2017-02-09
| | | | | | | | | | BUG=skia: Change-Id: I87108b5e107419d99c996ef032eda512a68451ab Reviewed-on: https://skia-review.googlesource.com/8117 Commit-Queue: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* added support for sk_ClipDistanceGravatar Ethan Nicholas2017-02-09
| | | | | | | Change-Id: I14fd921cace23ab37a1e5e9d5da94d92d3688680 Reviewed-on: https://skia-review.googlesource.com/8225 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* [4fLinearGradient] Avoid NaNs for degenerate perspectivesGravatar Florin Malita2017-02-09
| | | | | | | | | BUG=skia:6211 Change-Id: I92148497b29860b3844fe35c2985070a197e4085 Reviewed-on: https://skia-review.googlesource.com/8229 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Reed <reed@google.com>
* Add integer vectors to GrSLTypeGravatar csmartdalton2017-02-08
| | | | | | | | | BUG=skia: Change-Id: I4a4a50e214f2240d83f6f0b02cf43e695c067933 Reviewed-on: https://skia-review.googlesource.com/8122 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Add a basic constructor to GrPipelineGravatar csmartdalton2017-02-08
| | | | | | | | | | | | Adds a simple constructor for when we just need to set up basic internal rendering. BUG=skia: Change-Id: Ib046c62e9a759aa7d0a3345e16ccf6e6af9342ea Reviewed-on: https://skia-review.googlesource.com/8121 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* SkRasterPipelineBlitter doesn't need an SkArenaAlloc.Gravatar Mike Klein2017-02-08
| | | | | | | Change-Id: Ie4f8bb1c05dee4639a075c100abbc5262e521fc4 Reviewed-on: https://skia-review.googlesource.com/8128 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Herb Derby <herb@google.com>
* [4fGradient] Fix degenerate vertical gradient assertGravatar Florin Malita2017-02-08
| | | | | | | | | | | | | | | | | | For vertical gradients, we rely on LinearIntervalProcessor to yield a fAdvX == +inf, thanks to division by dx (== +/-0). But certain degenerate values may cause the numerator to also collapse to 0, resulting in fAdvX == NaN. Instead or relying on float semantics, pin fAdvX to +inf explicitly for vertical gradients. BUG=skia:5912 Change-Id: Ia8007b99802a6b1e0b22f5618a0ca8959b0cfbb2 Reviewed-on: https://skia-review.googlesource.com/8223 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Remove use of SkSmallAllocator from all Loopers.Gravatar Herb Derby2017-02-08
| | | | | | | | | R=reed@google.com Change-Id: I22b140ee8e12900de13bc623adb30b5fca3051f9 Reviewed-on: https://skia-review.googlesource.com/7658 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Herb Derby <herb@google.com>
* SkSplicer: begin on sse2/sse4.1 supportGravatar Mike Klein2017-02-08
| | | | | | | | | | | | | | | | This lets us target older machines with SkSplicer. SSE2 and SSE4.1 are the sweet spots if we're going to pick two more. Nothing too interesting here except maybe the f16<->f32 code. I rearranged a little to keep things consistent across platforms. Next CL will get this into _generated.h and use it when appropriate. Change-Id: Ibbdc61ea7a45d22b4f4058b01f75161ea74a7726 Reviewed-on: https://skia-review.googlesource.com/8193 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Simplify SkCpu.cpp preprocessor guards.Gravatar Mike Klein2017-02-08
| | | | | | | | | | | | | | | | | | | | | | | We have a couple ways to detect CPU features on ARM: - on ARMv8, getauxval(AT_HWCAP) - on ARMv7, getauxval(AT_HWCAP) and cpu-features.h This guards each of these methods with preprocessor guards to match exactly when we can use them. Today they're sort of a mix of that and higher level expectations about particular build and operating systems. I'm looking into doing this directly by reading CPU registers, much like we do for x86 further up the file. None of this is super important right now, so as long as we don't decide that we have these features when we don't, things will be fine. It's no big deal for now if we fail to detect them. Change-Id: I3b7768483086d0f3f4f6516b754c3ea5ec2d03e5 Reviewed-on: https://skia-review.googlesource.com/8182 Reviewed-by: Chinmay Garde <chinmaygarde@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Remove exec bit from source files.Gravatar Ben Wagner2017-02-08
| | | | | | | | | | | | Ran: find src include \( -name '*.cpp' -o -name '*.h' \) -executable -exec chmod -x {} \; BUG=skia: Change-Id: I04a4adbfcea9fd9860ab83d43734dc5158d3a884 Reviewed-on: https://skia-review.googlesource.com/8220 Commit-Queue: Ben Wagner <benjaminwagner@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* add virtuals in prep for device-clippingGravatar Mike Reed2017-02-08
| | | | | | | | | | | | | | Build flag available for backends to begin testing their impl. Need to formalize save/restore, and how to forward these to device but not on picture canvases. BUG=skia:6214 Change-Id: Ic5c0afba3e8c84fcf124567e63fe2f5880b623e7 Reviewed-on: https://skia-review.googlesource.com/8183 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Add a blend-wrong mode to SkRasterPipelineBlitter.Gravatar Mike Klein2017-02-08
| | | | | | | | | | | This keeps correct linear blending as the only option exericsed, but it should be easy to see how to turn on blend-wrong mode. Change-Id: I7d87ef8ed00e8990107bd36b826f8d229d930400 Reviewed-on: https://skia-review.googlesource.com/8125 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "Revert "Disallow readPixels() conversions from untagged srcs to ↵Gravatar Matt Sarett2017-02-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tagged dsts"" This reverts commit 8461506c8b025522eb89cd754c63fb5dbf0cb7f1. Reason for revert: Fixed some Chrome code, let's try this again. Original change's description: > Revert "Disallow readPixels() conversions from untagged srcs to tagged dsts" > > This reverts commit ccfd1083a7b9d546735ddd1037f3240635cce72d. > > Reason for revert: Roll is failing. > > Original change's description: > > Disallow readPixels() conversions from untagged srcs to tagged dsts > > > > This might break the roll into Chrome. But let's see how. > > > > BUG=skia:6021 > > > > Change-Id: I2698b5d6fe72d01bed0dc64703b592a03d441a80 > > Reviewed-on: https://skia-review.googlesource.com/7127 > > Reviewed-by: Mike Reed <reed@google.com> > > Commit-Queue: Matt Sarett <msarett@google.com> > > > > TBR=msarett@google.com,brianosman@google.com,reed@google.com > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=skia:6021 > > Change-Id: I4b62178fd7c23f43cf69ca69fc14526ecd503956 > Reviewed-on: https://skia-review.googlesource.com/7205 > Commit-Queue: Matt Sarett <msarett@google.com> > Reviewed-by: Matt Sarett <msarett@google.com> > TBR=msarett@google.com,brianosman@google.com,reed@google.com # Not skipping CQ checks because original CL landed > 1 day ago. BUG=skia:6021 Change-Id: I3f3f33fe6b84fbd5c537b60ed5c8b9201d529a6a Reviewed-on: https://skia-review.googlesource.com/8156 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Revert "Remove asTextureRef from SkSpecialImage & update effects accordingly"Gravatar Robert Phillips2017-02-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e88cf6b7aa5deaeaa9dab18ada7d9d11e1e4be12. Reason for revert: See if breaking DEPS roll Original change's description: > Remove asTextureRef from SkSpecialImage & update effects accordingly > > This CL also renames SkSpecialImage::asTextureProxy to asTextureProxyRef > > Change-Id: I5ed8e475bb9688453b825ae4500ed0e8d324b5ac > Reviewed-on: https://skia-review.googlesource.com/7995 > 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: I227cbd5fcaf7e2f86e858331d9ec7ff7a5f203ca Reviewed-on: https://skia-review.googlesource.com/8184 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* SkFontHost_mac.cpp#create_descriptor to handle nullptr familyName.Gravatar bungeman2017-02-07
| | | | | | | | | | | | | | Currently create_descriptor will crash if handed a familyName which is nullptr. Instead it should simply create a descriptor without a family name and allow CoreText to resolve a default font. This further simplifies default font handling on Mac. BUG=skia:6196 Change-Id: I0a2d081240e4cb5bd51dd3516ea2595277055fe0 Reviewed-on: https://skia-review.googlesource.com/8071 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Ben Wagner <bungeman@google.com>
* added support for sk_VertexIDGravatar Ethan Nicholas2017-02-07
| | | | | | | Change-Id: If3a2b7527ae6805ba54860c6ca6219431e2f3f76 Reviewed-on: https://skia-review.googlesource.com/8145 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* fixed assertion error when calling matrixCompMult()Gravatar Ethan Nicholas2017-02-07
| | | | | | | Change-Id: I8e702eededf150e82226477558118f1bb7e66fef Reviewed-on: https://skia-review.googlesource.com/8138 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Reland "Respect canvas size and frame offset in webp decoder"Gravatar Matt Sarett2017-02-07
| | | | | | | | | | | | | | Original Change Reviewed At: https://skia-review.googlesource.com/c/7800 CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN BUG=skia:6185 Change-Id: I1a7732832d37920545c1775d7c7c65b43ed810f9 Reviewed-on: https://skia-review.googlesource.com/8157 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Remove asTextureRef from SkSpecialImage & update effects accordinglyGravatar Robert Phillips2017-02-07
| | | | | | | | | This CL also renames SkSpecialImage::asTextureProxy to asTextureProxyRef Change-Id: I5ed8e475bb9688453b825ae4500ed0e8d324b5ac Reviewed-on: https://skia-review.googlesource.com/7995 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Tack on ret instructions to each SkSplicer stage.Gravatar Mike Klein2017-02-07
| | | | | | | | | | | This is just a warm up refactor to make the existing stages more amenable to running in place without splicing. Hopefully the driver interpreter loop for that will be my next CL. Change-Id: Ie76868b59af8ff3a10e2cd64f03c3f8d8a5031dd Reviewed-on: https://skia-review.googlesource.com/8142 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Use SkArenaAlloc in the SkAutoBlitterChoose code.Gravatar Herb Derby2017-02-07
| | | | | | | | | | | | | | | | | | | - Added default implementation of onMakeContext to support use in android. Searches for uses: "public SkShader" package:^chromium$ -file:^src/third_party/skia package:^aosp.* "public SkShader" -file:external/skia -file:.*third_party/skia package:^android$ "public SkShader" -file:external/skia -file:.*third_party/skia ... shows that no subclass overrides onCreateContext. TBR=reed@google.com TBR=mtklein@google.com Change-Id: I8bd5f57a79534574e344b165d31dccee41c31767 Reviewed-on: https://skia-review.googlesource.com/8140 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Herb Derby <herb@google.com>
* SkColorSpace: remove named API, add gamut APIGravatar Matt Sarett2017-02-07
| | | | | | | | | | | Reland from: https://skia-review.googlesource.com/c/8021/ BUG=skia: Change-Id: I18985f130587b15fccbc86b76b2bb5c49ba5ba8a Reviewed-on: https://skia-review.googlesource.com/8136 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Revert "Use SkArenaAlloc instead of SkSmallAllocator in the ↵Gravatar Robert Phillips2017-02-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SkAutoBlitterChoose code." This reverts commit 2b57b7f7a7fc97db57f190b5a8ebcf68e177ee2d. Reason for revert: Android compile failing Original change's description: > Use SkArenaAlloc instead of SkSmallAllocator in the SkAutoBlitterChoose code. > > > TBR=reed@google.com > Change-Id: Iefb044bf7657fbf982f23aa91a3f4d013ce2c626 > Reviewed-on: https://skia-review.googlesource.com/7786 > Reviewed-by: Mike Klein <mtklein@chromium.org> > Reviewed-by: Herb Derby <herb@google.com> > Commit-Queue: Herb Derby <herb@google.com> > TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Id09c35377dddae0811d998b7d0c34c422325a5bc Reviewed-on: https://skia-review.googlesource.com/8129 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Revert "SkColorSpace: remove named API, add gamut API"Gravatar Matt Sarett2017-02-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ecaaf6f1c156e5690200322fc2636380c1f63dd8. Reason for revert: Breaks everything Original change's description: > SkColorSpace: remove named API, add gamut API > > BUG=skia: > > Change-Id: I01c5e1874c9a034febc64e25b3aaafb5050393a6 > Reviewed-on: https://skia-review.googlesource.com/8021 > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Matt Sarett <msarett@google.com> > TBR=msarett@google.com,brianosman@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: Ief5a0a4eeabe75a21f7512e23fc15309151066c4 Reviewed-on: https://skia-review.googlesource.com/8127 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* SkColorSpace: remove named API, add gamut APIGravatar Matt Sarett2017-02-07
| | | | | | | | | | BUG=skia: Change-Id: I01c5e1874c9a034febc64e25b3aaafb5050393a6 Reviewed-on: https://skia-review.googlesource.com/8021 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Bring back SkImage::makeTextureImageGravatar Brian Osman2017-02-07
| | | | | | | | | | | | | | | Ensures that an image is GPU backed on the passed-in GrContxt. The new version requires a destination color space (intended usage of the image), so we can make a proper decision about decoded format. This reverts commit d263413a2a92cafe3fd3b051c67d00206c9a0e4d. BUG=skia: Change-Id: Ibccddbafc301779559592045ed5a5fa9264e7432 Reviewed-on: https://skia-review.googlesource.com/8116 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Reland "Respect canvas size and frame offset in webp decoder""Gravatar Matt Sarett2017-02-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 604971e39a20392fd4c74a56bcdc187311cf86dc. Reason for revert: Strange vk failures Original change's description: > Reland "Respect canvas size and frame offset in webp decoder" > > Original Change Reviewed At: > https://skia-review.googlesource.com/c/7800 > > CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN > > BUG=skia:6185 > > Change-Id: I92baa9070e15ef3c62dd347c08c906c2715dda10 > Reviewed-on: https://skia-review.googlesource.com/8050 > Reviewed-by: Matt Sarett <msarett@google.com> > Commit-Queue: Matt Sarett <msarett@google.com> > TBR=msarett@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:6185 CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN Change-Id: Ice93b62c55ea13fce83140567be16225ff0e2fdb Reviewed-on: https://skia-review.googlesource.com/8123 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Remove _lowp SkSplicer experiment for now.Gravatar Mike Klein2017-02-07
| | | | | | | | | | | | | SkSplicer is an experiment, and _lowp SkSplicer is an experiment^2. It's not that it's a bad idea... it just makes working on the main SkSplicer experiment more complicated. While not live at head, it'll live on in my heart. Change-Id: Ib099370be25623e4cf1bbbca211634e3fe92b475 Reviewed-on: https://skia-review.googlesource.com/8112 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Another workaround for libstdc++ unique_ptrGravatar Brian Salomon2017-02-07
| | | | | | Change-Id: Ic08bf6f23e2509db332fcc0f6cab577189c2f558 Reviewed-on: https://skia-review.googlesource.com/8115 Reviewed-by: Brian Salomon <bsalomon@google.com>
* Use SkArenaAlloc instead of SkSmallAllocator in the SkAutoBlitterChoose code.Gravatar Herb Derby2017-02-07
| | | | | | | | | TBR=reed@google.com Change-Id: Iefb044bf7657fbf982f23aa91a3f4d013ce2c626 Reviewed-on: https://skia-review.googlesource.com/7786 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Use SkVertices for tessellated spot and ambient shadow rendering.Gravatar Brian Salomon2017-02-07
| | | | | | | Change-Id: Ia81e7a771d345286533752708e4304c1ae3b97c9 Reviewed-on: https://skia-review.googlesource.com/8042 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Stan Iliev <stani@google.com>
* ShadowUtils: Fix umbra inset calculation when determining if umbra is fully ↵Gravatar Brian Salomon2017-02-07
| | | | | | | | | occluded. Change-Id: Id0db49ad45b341d39abf7ee532ecc0799a832192 Reviewed-on: https://skia-review.googlesource.com/8079 Commit-Queue: Stan Iliev <stani@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* Add GM to exercise some of the darker corners of SkMagnifierImageFilterGravatar Robert Phillips2017-02-07
| | | | | | | | | | | An upcoming CL (https://skia-review.googlesource.com/c/7995/ (Remove asTextureRef from SkSpecialImage & update effects accordingly)) modifies some untested portions of the SkMagnifierImageFilter. This adds a test to prevents regressions. Change-Id: I9fa406f699e39fa393212e7f63a457b015b36edb Reviewed-on: https://skia-review.googlesource.com/8023 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Add a fast case for copying vertices in GrDrawVerticesOp.Gravatar Brian Salomon2017-02-07
| | | | | | | | | | | Uses Sk2f to apply a translation-only matrix when the vertex attributes contain only positions and colors. We should look at how to generalize this for other draw vertices cases and other ops. Change-Id: I5eb692982dc216b1c0a71209c969672b0562143c Reviewed-on: https://skia-review.googlesource.com/8103 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Fix rounding error with tiled bitmap drawsGravatar Brian Osman2017-02-06
| | | | | | | | | | | | | | | We were snapping the top-left of the destination rectangle to integers, but using the original (fractional) size. This led to us losing rows or columns of pixels at the first tile boundary. Also added a GM that demonstrates the bug (now renders correctly). BUG=skia: Change-Id: I50629dab9dd90fedad2c7e3393a1b1d1c7a8d45e Reviewed-on: https://skia-review.googlesource.com/8102 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* GrTessellator (AA): improve antialiasing of thin shapes.Gravatar Stephen White2017-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Long description, but actually quite a small change.) This is the first change inspired by the "straight skeleton" algorithm. This algorithm gives us a mental model to describe the edge-antialiasing problem: consider the shape as walls of a house, the outer alpha geometry is a 45-degree "roof" up to a flat top at a height of 1.0 (the filled interior). The faces of the sloping roof join at the bisectors between the inner and outer points. When the shape being drawn is sufficiently thin, there should be no flat roof, and the sloping roof meets at an edge (the straight skeleton). This patch detects cases where an edge inverts on stroking, which indicates that the flat roof has turned inside out, and should be reduced to a point instead. The model above describes what to do: follow down the "roof" along the bisectors to their intersection. This is the point to which an inverted edge should be collapsed. Fortunately, the bisector edges are easy to compute: they're the connector edges joining inner and outer points. Linearly interpolating the distance from the top to the bottom point gives the alpha we should use to approximate coverage. Now that we are correctly handling inversions, bevelling outer edges is no longer necesary, since pointy outer edges won't cause nasty opaque artifacts. A couple of other quality improvements: on intersection, always lerp the alpha of connector edge, even if the opposite edge is an inner edge (later, when these edges are collapsed, we need this value to compute the correct alpha). Fix the case where an intruding outer vertex intersects exactly with an inner edge by maxing its alpha with the computed value in check_for_intersection(). Finally, we also no longer round off the intersections produced by Line::intersect(), since it introduces a loss of quality with no measurable performance benefit. Change-Id: I6fd93df3a57fffc0895e8cb68adbdba626ded0f1 Reviewed-on: https://skia-review.googlesource.com/8028 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Stephan White <senorblanco@chromium.org>
* Make workaround for std::unique_ptr<const T[]> bug in old libstdc++ work.Gravatar Brian Salomon2017-02-06
| | | | | | | | | | BUG=skia: Change-Id: I58a07d4ce35bdd03e7edcf50e88d9982b3885546 Reviewed-on: https://skia-review.googlesource.com/8101 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Work around broken std::unique_ptr<const T[]> constructor from ↵Gravatar Brian Salomon2017-02-06
| | | | | | | | std::unique_ptr<T>&& in older libstdc++. Change-Id: Ie4190800369515168203ff98b3e3fe0e2d790f1a Reviewed-on: https://skia-review.googlesource.com/8072 Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add sk_sp make variant to SkArenaAlloc.Gravatar Herb Derby2017-02-06
| | | | | | | | | | R=bungeman@google.com BUG=skia: Change-Id: Iec588cb6946f0230ff3d3ec46499c365aa6b8d09 Reviewed-on: https://skia-review.googlesource.com/8067 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Revert "Added dead variable / code elimination to skslc."Gravatar Ethan Nicholas2017-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 113628d76176a1ab3e6719c59efff23cd10ab213. Reason for revert: Looks to have caused https://bugs.chromium.org/p/chromium/issues/detail?id=688939 Original change's description: > Added dead variable / code elimination to skslc. > > BUG=skia: > > Change-Id: Ib037730803a8f222f099de0e001fe06ad452a22c > Reviewed-on: https://skia-review.googlesource.com/7584 > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> > Reviewed-by: Ben Wagner <benjaminwagner@google.com> > TBR=egdaniel@google.com,benjaminwagner@google.com,ethannicholas@google.com,reviews@skia.org # Not skipping CQ checks because original CL landed > 1 day ago. BUG=skia: Change-Id: I85599e4ca2bc6bfd782edc163f67b64195d6ae65 Reviewed-on: https://skia-review.googlesource.com/8077 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
* Have ShadowTessellators transform path; add SkShadowTessellator base classGravatar Jim Van Verth2017-02-06
| | | | | | | | | BUG=skia:6119 Change-Id: I37639ebab43c9f32f48d2d7dbb8d4619efb9b09e Reviewed-on: https://skia-review.googlesource.com/8061 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>