brianosman [Wed, 20 Apr 2016 17:52:54 +0000 (10:52 -0700)]
Get skiaserve working on Windows.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1903203003
Review URL: https://codereview.chromium.org/
1903203003
jvanverth [Wed, 20 Apr 2016 17:33:27 +0000 (10:33 -0700)]
Revert of Use transfer buffer for BatchAtlas texture copies (patchset #9 id:160001 of https://codereview.chromium.org/
1888473002/ )
Reason for revert:
Lots of sync issues with paths and text.
Original issue's description:
> Use transfer buffer for BatchAtlas texture copies.
>
> Sets up use of transfer buffer (if available) to do one-copy transfers.
> Get transfer buffers working properly in GL.
> Implement GrVkGpu::onTransferPixels.
> Check caps to ensure we can create a transfer buffer.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1888473002
>
> Committed: https://skia.googlesource.com/skia/+/
b0ec9836dbf7f2304a3a29289b818719ca0a39bd
TBR=robertphillips@google.com,egdaniel@google.com,bsalomon@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/
1904723003
bungeman [Wed, 20 Apr 2016 17:22:20 +0000 (10:22 -0700)]
SkTArray movable and swap for move only elements.
SkTArray cannot currently contain move only elements because its swap
currently requires the SkTArray to be copyable. This makes SkTArray
movable and makes its swap move instead of copy.
Review URL: https://codereview.chromium.org/
1904663004
brianosman [Wed, 20 Apr 2016 16:20:46 +0000 (09:20 -0700)]
Add control of the sRGB global hack flag in SampleApp
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1893313006
Review URL: https://codereview.chromium.org/
1893313006
halcanary [Wed, 20 Apr 2016 15:49:53 +0000 (08:49 -0700)]
gyp: add osmesa target to factor out common code
Test this out with `GYP_DEFINES=skia_mesa=1`.
Also uses the `library_dirs` keyword, which is relatively new.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1903233002
Review URL: https://codereview.chromium.org/
1903233002
halcanary [Wed, 20 Apr 2016 15:37:43 +0000 (08:37 -0700)]
SkFontHost/FreeType/ToUnicode: add an assert
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1900193002
Review URL: https://codereview.chromium.org/
1900193002
scroggo [Wed, 20 Apr 2016 15:27:18 +0000 (08:27 -0700)]
Add instructions for building with MSAN
Move static functions only used by GPU into if SK_SUPPORT_GPU guard.
This enables building MSAN, which seems to default to not supporting
GPU.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1908493002
DOCS_PREVIEW= https://skia.org/?cl=
1908493002
Review URL: https://codereview.chromium.org/
1908493002
egdaniel [Wed, 20 Apr 2016 14:09:46 +0000 (07:09 -0700)]
Refactor how we store and use samplers in Ganesh
The main goal of this refactorization is to allow Vulkan to use separate
sampler and texture objects in the shader and descriptor sets and combine
them into a sampler2d in the shader where needed.
A large part of this is separating how we store samplers and uniforms in the
UniformHandler. We no longer need to store handles to samplers besides when
we are initially emitting code. After we emit code all we ever do is loop over
all samplers and do some processor independent work on them, so we have no need
for direct access to individual samplers.
In the GLProgram all we ever do is set the sampler uniforms in the ctor and never
touch them again, so no need to save sampler info there. The texture access on
program reuse just assume that they come in the same order as we set the texture
units for the samplers
For Vulkan, it is a similar story. We create the descriptor set layouts with the samplers,
then when we get new textures, we just assume they come in in the same order as we
set the samplers on the descriptor sets. Thus no need to save direct vulkan info.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1885863004
Committed: https://skia.googlesource.com/skia/+/
45b61a1c4c0be896e7b12fd1405abfece799114f
Review URL: https://codereview.chromium.org/
1885863004
jvanverth [Wed, 20 Apr 2016 12:54:01 +0000 (05:54 -0700)]
Use transfer buffer for BatchAtlas texture copies.
Sets up use of transfer buffer (if available) to do one-copy transfers.
Get transfer buffers working properly in GL.
Implement GrVkGpu::onTransferPixels.
Check caps to ensure we can create a transfer buffer.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1888473002
Review URL: https://codereview.chromium.org/
1888473002
robertphillips [Wed, 20 Apr 2016 12:29:51 +0000 (05:29 -0700)]
Rein in the use of SkDevice.h
Nothing interesting.
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1904673003
Review URL: https://codereview.chromium.org/
1904673003
svaisanen [Wed, 20 Apr 2016 07:36:53 +0000 (00:36 -0700)]
Enable NV_path_rendering in the Null GL.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1882563002
Review URL: https://codereview.chromium.org/
1882563002
brianosman [Wed, 20 Apr 2016 02:41:54 +0000 (19:41 -0700)]
Fix DM blaze build (PNG output is now dependent on picture_utils)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1902333002
Review URL: https://codereview.chromium.org/
1902333002
egdaniel [Tue, 19 Apr 2016 22:24:29 +0000 (15:24 -0700)]
Revert of Refactor how we store and use samplers in Ganesh (patchset #7 id:120001 of https://codereview.chromium.org/
1885863004/ )
Reason for revert:
breaking bots
Original issue's description:
> Refactor how we store and use samplers in Ganesh
>
> The main goal of this refactorization is to allow Vulkan to use separate
> sampler and texture objects in the shader and descriptor sets and combine
> them into a sampler2d in the shader where needed.
>
> A large part of this is separating how we store samplers and uniforms in the
> UniformHandler. We no longer need to store handles to samplers besides when
> we are initially emitting code. After we emit code all we ever do is loop over
> all samplers and do some processor independent work on them, so we have no need
> for direct access to individual samplers.
>
> In the GLProgram all we ever do is set the sampler uniforms in the ctor and never
> touch them again, so no need to save sampler info there. The texture access on
> program reuse just assume that they come in the same order as we set the texture
> units for the samplers
>
> For Vulkan, it is a similar story. We create the descriptor set layouts with the samplers,
> then when we get new textures, we just assume they come in in the same order as we
> set the samplers on the descriptor sets. Thus no need to save direct vulkan info.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1885863004
>
> Committed: https://skia.googlesource.com/skia/+/
45b61a1c4c0be896e7b12fd1405abfece799114f
TBR=bsalomon@google.com,jvanverth@google.com,cdalton@nvidia.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/
1896013003
egdaniel [Tue, 19 Apr 2016 21:45:57 +0000 (14:45 -0700)]
Refactor how we store and use samplers in Ganesh
The main goal of this refactorization is to allow Vulkan to use separate
sampler and texture objects in the shader and descriptor sets and combine
them into a sampler2d in the shader where needed.
A large part of this is separating how we store samplers and uniforms in the
UniformHandler. We no longer need to store handles to samplers besides when
we are initially emitting code. After we emit code all we ever do is loop over
all samplers and do some processor independent work on them, so we have no need
for direct access to individual samplers.
In the GLProgram all we ever do is set the sampler uniforms in the ctor and never
touch them again, so no need to save sampler info there. The texture access on
program reuse just assume that they come in the same order as we set the texture
units for the samplers
For Vulkan, it is a similar story. We create the descriptor set layouts with the samplers,
then when we get new textures, we just assume they come in in the same order as we
set the samplers on the descriptor sets. Thus no need to save direct vulkan info.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1885863004
Review URL: https://codereview.chromium.org/
1885863004
robertphillips [Tue, 19 Apr 2016 21:23:42 +0000 (14:23 -0700)]
Add explicit clip to SkSpecialSurface's SkCanvas
It seems safer (and is probably more performant) to enforce this internal to SkSpecialSurface.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1903553002
Review URL: https://codereview.chromium.org/
1903553002
mtklein [Tue, 19 Apr 2016 21:21:30 +0000 (14:21 -0700)]
skcpu: sse4.1 floor, f16c f16<->f32
- floor with roundps is about 4.5x faster when available
- f16 srcover_n is similar to but a little faster than the version in https://codereview.chromium.org/
1884683002. This new one fuses the dst load/stores into the f16<->f32 conversions:
+0x180 movups (%r15), %xmm1
+0x184 vcvtph2ps (%rbx), %xmm2
+0x189 movaps %xmm1, %xmm3
+0x18c shufps $255, %xmm3, %xmm3
+0x190 movaps %xmm0, %xmm4
+0x193 subps %xmm3, %xmm4
+0x196 mulps %xmm2, %xmm4
+0x199 addps %xmm1, %xmm4
+0x19c vcvtps2ph $0, %xmm4, (%rbx)
+0x1a2 addq $16, %r15
+0x1a6 addq $8, %rbx
+0x1aa decl %r14d
+0x1ad jne +0x180
If we decide to land this it'd be a good idea to convert most or all users of SkFloatToHalf_01 and SkHalfToFloat_01 over to the pointer-based versions.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1891513002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
Committed: https://skia.googlesource.com/skia/+/
cbe3c1af987d622ea67ef560d855b41bb14a0ce9
Committed: https://skia.googlesource.com/skia/+/
3faf74b8364491ca806f523fbb1d8a97be592663
Review URL: https://codereview.chromium.org/
1891513002
reed [Tue, 19 Apr 2016 21:02:52 +0000 (14:02 -0700)]
add gm to exercise rotated imagefiltesr w/ and w/o antialiasing
BUG=skia:3288
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1902253003
Review URL: https://codereview.chromium.org/
1902253003
mtklein [Tue, 19 Apr 2016 21:00:13 +0000 (14:00 -0700)]
Move CPU feature detection to its own file.
- Moves CPU feature detection to its own file.
- Cleans up some redundant feature detection scattered around core/ and opts/.
- Can now detect a few new CPU features:
* F16C -> Intel f16<->f32 instructions, added between AVX and AVX2
* FMA -> Intel FMA instructions, added at the same time as AVX2
* VFP_FP16 -> ARM f16<->f32 instructions, quite common
* NEON_FMA -> ARM FMA instructions, also quite common
* SSE and SSE3... why not?
This new internal API makes it very cheap to do fine-grained runtime CPU
feature detection. Redundant calls to SkCpu::Supports() should be eliminated
and it's hoistable out of loops. It compiles away entirely when we have the
appropriate instructions available at compile time.
This means we can call it to guard even a little snippet of 1 or 2 instructions
right where needed and let inlining hoist the check (if any at all) up to
somewhere that doesn't hurt performance. I've explained how I made this work
in the private section of the new header.
Once this lands and bakes a bit, I'll start following up with CLs to use it more
and to add a bunch of those little 1-2 instruction snippets we've been wanting,
e.g. cvtps2ph, cvtph2ps, ptest, pmulld, pmovzxbd, blendvps, pshufb, roundps
(for floor) on x86, and vcvt.f32.f16, vcvt.f16.f32 on ARM.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1890483002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
Committed: https://skia.googlesource.com/skia/+/
872ea29357439f05b1f6995dd300fc054733e607
Review URL: https://codereview.chromium.org/
1890483002
brianosman [Tue, 19 Apr 2016 19:47:54 +0000 (12:47 -0700)]
Adding support for controlling the global sRGB SkColor switch.
Frontend change: https://codereview.chromium.org/
1900233002/
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1902143002
Review URL: https://codereview.chromium.org/
1902143002
mtklein [Tue, 19 Apr 2016 19:42:24 +0000 (12:42 -0700)]
Remove static initializer for SkOpts::Init()
Static initializers run in a confusing unspecified order,
so it's best to have as few of them as possible.
Most tools and clients I can find already call SkGraphics::Init(),
(or equivalently create an SkAutoGraphics) which calls SkOpts::Init():
- Chrome
- Chrome renderer
- Android
- DM
- nanobench
- SampleApp
- VisualBench
- the old debugger
Seems like the only thing relying on this static initializer today is
the new debugger, fixed here.
TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1903503002
Review URL: https://codereview.chromium.org/
1903503002
herb [Tue, 19 Apr 2016 19:30:22 +0000 (12:30 -0700)]
Add onImageInfo call to SkImage_Base.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1903483003
Review URL: https://codereview.chromium.org/
1903483003
egdaniel [Tue, 19 Apr 2016 19:13:41 +0000 (12:13 -0700)]
Fix createBuffer in Vulkan
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1897373002
Review URL: https://codereview.chromium.org/
1897373002
robertphillips [Tue, 19 Apr 2016 17:21:02 +0000 (10:21 -0700)]
Switch SkColorFilterImageFilter over to new onFilterImage interface (again)
Back when this was originally reverted I was able to easily repro the perf regression locally. At ToT Skia/Chrome I can no longer repro the perf regression with this CL (in fact there is a modest perf improvement).
I propose landing this and then watching the Chromium perf bots.
BUG=602300,598028
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1901513002
Review URL: https://codereview.chromium.org/
1901513002
brianosman [Tue, 19 Apr 2016 17:16:53 +0000 (10:16 -0700)]
Adding support for playback to L32/S32/F16 canvas.
Playback of my test GM works correctly on both raster and GPU, in all three modes.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1893393002
Review URL: https://codereview.chromium.org/
1893393002
cdalton [Tue, 19 Apr 2016 17:00:02 +0000 (10:00 -0700)]
Add optional data parameter to createBuffer
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1877073002
Review URL: https://codereview.chromium.org/
1877073002
robertphillips [Tue, 19 Apr 2016 16:29:01 +0000 (09:29 -0700)]
Make skpinfo more human friendly
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1901713004
Review URL: https://codereview.chromium.org/
1901713004
brianosman [Tue, 19 Apr 2016 16:18:11 +0000 (09:18 -0700)]
Move DM png code to picture_utils, for use by other tools.
Planning to re-use this code in skiaserve in an upcoming change.
TBR=mtklein@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1901113002
Review URL: https://codereview.chromium.org/
1901113002
halcanary [Tue, 19 Apr 2016 15:46:50 +0000 (08:46 -0700)]
fiddle_build_test/gyp: fix mac mesa build (2)
TBR=
NOTRY=true
Review URL: https://codereview.chromium.org/
1900173002
robertphillips [Tue, 19 Apr 2016 15:32:40 +0000 (08:32 -0700)]
Add more diagnostic messages to ReadWriteAlpha test
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1902063002
Review URL: https://codereview.chromium.org/
1902063002
scroggo [Tue, 19 Apr 2016 15:27:39 +0000 (08:27 -0700)]
Rename CodexTest.cpp to CodecTest.cpp
CodexTest confuses me almost every time I try to open it. Renaming it
to what my brain thinks it should be called.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1897973004
Review URL: https://codereview.chromium.org/
1897973004
halcanary [Tue, 19 Apr 2016 15:00:01 +0000 (08:00 -0700)]
fiddle_build_test/gyp: fix mac mesa build
TBR=
NOTRY=true
Review URL: https://codereview.chromium.org/
1900143002
msarett [Tue, 19 Apr 2016 14:27:58 +0000 (07:27 -0700)]
Delete unused fNamedFactorySet from SkWriteBuffer
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1903483002
Review URL: https://codereview.chromium.org/
1903483002
robertphillips [Tue, 19 Apr 2016 11:41:12 +0000 (04:41 -0700)]
Revert of Add SkEncodedInfo to report properties of encoded image data (patchset #6 id:200001 of https://codereview.chromium.org/
1820073002/ )
Reason for revert:
Lots of bots failing
Original issue's description:
> Add SkEncodedInfo to report properties of encoded image data
>
> All this does is build an SkEncodedInfo for each codec, and
> then convert it to an SkImageInfo.
>
> In future steps I intend to:
> (1) Use SkEncodedInfo in place of SrcConfig in SkSwizzler.
> (2) Support more conversions in SkSwizzler (non-native
> BGRA/RGBA, 16-bit components, float, fixed point)
> (3) Investigate optimizing conversions from encoded data
> to linear color spaces.
>
> BUG=skia:4133
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1820073002
>
> Committed: https://skia.googlesource.com/skia/+/
f682d9ad70d690a343bc15e26ef321d86770be41
TBR=scroggo@google.com,reed@google.com,msarett@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4133
Review URL: https://codereview.chromium.org/
1895383002
msarett [Mon, 18 Apr 2016 23:20:00 +0000 (16:20 -0700)]
Add SkEncodedInfo to report properties of encoded image data
All this does is build an SkEncodedInfo for each codec, and
then convert it to an SkImageInfo.
In future steps I intend to:
(1) Use SkEncodedInfo in place of SrcConfig in SkSwizzler.
(2) Support more conversions in SkSwizzler (non-native
BGRA/RGBA, 16-bit components, float, fixed point)
(3) Investigate optimizing conversions from encoded data
to linear color spaces.
BUG=skia:4133
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1820073002
Review URL: https://codereview.chromium.org/
1820073002
robertphillips [Mon, 18 Apr 2016 21:49:57 +0000 (14:49 -0700)]
Make SkImageFilter::Cache purging methods pure virtual
This is intended to see if the Windows 10 bots ignoring of the purge methods is a compiler bug.
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1901883002
Review URL: https://codereview.chromium.org/
1901883002
msarett [Mon, 18 Apr 2016 21:21:55 +0000 (14:21 -0700)]
Use libjpeg-turbo for YUV->RGB conversion in jpeg encoder
This remove the previous codepath, which performed a less
accurate conversion to YUV.
It actually faster to use the more accurate conversion, now
that we have updated to libjpeg-turbo.
z620 Performance Speed-Up:
mandrill.jpg (512x512): 1.13x
color_wheel.jpg (128x128): 1.12x
This should fix:
https://buganizer.corp.google.com/u/0/issues/
28161384
https://buganizer.corp.google.com/u/0/issues/
21891795
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1886183002
Review URL: https://codereview.chromium.org/
1886183002
herb [Mon, 18 Apr 2016 21:06:21 +0000 (14:06 -0700)]
Pass through the profile info when creating a high-quality scaled offscreen.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1897043002
Review URL: https://codereview.chromium.org/
1897043002
egdaniel [Mon, 18 Apr 2016 20:42:02 +0000 (13:42 -0700)]
Update to ToT shaderc
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1898863002
Review URL: https://codereview.chromium.org/
1898863002
djsollen [Mon, 18 Apr 2016 19:57:35 +0000 (12:57 -0700)]
Cleanup android build files and tools
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1898793004
Review URL: https://codereview.chromium.org/
1898793004
halcanary [Mon, 18 Apr 2016 19:42:05 +0000 (12:42 -0700)]
fiddle_build_test depends on skia_mesa
Builds on Build-Ubuntu-GCC-x86_64-Release-Mesa-Trybot
Shouldn't break anything else.
Review URL: https://codereview.chromium.org/
1901823002
msarett [Mon, 18 Apr 2016 19:37:46 +0000 (12:37 -0700)]
Add bench for image encodes
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1890643003
Review URL: https://codereview.chromium.org/
1890643003
halcanary [Mon, 18 Apr 2016 19:18:30 +0000 (12:18 -0700)]
fiddle_build_test: remove from most to fix build
TBR=jcgregorio@google.com
NOTRY=true
Review URL: https://codereview.chromium.org/
1897943002
halcanary [Mon, 18 Apr 2016 18:50:07 +0000 (11:50 -0700)]
experimental/fiddle -> tools/fiddle
also, test building fiddle_main.cpp & draw.cpp
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1895143002
Review URL: https://codereview.chromium.org/
1895143002
djsollen [Mon, 18 Apr 2016 18:01:02 +0000 (11:01 -0700)]
Update android toolchain variable to point to root dir and not the bin
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1900773002
Review URL: https://codereview.chromium.org/
1900773002
senorblanco [Mon, 18 Apr 2016 17:32:02 +0000 (10:32 -0700)]
Remove deprecated paths from image filter infrastructure.
Now that there are no filterImageGPUDeprecated() implementations,
we can being to rip out the deprecated infrastructure.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1888243003
Committed: https://skia.googlesource.com/skia/+/
6fb3cd7209849e665635ac17ef4eef4ad63e7f61
Review URL: https://codereview.chromium.org/
1888243003
ericrk [Mon, 18 Apr 2016 16:14:00 +0000 (09:14 -0700)]
Skia Filter Quality and Scaling Metrics
Adds histogram metrics to log the filter quality and scale factor of
each image draw. To make the data easier to consume, this is broken
down into a number of individual histograms:
- Filter quality across all draw calls
- Scale amount across all draw calls
- Scale amount per filter quality (4 histograms total)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1686203002
Committed: https://skia.googlesource.com/skia/+/
f57b3a6e4a002caf01378832cbd756c6c163a783
Review URL: https://codereview.chromium.org/
1686203002
halcanary [Mon, 18 Apr 2016 15:17:56 +0000 (08:17 -0700)]
experimental/fiddle: update to new SkImage API
required by https://crrev.com/
1897453002
NOTRY=true
TBR=jcgregorio@google.com
Review URL: https://codereview.chromium.org/
1895103002
mtklein [Mon, 18 Apr 2016 15:09:11 +0000 (08:09 -0700)]
Modernize and trim down SkOnce.
The API and implementation are very much simplified.
You may not want to bother reading the diff.
As is our trend, SkOnce now uses <atomic> directly.
Member initialization means we don't need SK_DECLARE_STATIC_ONCE.
SkSpinlock already works this same way.
All uses of the old API taking an external bool* and Lock* were pessimal,
so I have not carried this sort of API forward. It's simpler, faster,
and more space-efficient to always use this single SkOnce class interface.
SkOnce weighs 2 bytes: a done bool and an SkSpinlock, also a bool internally.
This API refactoring opens up the opportunity to fuse those into a single
three-state byte if we'd like.
No public API changes.
TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1894893002
Review URL: https://codereview.chromium.org/
1894893002
robertphillips [Mon, 18 Apr 2016 14:20:05 +0000 (07:20 -0700)]
Split AlphaThresholdEffect out into its own file
Mainly mechanical although I did:
convert Create method to sk_sp Make version
rm extra '\t's and '\n's in emitCode
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1893193002
Review URL: https://codereview.chromium.org/
1893193002
rmistry [Mon, 18 Apr 2016 11:18:56 +0000 (04:18 -0700)]
Walk through files in parse_llvm_coverage.py instead of using 'git ls-files'
The script will be executed on a swarming bot where we do not want to isolate .git directories.
BUG=skia:5159
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1888423002
NOTREECHECKS=true
Review URL: https://codereview.chromium.org/
1888423002
rmistry [Mon, 18 Apr 2016 11:14:17 +0000 (04:14 -0700)]
Do not do compile steps for Coverage
Coverage needs to do compilation in its test step. The primary reason is: the path to the out directory is compiled into the binary, which is why the compile and test steps need to be combined.
BUG=skia:5159
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1889183002
NOTREECHECKS=true
Review URL: https://codereview.chromium.org/
1889183002
rmistry [Mon, 18 Apr 2016 11:13:48 +0000 (04:13 -0700)]
Add new coverage_skia.isolate
Coverage is different from the other recipes because it needs both skia_repo and test artifacts. The primary reason is: the path to the out directory is compiled into the binary, which is why the compile and test steps need to be combined.
The isolate file will be used from the updated coverage recipe in https://codereview.chromium.org/
1862713002/
BUG=skia:5159
NOTREECHECKS=true
Review URL: https://codereview.chromium.org/
1893503003
robertphillips [Sun, 17 Apr 2016 21:31:22 +0000 (14:31 -0700)]
Revert of Remove deprecated paths from image filter infrastructure. (patchset #2 id:20001 of https://codereview.chromium.org/
1888243003/ )
Reason for revert:
Surprisingly (appallingly?), Chrome calls canFilterImageGPU
Original issue's description:
> Remove deprecated paths from image filter infrastructure.
>
> Now that there are no filterImageGPUDeprecated() implementations,
> we can being to rip out the deprecated infrastructure.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1888243003
>
> Committed: https://skia.googlesource.com/skia/+/
6fb3cd7209849e665635ac17ef4eef4ad63e7f61
TBR=reed@google.com,senorblanco@chromium.org
# 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/
1893993002
robertphillips [Sun, 17 Apr 2016 21:27:05 +0000 (14:27 -0700)]
Outline SkImageFilter Make methods
Mainly mechanical CL.
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1893973002
Review URL: https://codereview.chromium.org/
1893973002
senorblanco [Sun, 17 Apr 2016 21:02:04 +0000 (14:02 -0700)]
Remove deprecated paths from image filter infrastructure.
Now that there are no filterImageGPUDeprecated() implementations,
we can being to rip out the deprecated infrastructure.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1888243003
Review URL: https://codereview.chromium.org/
1888243003
reed [Sat, 16 Apr 2016 19:24:09 +0000 (12:24 -0700)]
Revert of move static arrays into impl, to avoid multiple copies (patchset #3 id:40001 of https://codereview.chromium.org/
1889793007/ )
Reason for revert:
FAILED: if [ ! -e lib/libgfx.so -o ! -e lib/libgfx.so.TOC ]; then /b/build/slave/linux_chromeos/build/src/build/goma/client/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -shared -Wl,-z,now -Wl,-z,relro -Wl,--fatal-warnings -Wl,-z,defs -pthread -Wl,-z,noexecstack -fPIC -fuse-ld=gold -B/b/build/slave/linux_chromeos/build/src/third_party/binutils/Linux_x64/Release/bin -Wl,--disable-new-dtags -m64 -Wl,--icf=all -o lib/libgfx.so -Wl,-soname=libgfx.so @lib/libgfx.so.rsp && { readelf -d lib/libgfx.so | grep SONAME ; nm -gD -f p lib/libgfx.so | cut -f1-2 -d' '; } > lib/libgfx.so.TOC; else /b/build/slave/linux_chromeos/build/src/build/goma/client/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -shared -Wl,-z,now -Wl,-z,relro -Wl,--fatal-warnings -Wl,-z,defs -pthread -Wl,-z,noexecstack -fPIC -fuse-ld=gold -B/b/build/slave/linux_chromeos/build/src/third_party/binutils/Linux_x64/Release/bin -Wl,--disable-new-dtags -m64 -Wl,--icf=all -o lib/libgfx.so -Wl,-soname=libgfx.so @lib/libgfx.so.rsp && { readelf -d lib/libgfx.so | grep SONAME ; nm -gD -f p lib/libgfx.so | cut -f1-2 -d' '; } > lib/libgfx.so.tmp && if ! cmp -s lib/libgfx.so.tmp lib/libgfx.so.TOC; then mv lib/libgfx.so.tmp lib/libgfx.so.TOC ; fi; fi
obj/ui/gfx/gfx.blit.o:../../ui/gfx/blit.cc:function SkColorTypeBytesPerPixel(SkColorType): error: undefined reference to 'gPrivate_SkColorTypeBytesPerPixel'
obj/ui/gfx/gfx.canvas.o:../../ui/gfx/canvas.cc:function SkColorTypeBytesPerPixel(SkColorType): error: undefined reference to 'gPrivate_SkColorTypeBytesPerPixel'
obj/ui/gfx/gfx.canvas_skia.o:../../ui/gfx/canvas_skia.cc:function SkColorTypeBytesPerPixel(SkColorType): error: undefined reference to 'gPrivate_SkColorTypeBytesPerPixel'
obj/ui/gfx/codec/gfx.jpeg_codec.o:../../ui/gfx/codec/jpeg_codec.cc:function SkColorTypeBytesPerPixel(SkColorType): error: undefined reference to 'gPrivate_SkColorTypeBytesPerPixel'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
Original issue's description:
> move static arrays into impl, to avoid multiple copies
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1889793007
>
> Committed: https://skia.googlesource.com/skia/+/
6d7cd1f421dbde43dd2db655ca477c05312ec5fd
TBR=fmalita@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:
Review URL: https://codereview.chromium.org/
1899563002
fmalita [Fri, 15 Apr 2016 20:03:07 +0000 (13:03 -0700)]
Observe gTreatSkColorAsSRGB for 4f gradients.
Use SkColor4f::FromColor() in the color packer to convert srgb->linear
when needed.
R=reed@google.com,herb@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1890253002
Review URL: https://codereview.chromium.org/
1890253002
herb [Fri, 15 Apr 2016 19:57:42 +0000 (12:57 -0700)]
Add ability to default incoming image data as sRGB by default.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1893663002
Review URL: https://codereview.chromium.org/
1893663002
robertphillips [Fri, 15 Apr 2016 19:47:42 +0000 (12:47 -0700)]
Switch SkXfermodeImagerFilter over to new onFilterImage interface
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1894643002
Review URL: https://codereview.chromium.org/
1894643002
halcanary [Fri, 15 Apr 2016 19:30:21 +0000 (12:30 -0700)]
Revert of SkPDF: PDF/A runtime switch (patchset #1 id:100001 of https://codereview.chromium.org/
1891873002/ )
Reason for revert:
breaking something.
Original issue's description:
> SkPDF: PDF/A runtime switch
>
> TODO: remove gyp variable and modify API in SkDocument.h
>
> BUG=skia:3110
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1891873002
>
> Committed: https://skia.googlesource.com/skia/+/
570f18b43417d73c3fbd113cc0b4258e08b14c82
TBR=tomhudson@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:3110
Review URL: https://codereview.chromium.org/
1892203002
halcanary [Fri, 15 Apr 2016 18:59:31 +0000 (11:59 -0700)]
SkPDF: PDF/A runtime switch
TODO: remove gyp variable and modify API in SkDocument.h
BUG=skia:3110
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1891873002
Review URL: https://codereview.chromium.org/
1891873002
brianosman [Fri, 15 Apr 2016 18:00:51 +0000 (11:00 -0700)]
Fix skiaserve crash when displaying batch bounds
In my test case, the first actual batch would combine with the clear
issued before auditing had been enabled. After the successful combine,
we would try to inform the audit manager, but it didn't know about the
batch, triggering an assert (and subsequent crash). Fix is ijust to
ensure that no prior batches are pending when we turn on auditing.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1894633002
Review URL: https://codereview.chromium.org/
1894633002
reed [Fri, 15 Apr 2016 17:56:51 +0000 (10:56 -0700)]
exernalize imagefactory guard
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1897453002
TBR=
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot
Review URL: https://codereview.chromium.org/
1897453002
reed [Fri, 15 Apr 2016 17:48:01 +0000 (10:48 -0700)]
WIP: runtime switch for how to interpret SkColor -vs- srgb
Still very conflicted about the "right" way to proceed with this, but thought I'd experiment with a runtime flag, so we can practice seeing SKPs in various stages of "srgb correctness".
Other aspects to either fix, or at least provide runtime switches for:
- untagged images
- gradients
- colorshader
- drawVertices
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1891013002
TBR=
Review URL: https://codereview.chromium.org/
1891013002
reed [Fri, 15 Apr 2016 17:03:03 +0000 (10:03 -0700)]
move static arrays into impl, to avoid multiple copies
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1889793007
Review URL: https://codereview.chromium.org/
1889793007
robertphillips [Fri, 15 Apr 2016 16:58:37 +0000 (09:58 -0700)]
Move SkImageFilter over to storing sk_sps
This CL also removes the old bare-pointer style ctor.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1894573002
Review URL: https://codereview.chromium.org/
1894573002
mtklein [Fri, 15 Apr 2016 15:40:22 +0000 (08:40 -0700)]
Revert of Move CPU feature detection to its own file. (patchset #7 id:120001 of https://codereview.chromium.org/
1890483002/ )
Reason for revert:
many unexpected GM diffs across GPU+CPU configs on Windows (hopefully just text masks on GPU?). seems like we pick a different srcover variant in some places.
Original issue's description:
> Move CPU feature detection to its own file.
>
> - Moves CPU feature detection to its own file.
> - Cleans up some redundant feature detection scattered around core/ and opts/.
> - Can now detect a few new CPU features:
> * F16C -> Intel f16<->f32 instructions, added between AVX and AVX2
> * FMA -> Intel FMA instructions, added at the same time as AVX2
> * VFP_FP16 -> ARM f16<->f32 instructions, quite common
> * NEON_FMA -> ARM FMA instructions, also quite common
> * SSE and SSE3... why not?
>
> This new internal API makes it very cheap to do fine-grained runtime CPU
> feature detection. Redundant calls to SkCpu::Supports() should be eliminated
> and it's hoistable out of loops. It compiles away entirely when we have the
> appropriate instructions available at compile time.
>
> This means we can call it to guard even a little snippet of 1 or 2 instructions
> right where needed and let inlining hoist the check (if any at all) up to
> somewhere that doesn't hurt performance. I've explained how I made this work
> in the private section of the new header.
>
> Once this lands and bakes a bit, I'll start following up with CLs to use it more
> and to add a bunch of those little 1-2 instruction snippets we've been wanting,
> e.g. cvtps2ph, cvtph2ps, ptest, pmulld, pmovzxbd, blendvps, pshufb, roundps
> (for floor) on x86, and vcvt.f32.f16, vcvt.f16.f32 on ARM.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1890483002
> CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/
872ea29357439f05b1f6995dd300fc054733e607
TBR=fmalita@chromium.org,herb@google.com,reed@google.com,mtklein@chromium.org
# 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/
1892643003
mtklein [Fri, 15 Apr 2016 15:37:22 +0000 (08:37 -0700)]
Revert of skcpu: sse4.1 floor, f16c f16<->f32 (patchset #11 id:200001 of https://codereview.chromium.org/
1891513002/ )
Reason for revert:
this depends on a CL I want to revert
Original issue's description:
> skcpu: sse4.1 floor, f16c f16<->f32
>
> - floor with roundps is about 4.5x faster when available
> - f16 srcover_n is similar to but a little faster than the version in https://codereview.chromium.org/
1884683002. This new one fuses the dst load/stores into the f16<->f32 conversions:
>
> +0x180 movups (%r15), %xmm1
> +0x184 vcvtph2ps (%rbx), %xmm2
> +0x189 movaps %xmm1, %xmm3
> +0x18c shufps $255, %xmm3, %xmm3
> +0x190 movaps %xmm0, %xmm4
> +0x193 subps %xmm3, %xmm4
> +0x196 mulps %xmm2, %xmm4
> +0x199 addps %xmm1, %xmm4
> +0x19c vcvtps2ph $0, %xmm4, (%rbx)
> +0x1a2 addq $16, %r15
> +0x1a6 addq $8, %rbx
> +0x1aa decl %r14d
> +0x1ad jne +0x180
>
> If we decide to land this it'd be a good idea to convert most or all users of SkFloatToHalf_01 and SkHalfToFloat_01 over to the pointer-based versions.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1891513002
> CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/
cbe3c1af987d622ea67ef560d855b41bb14a0ce9
>
> Committed: https://skia.googlesource.com/skia/+/
3faf74b8364491ca806f523fbb1d8a97be592663
TBR=fmalita@chromium.org,herb@google.com,reed@google.com,mtklein@chromium.org
# 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/
1897433002
kulshin [Fri, 15 Apr 2016 15:20:46 +0000 (08:20 -0700)]
Add option to specify font fallback when creating the skia font manager
This originally existed as https://codereview.chromium.org/
1740533003/,
but then got reverted for causing perf problems at startup. This change
avoids that by allowing callers to specify their own font fallback, and
only uses the system fallback if a fallback is needed and none was
provided.
This is part 1 of a three part change.
1: https://codereview.chromium.org/
1878843002/
Adds support for specifying a font fallback in skia
2: https://codereview.chromium.org/
1846433005/
Implements the fallback proxy in Chromium
3: https://codereview.chromium.org/
1883483002/
Adds code to blink to call skia's fallback API
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1878843002
Review URL: https://codereview.chromium.org/
1878843002
brianosman [Fri, 15 Apr 2016 15:13:57 +0000 (08:13 -0700)]
Fix ANGLE in SampleApp
Typo in DLL name meant that we were never running with ANGLE.
Fixing that exposed problem with attachANGLE -> we weren't filling out
attachment info after the first call, resulting in invalid surface
descriptions on windowSizeChanged events.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1892113002
Review URL: https://codereview.chromium.org/
1892113002
robertphillips [Fri, 15 Apr 2016 15:07:27 +0000 (08:07 -0700)]
Remove asFragmentProcessor gpu-specific ImageFilter code path
No image filter should be using this code path now.
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1892493002
Review URL: https://codereview.chromium.org/
1892493002
robertphillips [Fri, 15 Apr 2016 14:57:40 +0000 (07:57 -0700)]
Update TileImageFilter to sk_sp
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1882113002
Review URL: https://codereview.chromium.org/
1882113002
robertphillips [Fri, 15 Apr 2016 14:17:36 +0000 (07:17 -0700)]
Update DisplacementMapEffect to sk_sp
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1877783003
Committed: https://skia.googlesource.com/skia/+/
a53011ef44705a091a8e24f7ea289a3f9ad759f2
Review URL: https://codereview.chromium.org/
1877783003
reed [Fri, 15 Apr 2016 13:59:38 +0000 (06:59 -0700)]
spriteblitter for memcpy case (for all configs)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1887103003
Review URL: https://codereview.chromium.org/
1887103003
mtklein [Fri, 15 Apr 2016 13:18:37 +0000 (06:18 -0700)]
skcpu: sse4.1 floor, f16c f16<->f32
- floor with roundps is about 4.5x faster when available
- f16 srcover_n is similar to but a little faster than the version in https://codereview.chromium.org/
1884683002. This new one fuses the dst load/stores into the f16<->f32 conversions:
+0x180 movups (%r15), %xmm1
+0x184 vcvtph2ps (%rbx), %xmm2
+0x189 movaps %xmm1, %xmm3
+0x18c shufps $255, %xmm3, %xmm3
+0x190 movaps %xmm0, %xmm4
+0x193 subps %xmm3, %xmm4
+0x196 mulps %xmm2, %xmm4
+0x199 addps %xmm1, %xmm4
+0x19c vcvtps2ph $0, %xmm4, (%rbx)
+0x1a2 addq $16, %r15
+0x1a6 addq $8, %rbx
+0x1aa decl %r14d
+0x1ad jne +0x180
If we decide to land this it'd be a good idea to convert most or all users of SkFloatToHalf_01 and SkHalfToFloat_01 over to the pointer-based versions.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1891513002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
Committed: https://skia.googlesource.com/skia/+/
cbe3c1af987d622ea67ef560d855b41bb14a0ce9
Review URL: https://codereview.chromium.org/
1891513002
robertphillips [Fri, 15 Apr 2016 12:09:32 +0000 (05:09 -0700)]
Revert of Update DisplacementMapEffect to sk_sp (patchset #3 id:40001 of https://codereview.chromium.org/
1877783003/ )
Reason for revert:
unexpected image diffs in imagefilterscropexpand GM
Original issue's description:
> Update DisplacementMapEffect to sk_sp
>
> TBR=reed@google.com
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1877783003
>
> Committed: https://skia.googlesource.com/skia/+/
a53011ef44705a091a8e24f7ea289a3f9ad759f2
TBR=fmalita@chromium.org,reed@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/
1884253004
robertphillips [Fri, 15 Apr 2016 12:06:11 +0000 (05:06 -0700)]
Switch SkLightingImageFilter over to new onFilterImage interface
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1887103002
Review URL: https://codereview.chromium.org/
1887103002
robertphillips [Fri, 15 Apr 2016 11:37:07 +0000 (04:37 -0700)]
Update DisplacementMapEffect to sk_sp
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1877783003
Review URL: https://codereview.chromium.org/
1877783003
mtklein [Thu, 14 Apr 2016 23:23:15 +0000 (16:23 -0700)]
Revert of skcpu: sse4.1 floor, f16c f16<->f32 (patchset #10 id:180001 of https://codereview.chromium.org/
1891513002/ )
Reason for revert:
Need to change around my #if guards so that clang-cl is treated like GCC and Clang, rather than MSVC.
Original issue's description:
> skcpu: sse4.1 floor, f16c f16<->f32
>
> - floor with roundps is about 4.5x faster when available
> - f16 srcover_n is similar to but a little faster than the version in https://codereview.chromium.org/
1884683002. This new one fuses the dst load/stores into the f16<->f32 conversions:
>
> +0x180 movups (%r15), %xmm1
> +0x184 vcvtph2ps (%rbx), %xmm2
> +0x189 movaps %xmm1, %xmm3
> +0x18c shufps $255, %xmm3, %xmm3
> +0x190 movaps %xmm0, %xmm4
> +0x193 subps %xmm3, %xmm4
> +0x196 mulps %xmm2, %xmm4
> +0x199 addps %xmm1, %xmm4
> +0x19c vcvtps2ph $0, %xmm4, (%rbx)
> +0x1a2 addq $16, %r15
> +0x1a6 addq $8, %rbx
> +0x1aa decl %r14d
> +0x1ad jne +0x180
>
> If we decide to land this it'd be a good idea to convert most or all users of SkFloatToHalf_01 and SkHalfToFloat_01 over to the pointer-based versions.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1891513002
> CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/
cbe3c1af987d622ea67ef560d855b41bb14a0ce9
TBR=fmalita@chromium.org,herb@google.com,reed@google.com,mtklein@chromium.org
# 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/
1891993002
bungeman [Thu, 14 Apr 2016 21:57:01 +0000 (14:57 -0700)]
Revert of Fixes for SkRWBuffer (patchset #5 id:80001 of https://codereview.chromium.org/
1871953002/ )
Reason for revert:
Making MSAN and TSAN rather unhappy.
https://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN/builds/1586
https://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN/builds/5922
Original issue's description:
> Fixes for SkRWBuffer
>
> Do not call SkBufferHead::validate in SkROBuffer's destructor, which
> may be called in a separate thread from SkRWBuffer::append. validate()
> reads SkBufferBlock::fUsed, and append() writes to it, resulting in
> a data race.
>
> Update some comments to be more clear about how it is safe to use
> these classes across threads.
>
> Test the readers in separate threads.
>
> In addition, make sure it is safe to create a reader even when no
> data has been appended. Add tests for this case.
>
> Mark a parameter to SkBufferHead::validate() as const, reflecting
> its use.
>
> BUG=chromium:601578
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1871953002
>
> Committed: https://skia.googlesource.com/skia/+/
d06920a29fe11c68bde2b93948ec99f277bb8459
TBR=mtklein@google.com,reed@google.com,scroggo@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:601578
Review URL: https://codereview.chromium.org/
1882853004
mtklein [Thu, 14 Apr 2016 21:07:02 +0000 (14:07 -0700)]
Graduate matrix map-point procs out of SkOpts.
These are implemented generically with Sk4s and don't benefit
from anything fancier than vanilla SSE/NEON.
This means there's no need to hide this code away in another
file or behind a function pointer... it's readable and we have
compile-time support for all the instructions it needs.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1872193002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
Review URL: https://codereview.chromium.org/
1872193002
herb [Thu, 14 Apr 2016 20:58:05 +0000 (13:58 -0700)]
Make sure the color profile propagetes through the system.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1892543002
Review URL: https://codereview.chromium.org/
1892543002
reed [Thu, 14 Apr 2016 20:34:45 +0000 (13:34 -0700)]
add index in getPixels for F16
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1888883003
Review URL: https://codereview.chromium.org/
1888883003
brianosman [Thu, 14 Apr 2016 19:39:00 +0000 (12:39 -0700)]
Several fixes for fp 16 rendering:
With the GPU backend, allow F16 render targets to be created (along with
any other renderable format). We were previously just falling back to 8888.
In SampleApp, if the window configuration is F16, don't render directly
to the primary surface (which is actually sRGB 8888). Intead, make an
off-screen F16 surface, then blit it back to the framebuffer when we're done.
In DM, clamp values outside of [0,1]. These were wrapping, producing very
incorrect images. (Many filters can trigger out-of-range values due to
ringing).
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1890923003
Review URL: https://codereview.chromium.org/
1890923003
mtklein [Thu, 14 Apr 2016 19:27:38 +0000 (12:27 -0700)]
skcpu: sse4.1 floor, f16c f16<->f32
- floor with roundps is about 4.5x faster when available
- f16 srcover_n is similar to but a little faster than the version in https://codereview.chromium.org/
1884683002. This new one fuses the dst load/stores into the f16<->f32 conversions:
+0x180 movups (%r15), %xmm1
+0x184 vcvtph2ps (%rbx), %xmm2
+0x189 movaps %xmm1, %xmm3
+0x18c shufps $255, %xmm3, %xmm3
+0x190 movaps %xmm0, %xmm4
+0x193 subps %xmm3, %xmm4
+0x196 mulps %xmm2, %xmm4
+0x199 addps %xmm1, %xmm4
+0x19c vcvtps2ph $0, %xmm4, (%rbx)
+0x1a2 addq $16, %r15
+0x1a6 addq $8, %rbx
+0x1aa decl %r14d
+0x1ad jne +0x180
If we decide to land this it'd be a good idea to convert most or all users of SkFloatToHalf_01 and SkHalfToFloat_01 over to the pointer-based versions.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1891513002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
Review URL: https://codereview.chromium.org/
1891513002
scroggo [Thu, 14 Apr 2016 18:40:48 +0000 (11:40 -0700)]
Fixes for SkRWBuffer
Do not call SkBufferHead::validate in SkROBuffer's destructor, which
may be called in a separate thread from SkRWBuffer::append. validate()
reads SkBufferBlock::fUsed, and append() writes to it, resulting in
a data race.
Update some comments to be more clear about how it is safe to use
these classes across threads.
Test the readers in separate threads.
In addition, make sure it is safe to create a reader even when no
data has been appended. Add tests for this case.
Mark a parameter to SkBufferHead::validate() as const, reflecting
its use.
BUG=chromium:601578
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1871953002
Review URL: https://codereview.chromium.org/
1871953002
herb [Thu, 14 Apr 2016 18:16:44 +0000 (11:16 -0700)]
Add F16 source to the linear pipelin.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1882893003
Review URL: https://codereview.chromium.org/
1882893003
bungeman [Thu, 14 Apr 2016 17:25:01 +0000 (10:25 -0700)]
Explain Rietveld patching better on site.
State which values should be updated and how to determine them.
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=
1883213002
Review URL: https://codereview.chromium.org/
1883213002
bungeman [Thu, 14 Apr 2016 16:44:34 +0000 (09:44 -0700)]
Put SkEmptyTypeface in anonymous namespace.
We ended up with two SkEmptyTypefaces it differnt places. Avoid this odr
violation by sticking these in anonymous namespaces.
Review URL: https://codereview.chromium.org/
1887093002
mtklein [Thu, 14 Apr 2016 16:42:34 +0000 (09:42 -0700)]
mojo -> nojo
BUG=skia:4891
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1889543003
Review URL: https://codereview.chromium.org/
1889543003
bungeman [Thu, 14 Apr 2016 16:23:41 +0000 (09:23 -0700)]
Add doc instructions for multi-repo Chromium trybots.
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=
1865153003
Review URL: https://codereview.chromium.org/
1865153003
mtklein [Thu, 14 Apr 2016 16:03:35 +0000 (09:03 -0700)]
Move CPU feature detection to its own file.
- Moves CPU feature detection to its own file.
- Cleans up some redundant feature detection scattered around core/ and opts/.
- Can now detect a few new CPU features:
* F16C -> Intel f16<->f32 instructions, added between AVX and AVX2
* FMA -> Intel FMA instructions, added at the same time as AVX2
* VFP_FP16 -> ARM f16<->f32 instructions, quite common
* NEON_FMA -> ARM FMA instructions, also quite common
* SSE and SSE3... why not?
This new internal API makes it very cheap to do fine-grained runtime CPU
feature detection. Redundant calls to SkCpu::Supports() should be eliminated
and it's hoistable out of loops. It compiles away entirely when we have the
appropriate instructions available at compile time.
This means we can call it to guard even a little snippet of 1 or 2 instructions
right where needed and let inlining hoist the check (if any at all) up to
somewhere that doesn't hurt performance. I've explained how I made this work
in the private section of the new header.
Once this lands and bakes a bit, I'll start following up with CLs to use it more
and to add a bunch of those little 1-2 instruction snippets we've been wanting,
e.g. cvtps2ph, cvtph2ps, ptest, pmulld, pmovzxbd, blendvps, pshufb, roundps
(for floor) on x86, and vcvt.f32.f16, vcvt.f16.f32 on ARM.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1890483002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
Review URL: https://codereview.chromium.org/
1890483002
reed [Thu, 14 Apr 2016 16:02:14 +0000 (09:02 -0700)]
remove U16 support, just support F16
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1889753002
Review URL: https://codereview.chromium.org/
1889753002
bungeman [Thu, 14 Apr 2016 15:04:45 +0000 (08:04 -0700)]
Remove requestedStyle from SkTypefaceCache.
The typeface cache contains typefaces which can be compared against to
determine if an already known typeface will work instead of creating a
new typeface id. This is primarily for sharing scaler contexts. How that
typeface was requested is not relevant to this comparison, so don't cache
it. Request caching must be handled separately.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1879423002
Review URL: https://codereview.chromium.org/
1879423002
robertphillips [Thu, 14 Apr 2016 14:54:04 +0000 (07:54 -0700)]
Switch SkMagnifierImageFilter over to new onFilterImage interface
Additionally, this CL:
adds crop handling to the CPU path (the GPU path handled it but with a bug)
adds a cropRect (to better justify the applyCropRect)
adds a GM to exercise the cropRect
Note: I believe the handling of cropRects and clipping is deeply flawed but, at least, the two paths are consistently flawed now.
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1882943002
Review URL: https://codereview.chromium.org/
1882943002
yujieqin [Thu, 14 Apr 2016 14:04:00 +0000 (07:04 -0700)]
Since PIEX can now return an uncompressed RGB thumbnail, check the type of the image before treating it as a JPEG.
Highlights of new PIEX:
* PIEX can now return JPEG compressed image or uncompressed RGB image
* Add IsOfType() and GEtNumberofBytesForIsOfType() to image_type_recognition_lite
* Add GetDngInformation() and GetOrientation() to piex
* Remove deprecated data entries from piex_types
BUG=b/
27214608, b/
28119810
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1883783002
Review URL: https://codereview.chromium.org/
1883783002
brianosman [Thu, 14 Apr 2016 13:02:59 +0000 (06:02 -0700)]
Simplify gamma-correctness for text rendering.
Just use the DC flag, independent of the destination pixel config or the
special output override flag (which is only to be used internally be
special effects that will never hit this code path.)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1888473003
Review URL: https://codereview.chromium.org/
1888473003
benjaminwagner [Thu, 14 Apr 2016 00:51:57 +0000 (17:51 -0700)]
For GOOGLE3, add deref method to SkRefCnt.
This makes it easier to integrate with Blink code using RefPtr/PassRefPtr without pulling in Chrome's SkUserConfig.h.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1890573003
Review URL: https://codereview.chromium.org/
1890573003
bsalomon [Wed, 13 Apr 2016 22:10:20 +0000 (15:10 -0700)]
Fix legacy NewRenderTarget factory
TBR=robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1888593002
Review URL: https://codereview.chromium.org/
1888593002
bsalomon [Wed, 13 Apr 2016 22:03:59 +0000 (15:03 -0700)]
Only eglTerminate command buffer displays when no displays are in use
This is a workaround for crbug.com/603223
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1878943008
Review URL: https://codereview.chromium.org/
1878943008