aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/gradients
Commit message (Collapse)AuthorAge
* Planar ramp() for S32 linear gradientsGravatar fmalita2016-03-23
| | | | | | | R=mtklein@google.com,reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1825333003 Review URL: https://codereview.chromium.org/1825333003
* Refactor 4f gradients using trait templatesGravatar fmalita2016-03-21
| | | | | | | | | | | | | | | | Some 4f gradient housekeeping. 1) replace <DstPtrType, ColorProfile> specialization tuples with an enum covering all dest types (L32, S32, F16, F32) 2) group various template helpers into dest trait classes, specialized for each dest type (2a - conflate current dst_swizzle and scale_for_dest ops into one load op) R=reed@google.com,mtklein@google.com,herb@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1816883002 Review URL: https://codereview.chromium.org/1816883002
* SkNx refreshGravatar mtklein2016-03-21
| | | | | | | | | | | | | | | | | | | | - rearrange a bit - fewer macros - hooks for all operators - add left and right scalar operator overrides - add +=, &=, <<=, etc. - add SkNx_split() and SkNx_join() - simplify the many rsqrt() and invert() options to just what we actually use This refactoring pointed out that our float <-> int NEON conversions are not specialized, so I've implemented them. It seems nice that this is an error rather than silently falling back to serial code. It's unclear to me if split/join want to be external, static methods, or non-static methods (SkNx_join(), Sk4f::Join(), x.join()). Time will tell? BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1812233003 CQ_EXTRA_TRYBOTS=client.skia.android:Test-Android-GCC-Nexus5-CPU-NEON-Arm7-Release-Trybot;client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review URL: https://codereview.chromium.org/1812233003
* sRGB support in Ganesh. Several pieces:Gravatar brianosman2016-03-21
| | | | | | | | | | | | | | | | | | | | | | sRGB support now also requires GL_EXT_texture_sRGB_decode, which allows us to disable sRGB -> Linear conversion when reading textures. This gives us an easy way to support "legacy" L32 mode. We disable decoding based on the pixel config of the render target. Textures can override that behavior (specifically for format-conversion draws where we want that behavior). Added sBGRA pixel config, which is not-really-a-format. It's just sRGBA internally, and the external format is BGR order, so TexImage calls will swizzle correctly. This lets us interact with sRGB raster surfaces on BGR platforms. Devices without sRGB support behave like they always have: conversion from color type and profile type ignores sRGB and always returns linear pixel configs. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1789663002 Review URL: https://codereview.chromium.org/1789663002
* allow more options for shader blitprocsGravatar reed2016-03-18
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1810383004 Review URL: https://codereview.chromium.org/1810383004
* 4f linear gradient shader blittersGravatar fmalita2016-03-18
| | | | | | | | | | | | Add F16 specializations to support writing to half-float dests. Add color profile template arg across the board to support writing to sRGB dests. R=reed@google.com,mtklein@google.com,herb@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1808963005 Review URL: https://codereview.chromium.org/1808963005
* Revert of sRGB support in Ganesh. Several pieces: (patchset #12 id:220001 of ↵Gravatar brianosman2016-03-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1789663002/ ) Reason for revert: We're getting sRGB non-8888 configs? Original issue's description: > sRGB support in Ganesh. Several pieces: > > sRGB support now also requires GL_EXT_texture_sRGB_decode, which allows > us to disable sRGB -> Linear conversion when reading textures. This gives > us an easy way to support "legacy" L32 mode. We disable decoding based on > the pixel config of the render target. Textures can override that behavior > (specifically for format-conversion draws where we want that behavior). > > Added sBGRA pixel config, which is not-really-a-format. It's just sRGBA > internally, and the external format is BGR order, so TexImage calls will > swizzle correctly. This lets us interact with sRGB raster surfaces on BGR > platforms. > > Devices without sRGB support behave like they always have: conversion from > color type and profile type ignores sRGB and always returns linear pixel > configs. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1789663002 > > Committed: https://skia.googlesource.com/skia/+/9e3f1bf4e5cd8fc59554f986f36d6b034e99f9eb TBR=reed@google.com,bsalomon@google.com,robertphillips@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1814533003
* sRGB support in Ganesh. Several pieces:Gravatar brianosman2016-03-17
| | | | | | | | | | | | | | | | | | | | | | sRGB support now also requires GL_EXT_texture_sRGB_decode, which allows us to disable sRGB -> Linear conversion when reading textures. This gives us an easy way to support "legacy" L32 mode. We disable decoding based on the pixel config of the render target. Textures can override that behavior (specifically for format-conversion draws where we want that behavior). Added sBGRA pixel config, which is not-really-a-format. It's just sRGBA internally, and the external format is BGR order, so TexImage calls will swizzle correctly. This lets us interact with sRGB raster surfaces on BGR platforms. Devices without sRGB support behave like they always have: conversion from color type and profile type ignores sRGB and always returns linear pixel configs. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1789663002 Review URL: https://codereview.chromium.org/1789663002
* detach -> releaseGravatar mtklein2016-03-16
| | | | | | | | | | | | | The C++ standard library uses the name "release" for the operation we call "detach". Rewriting each "detach(" to "release(" brings us a step closer to using standard library types directly (e.g. std::unique_ptr instead of SkAutoTDelete). This was a fairly blind transformation. There may have been unintentional conversions in here, but it's probably for the best to have everything uniformly say "release". BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1809733002 Review URL: https://codereview.chromium.org/1809733002
* Generic 4f gradient T sampler fallbackGravatar fmalita2016-03-10
| | | | | | | | | | | | | | | | | | | Add a generic T sampler fallback impl which uses T series produced by subclasses mapTs() overrides. The fallback path uses the same interval structures as the current optimized linear4f impl, but always sorted in stop order (never inverted to match dx/increasing x order). Enable the new mechanism for 4f linear w/ perspective. Other boring changes: * relocate the interval builder (back) to the base class * add a private header for shared templates BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1783823002 Review URL: https://codereview.chromium.org/1783823002
* Remove version checks for _MSC_VER < 1800 (msvs2013).Gravatar bungeman2016-03-10
| | | | | | | | | | | | We already actively do not support older versions of the vc++ compiler and runtime, so don't check for them anymore. TBR=reed No API changes. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1777213003 Review URL: https://codereview.chromium.org/1777213003
* use Make instead of Create to return a shared shaderGravatar reed2016-03-08
| | | | | | | | | Partially updated call sites. Undefine the flag in SkSHader.h to convert the remaining sites. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1772463002 Review URL: https://codereview.chromium.org/1772463002
* Fix 4f gradient swizzle post http://crrev.com/1774523002Gravatar fmalita2016-03-08
| | | | | | | | | | | | * store interval colors in pm4f-natural/RGBA order * swizzle to dst order during interval advance Also remove an unused Interval ctor. R=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1770153002 Review URL: https://codereview.chromium.org/1770153002
* Relocate the specialized linear gradient interval builderGravatar fmalita2016-03-04
| | | | | | | | | | | | | The specialized interval setup works really well for (4f) linear gradients, but it seems unlikely to benefit other gradient subclasses. Since it gets in the way of a general/fallback gradient impl, let's move this code to Sk4fLinearGradient. R=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1764183002 Review URL: https://codereview.chromium.org/1764183002
* remove align16 calls in skhader context sizes. will handle this elsewhere as ↵Gravatar reed2016-03-04
| | | | | | | | | | | | | needed BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1768433003 TBR= basically reverts previous CL, but keeps the create --> onCreate change Review URL: https://codereview.chromium.org/1768433003
* Fix SkRadialGradient center discontinuityGravatar fmalita2016-03-04
| | | | | | | | | | | | (AKA let's slow down radial gradients!) Avoid discontinuities when r ~= 0. BUG=skia:5052 R=reed@google.com,mtklein@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1753133003 Review URL: https://codereview.chromium.org/1753133003
* Enforce 16byte alignment in shader contexts (patchset #1 id:1 of ↵Gravatar reed2016-03-03
| | | | | | | | | | | | | https://codereview.chromium.org/1759653004/ )" This reverts commit e38bcaf24b00066e167e03a5ac63cf828914d747. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1763973002 TBR= Review URL: https://codereview.chromium.org/1763973002
* Revert of enforce 16byte alignment in shader contexts (patchset #1 id:1 of ↵Gravatar halcanary2016-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1759653004/ ) Reason for revert: Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86-Debug failed dm: .... FYI: loaded 23439 distinct uninteresting hashes from 23439 lines Skipping config gpu: Don't understand 'gpu'. Skipping config msaa16: Don't understand 'msaa16'. 168400 srcs * 7 sinks + 481 tests == 1179281 tasks 0ns elapsed, 5 active, 1179276 queued, 55MB RAM, 55MB peak 565 gm xfermodes2 565 gm xfermodes 565 gm xfermodeimagefilter 565 gm xfermodes3 565 gm verylarge_picture_image c:\0\build\slave\workdir\build\skia\src\core\skshader.cpp:108: fatal error: ""(0 == ((size) & 15))"" step returned non-zero exit code: 3 @@@STEP_FAILURE@@@ Original issue's description: > enforce 16byte alignment in shader contexts > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1759653004 > > Committed: https://skia.googlesource.com/skia/+/d812fb458807245daa812adb7af0733cf5b54d96 TBR=mtklein@google.com,fmalita@chromium.org,herb@google.com,reed@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1759323002
* enforce 16byte alignment in shader contextsGravatar reed2016-03-03
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1759653004 Review URL: https://codereview.chromium.org/1759653004
* [Reland] Fix SkTwoPointConicalGradient zero-radius handlingGravatar fmalita2016-03-03
| | | | | | | | | | | | r == 0 is within valid gradient range, we shouldn't skip it. BUG=skia:5023 R=caryclark@google.com,reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1756573002 Committed: https://skia.googlesource.com/skia/+/9c0b02a557e9be663a0eb07519e1b6a61a6c3df2 Review URL: https://codereview.chromium.org/1756573002
* 4f gradient interval builder cleanupGravatar fmalita2016-03-02
| | | | | | | | | Untangle the builder, for hopefully improved readability. R=reed@google.com,mtklein@google.com,herb@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1753853002 Review URL: https://codereview.chromium.org/1753853002
* Revert of Fix SkTwoPointConicalGradient zero-radius handling (patchset #2 ↵Gravatar fmalita2016-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | id:20001 of https://codereview.chromium.org/1756573002/ ) Reason for revert: One layout test shows a regression: https://storage.googleapis.com/chromium-layout-test-archives/linux_blink_rel/83359/layout-test-results/fast/gradients/crash-on-zero-radius-diffs.html Original issue's description: > Fix SkTwoPointConicalGradient zero-radius handling > > r == 0 is within valid gradient range, we shouldn't skip it. > > BUG=skia:5023 > R=caryclark@google.com,reed@google.com > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1756573002 > > Committed: https://skia.googlesource.com/skia/+/9c0b02a557e9be663a0eb07519e1b6a61a6c3df2 TBR=caryclark@google.com,reed@google.com,fmalita@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:5023 Review URL: https://codereview.chromium.org/1754113003
* Fix SkTwoPointConicalGradient zero-radius handlingGravatar fmalita2016-03-01
| | | | | | | | | | r == 0 is within valid gradient range, we shouldn't skip it. BUG=skia:5023 R=caryclark@google.com,reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1756573002 Review URL: https://codereview.chromium.org/1756573002
* Switch float arrays to vecs for conical gradientsGravatar jvanverth2016-02-26
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1745613002 Review URL: https://codereview.chromium.org/1745613002
* 4f gradient negative-dx interval fixup for kMirror_TileModeGravatar fmalita2016-02-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | 4f intervals are meant to be monotonically increasing in X. This means we invert the point order when dx < 0: [0...1) -> (1...0] For kMirror_TileMode, we also append a duplicate/flipped interval sequence and expand the range to 2: [0...1) -> [0...1)[1...2) When dx < 0, the current logic yields (1...0] -> (1...0](2...1] which violates the interval monotonicity. To achieve the proper order, we need to swap the two halves: (1...0] -> (1...0](2...1] -> (2...1](1...0] R=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1735773003 Review URL: https://codereview.chromium.org/1735773003
* Cleanups related to SkFixed.Gravatar benjaminwagner2016-02-25
| | | | | | | | | | | | | | | | | | | | | This CL relands https://codereview.chromium.org/1683743005/ with two fixes: - Removing the test for vertical text. Vertical text doesn't work on Windows and breakText isn't supported for non-trivial text. - Omit PaintBreakTextTest in Google3 because we don't have the correct font setup yet. Remove SK_FixedNaN. It does not seem to be supported or used anywhere in Skia, Chromium, Android, or Google3, (except accidentally by TwoPtRadial::kDontDrawT). I think supporting it would erase any benefit of SkFixed over float. Remove SkBitmapFilter::lookup. It does not appear to be used anywhere in Skia, Chromium, Android, or Google3. Fix a bug in SkPaint::breakText that limited it to ~5kB of text. Now it can handle more than 1GB. BUG=skia:4632 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1683743005 Committed: https://skia.googlesource.com/skia/+/7ea5cb18389db11a94175de95c9db2b44972630c patch from issue 1683743005 at patchset 120001 (http://crrev.com/1683743005#ps120001) Review URL: https://codereview.chromium.org/1739453002
* Revert of Simple cleanups related to SkFixed. (patchset #4 id:120001 of ↵Gravatar benjaminwagner2016-02-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1683743005/ ) Reason for revert: New test is failing on Windows. Original issue's description: > Cleanups related to SkFixed. > > Remove SK_FixedNaN. It does not seem to be supported or used anywhere in Skia, Chromium, Android, or Google3, (except accidentally by TwoPtRadial::kDontDrawT). I think supporting it would erase any benefit of SkFixed over float. > > Remove SkBitmapFilter::lookup. It does not appear to be used anywhere in Skia, Chromium, Android, or Google3. > > Fix a bug in SkPaint::breakText that limited it to ~5kB of text. Now it can handle more than 1GB. > > BUG=skia:4632 > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1683743005 > > Committed: https://skia.googlesource.com/skia/+/7ea5cb18389db11a94175de95c9db2b44972630c TBR=mtklein@google.com,reed@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:4632 Review URL: https://codereview.chromium.org/1724283003
* Cleanups related to SkFixed.Gravatar benjaminwagner2016-02-24
| | | | | | | | | | | | | Remove SK_FixedNaN. It does not seem to be supported or used anywhere in Skia, Chromium, Android, or Google3, (except accidentally by TwoPtRadial::kDontDrawT). I think supporting it would erase any benefit of SkFixed over float. Remove SkBitmapFilter::lookup. It does not appear to be used anywhere in Skia, Chromium, Android, or Google3. Fix a bug in SkPaint::breakText that limited it to ~5kB of text. Now it can handle more than 1GB. BUG=skia:4632 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1683743005 Review URL: https://codereview.chromium.org/1683743005
* Retire SkShader::kSupports4f_FlagGravatar fmalita2016-02-23
| | | | | | | | | | | No longer used except in one test. Introduce kPrefers4f_Flag instead. R=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1726983002 Review URL: https://codereview.chromium.org/1726983002
* Update 4f linear gradient selection heuristicGravatar fmalita2016-02-23
| | | | | | | | | | | | | | Use the 4f context when * dest type is 4f * there's no perpective Keeping the define and testing flag overrides for now. R=reed@google.com,herb@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1725793003 Review URL: https://codereview.chromium.org/1725793003
* Add ContextRec param to SkShader::contextSize()Gravatar fmalita2016-02-22
| | | | | | | | | To facilitate upcoming context selection changes. R=reed@google.com,mtklein@google.com,herb@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1720933002 Review URL: https://codereview.chromium.org/1720933002
* Initial linear gradient 4f implGravatar fmalita2016-02-22
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1688543002 Review URL: https://codereview.chromium.org/1688543002
* Add more specialized fragment buildersGravatar cdalton2016-02-18
| | | | | | | | | | | Adds specialized fragment builders for primitive and fragment processors. Removes fragment-specific functionality from the Xfer fragment builder. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1709153002 Review URL: https://codereview.chromium.org/1709153002
* Change SkMatrix::fixedStepInX to return SkVector (of SkScalar) rather than ↵Gravatar benjaminwagner2016-02-16
| | | | | | | | | | | | | SkFixed. All users were immediately converting to SkScalar or SkFixed3232. This method is not used in Chromium, Android, or Google3. BUG=skia:4632 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1692013002 Review URL: https://codereview.chromium.org/1692013002
* Add GrShaderFlags enumGravatar cdalton2016-02-11
| | | | | | | | | Replaces GrGLSLUniformHandler::ShaderVisibility with GrShaderFlags. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684063006 Review URL: https://codereview.chromium.org/1684063006
* Clean up GrGLSLFragmentProcessor-derived classesGravatar robertphillips2016-02-03
| | | | | | | | In some other patches it was observed that many of the GrGLSLFragmentProcessor-derived classes needlessly pass a parameter to their constructors. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1666773002 Review URL: https://codereview.chromium.org/1666773002
* SkNx Load/store: take any pointer.Gravatar mtklein2016-01-31
| | | | | | | | | | This means we can remove a lot of explicit casts in code that uses SkNx. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1650653002 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review URL: https://codereview.chromium.org/1650653002
* skip zero-length linear gradient intervals to make new code more consistent ↵Gravatar lsalzman2016-01-22
| | | | | | | | | with older table-based implementation BUG=skia:4841 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1619413002 Review URL: https://codereview.chromium.org/1619413002
* fix linear gradient assert, by explicitly clampingGravatar reed2016-01-05
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1556993003 Review URL: https://codereview.chromium.org/1556993003
* remove 565 effects shadersGravatar caryclark2016-01-04
| | | | | | | | | | | | | | | This removes the 565 optimization for radial, linear, sweep, and picture shaders. The optimization gets little real-world use and has a reasonable fallback. This also permits removing the square root table for the radial gradient case. R=reed@google.com BUG=skia:1947 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1553103003 Review URL: https://codereview.chromium.org/1553103003
* Unify some SkNx codeGravatar mtklein2015-12-14
| | | | | | | | | | | | | | | - one base case and one N=1 case instead of two each (or three with doubles) - use SkNx_cast instead of FromBytes/toBytes - 4-at-a-time Sk4f::ToBytes becomes a special standalone Sk4f_ToBytes If I did everything right, this'll be perf- and pixel- neutral. https://gold.skia.org/search2?issue=1526523003&unt=true&query=source_type%3Dgm&master=false BUG=skia: CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review URL: https://codereview.chromium.org/1526523003
* ubsan shift fixesGravatar caryclark2015-12-09
| | | | | | | | | | | Use an inline function that does a normal shift. When built for the sanitizer, add casts so that the shift is unsigned. Also make a few fixes to do unsigned shifts or avoid the shift altogether; and add an argument spec to some macros. R=reed@google.com,mtklein@google.com BUG=skia:4633 Review URL: https://codereview.chromium.org/1503423003
* Pin result in SkATan2_255Gravatar robertphillips2015-12-07
| | | | | | BUG=555544 Review URL: https://codereview.chromium.org/1506913002
* Create GLSLUniformHandler class for gpu backendGravatar egdaniel2015-12-03
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1490283004
* Don't use the Sk4f gradient impl without SIMDGravatar fmalita2015-12-03
| | | | | | | | | | | Also remove the SK_SUPPORT_LEGACY_LINEAR_GRADIENT_TABLE guard since it is no longer used in Chromium. BUG=chromium:563492 R=reed@google.com,mtklein@google.com CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review URL: https://codereview.chromium.org/1489233005
* Add Sk4f::ToBytes(uint8_t[16], Sk4f, Sk4f, Sk4f, Sk4f)Gravatar mtklein2015-12-01
| | | | | | | | | | | | This is a big speedup for float -> byte. E.g. gradient_linear_clamp_3color: x86-64 147µs -> 103µs (Broadwell MBP) arm64 2.03ms -> 648µs (Galaxy S6) armv7 1.12ms -> 489µs (Galaxy S6, same device!) BUG=skia: CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot;client.skia.android:Test-Android-GCC-Nexus9-CPU-Denver-Arm64-Debug-Trybot Review URL: https://codereview.chromium.org/1483953002
* Take span len into account when determining whether gradient is verticalGravatar fmalita2015-11-23
| | | | | | R=reed@google.com Review URL: https://codereview.chromium.org/1471753004
* use pinned value during lerp for vertical gradientsGravatar reed2015-11-22
| | | | | | | | slight formatting clean up on associated gm BUG=skia: Review URL: https://codereview.chromium.org/1471543002
* Fix nearly-vertical gradient assertGravatar fmalita2015-11-19
| | | | | | | | Use a SkScalarNearlyZero(dx) test instead of !SkScalarIsFinite(invDx). R=reed@google.com Review URL: https://codereview.chromium.org/1456783005
* Move glsl onto EmitArgs struct for emitCodeGravatar egdaniel2015-11-19
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1453623003