History log of /external/skia/src/core/SkBlendMode.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
547c8590a553efef7bcfb4c04e52072eb1271bea 05-Feb-2018 Mike Reed <reed@google.com> gpu impl for compose and combine maskfilters

remove "warning" in GrProcessorSet about coverage-as-alpha (we think the current behavior is correct)

update gpudevice::drawImage to check for maskfilter before trying to create its mask

Bug: skia:
Change-Id: I9ecb6cd25dd003bc19fa1e33edf6614a5ba4acb7
Reviewed-on: https://skia-review.googlesource.com/103761
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/src/core/SkBlendMode.cpp
5f8774268ce4a0674a80e8cb5b0aeb4ea9b92a48 16-Sep-2017 Mike Klein <mtklein@chromium.org> Post-lerp -> pre-scale if blend mode supports it.

We've been doing this for Plus and SrcOver, and now expand it to the
couple other blend modes like SrcATop and DstOver that also support this
trick.

We need to take some special care with rgb coverage, and continue
to lerp for any mode that contains an explicit source-alpha term.
This is explained in the comments.

Change-Id: Ie44edf1504f305aec0c69fc92504431e0efeb627
Reviewed-on: https://skia-review.googlesource.com/47401
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
/external/skia/src/core/SkBlendMode.cpp
fb126fa96e0f49f5dc17a9a043acced68be99e93 24-Aug-2017 Mike Klein <mtklein@chromium.org> rework plus blend mode

The most interesting parts of this are how plus interacts with partial
coverage. Plus needs its clamp to happen after the lerp.
Luckily, some of its math folds away:

d' = clamp[ d*(1-c) + (s+d)*c ] ==
clamp[ d - dc + sc + dc ] ==
clamp[ d + sc ]

What's nice there is that coverage can be folded into the src term.
This suggests that we can re-write the plus stage to clamp internally
(and thus, be viable for 8-bit) if we always pre-scale with coverage.

We don't have a way to pre-scale with 565 coverage until now, but
it's only a step or two away from there. We can use the alternate
formulation we derived for alpha for lerp_565, calculating the alpha
coverage from red, green, and blue coverages _and_ the values of src
and dst alpha.

While we already pre-scale srcover today for 8-bit or constant coverage,
we cannot do the same for 565. When evaluating the expression

d' = s + (1-a)d

we need the a term to be pre-scaled with red's coverage when calculating
dr', with blue's when calculating db', etc. Essentially we need to
carry around a bunch of extra values, and we've got no way to do that.

So instead, we'll just carefully pre-scale plus with any coverage, and
keep post-lerping srcover when we have 565 coverage.

Change-Id: I7a7a52eec7d482e1b98bb8a01ea0a3d5e67bef65
Reviewed-on: https://skia-review.googlesource.com/38300
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
/external/skia/src/core/SkBlendMode.cpp
45c16fa82cd2fec010d4cb7763b654a413cabd0c 19-Jul-2017 Mike Klein <mtklein@chromium.org> convert over to 2d-mode

[√] convert all stages to use SkJumper_MemoryCtx / be 2d-compatible
[√] convert compile to 2d also, remove 1d run/compile
[√] convert all call sites
[√] no diffs

Change-Id: I3b806eb8fe0c3ec043359616409f7cd1211a1e43
Reviewed-on: https://skia-review.googlesource.com/24263
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
/external/skia/src/core/SkBlendMode.cpp
f449ded72acf90c1d68a9492bc627a16e709591d 10-Jun-2017 Mike Reed <reed@google.com> attempt to fix compiler error

../../third_party/skia/src/core/SkBlendMode.cpp: In function 'SkPM4f SkBlendMode_Apply(SkBlendMode, SkPM4f, SkPM4f)':
../../third_party/skia/src/core/SkBlendMode.cpp:133:1: error: unrecognizable insn:
}
^
(insn 48 47 49 7 (set (reg:V4SF 112 [ D.89567 ])
(unspec:V4SF [
(mem/c:V4SF (reg/f:SI 104 virtual-incoming-args) [0 MEM[(const __builtin_neon_sf[4] *)&src]+0 S16 A32])
] UNSPEC_VLD1)) /b/c/b/android/src/third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/include/arm_neon.h:8693 -1
(nil))
../../third_party/skia/src/core/SkBlendMode.cpp:133:1: internal compiler error: in extract_insn, at recog.c:2202

Bug: skia:
Change-Id: I85e98e858d00b8b505c6676e9a9dc762f0ccb25c
Reviewed-on: https://skia-review.googlesource.com/19392
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/core/SkBlendMode.cpp
cb3ceb79cb0dba69ee3a10c42b268b85ca71489b 09-Jun-2017 Mike Klein <mtklein@chromium.org> CanOverflow -> ClampIfNeeded

Centralize the clamping in ClampIfNeeded, and switch it to clamp_1.

Change-Id: I056ac029d3ddc81e3f0f194f2b9c9924cad4caae
Reviewed-on: https://skia-review.googlesource.com/19401
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
/external/skia/src/core/SkBlendMode.cpp
f066ac908eca30af2bb2fb241fb0eec78caa88db 09-Jun-2017 Mike Reed <reed@google.com> replace 4f procs with pipeline (only called in 2 places by ganesh)

enables lots of code to delete

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
Bug: skia:
Change-Id: I13631ead68a9232bd8c13c5ef54727f44def26ca
Reviewed-on: https://skia-review.googlesource.com/19278
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/core/SkBlendMode.cpp
6b3542aeb0780e7e3dd1a1e0493164f27add9827 06-Jun-2017 Mike Reed <reed@google.com> move Coeff into blendmode

Bug: skia:
Change-Id: Ib4f3398b0cdc6b0f575f6db80d2ce0bf9666f077
Reviewed-on: https://skia-review.googlesource.com/18843
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/core/SkBlendMode.cpp