bungeman
11a77c6e06
Begin switch to SkFontStyle for legacy calls.
...
This adds SK_VERY_LEGACY_CREATE_TYPEFACE which, when defined, provides
only the old interface.
Ideally, everyone would switch directly to SkFontMgr and use one of the
newer calls, but there is currently no path for current users to get
there. This updates all the internals to use SkFontStyle, after
switching these over the higher level APIs can be switched.
The Chromium follow on patch can be seen at https://crrev.com/1877673002
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1873923002
TBR=reed
This doesn't really change API, just modernizes it.
Review URL: https://codereview.chromium.org/1873923002
2016-04-12 13:45:06 -07:00
brianosman
0586f5cc97
sRGB support for distance field text.
...
Add a second distance field adjust table that only applies contrast,
not fake-gamma correction. Store a flag in the batch at creation time,
using the same logic we apply elsewhere (render target format, plus
paint flags).
That gets us close, but not as good as bitmap text. The final step is
to use a linear step function (rather than smoothstep) to map distance
to coverage, when we have sRGB output. Smoothstep's nonlinear response
is actually doing some fake-gamma, so it ends up over-correcting when
the output is already gamma-correct.
Results are now very close between L32 (old table, smoothstep) and S32
(contrast-only table, linstep).
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1885613002
Review URL: https://codereview.chromium.org/1885613002
2016-04-12 12:48:21 -07:00
robertphillips
134ff5c9cf
Remove SimpleOffsetFilter
...
SimpleOffsetFilter & SkOffsetImageFilter seem equivalent nowadays.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1884733002
Review URL: https://codereview.chromium.org/1884733002
2016-04-12 12:41:00 -07:00
robertphillips
247e5341a4
Revert AlphaThresholdFilter to its old behavior wrt premul
...
TBR=borenet@google.com
This fixes the "serialize-8888 gm imagealphathreshold_surface" failure related to:
https://codereview.chromium.org/1879643003/ (Switch AlphaThresholdFilter over to new onFilterImage interface)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1885633003
Review URL: https://codereview.chromium.org/1885633003
2016-04-12 12:39:26 -07:00
kjlubick
9fd07e5cc4
Make fuzz builds set SK_FUZZ_LOGGING
...
BUG=skia:5191
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1878363002
Review URL: https://codereview.chromium.org/1878363002
2016-04-12 12:02:59 -07:00
robertphillips
af9b8c8046
Switch AlphaThresholdFilter over to new onFilterImage interface
...
This CL also alters the raster path in two ways:
it now respects the sRGB/linear distinction of its input
it now respects the clip
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1879643003
Review URL: https://codereview.chromium.org/1879643003
2016-04-12 11:02:25 -07:00
reed
0a74c9d86c
f16 and pm4f are always the same swizzle, so remove adaptor
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1880953003
Review URL: https://codereview.chromium.org/1880953003
2016-04-12 10:32:56 -07:00
bsalomon
68d9134bec
Make more unit tests run on Vulkan
...
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1885623002
Review URL: https://codereview.chromium.org/1885623002
2016-04-12 09:59:58 -07:00
borenet
71e185c060
GYP_DEFINES and DM flags for Vulkan bot
...
BUG=skia:5186
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1885563002
Review URL: https://codereview.chromium.org/1885563002
2016-04-12 08:13:57 -07:00
bsalomon
134af6b6d2
Fix Vk build breakage due to new GrSLType
...
R=egdaniel@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1881033002
Review URL: https://codereview.chromium.org/1881033002
2016-04-12 07:46:21 -07:00
scroggo
b8e0960de4
Make is_ktx safer
...
Rather than assuming the data passed to ktx at least
KTX_FILE_IDENTIFIER_SIZE, pass the length of the data to is_ktx and
compare it.
Splitting off from crrev.com/1862133002, which no longer depends on
is_ktx.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1882593002
Review URL: https://codereview.chromium.org/1882593002
2016-04-12 07:41:22 -07:00
egdaniel
37798fbd82
Implement initCopySurfaceDstDesc for Vulkan
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1880613002
Review URL: https://codereview.chromium.org/1880613002
2016-04-12 07:31:49 -07:00
reed
a9322c2d86
Revert "Revert of Pass effects directly to fontcache (patchset #8 id:140001 of https://codereview.chromium.org/1863013003/ )"
...
add SK_SUPPORT_NEW_ONCREATESCALERCONTEXT for chrome
this has now landed https://codereview.chromium.org/1878913002/
TBR=
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1880873002
Review URL: https://codereview.chromium.org/1880873002
2016-04-12 06:47:05 -07:00
borenet
ac8681b0a1
iOS: Tweak xcodebuild location
...
BUG=skia:5155
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1879513002
Review URL: https://codereview.chromium.org/1879513002
2016-04-12 06:21:47 -07:00
halcanary
cbc060a700
SkWStream::writeText inlined.
...
Motivation: This function is used throughout SkPDF.
Note that the compiler can usually inline the result of strlen() for literal strings.
Before:
out/Release/nanobench -m WStreamWriteText -q
Timer overhead: 24.2ns
! -> high variance, ? -> moderate variance
micros bench
6.10 WStreamWriteText nonrendering
After:
out/Release/nanobench -m WStreamWriteText -q
Timer overhead: 23.9ns
! -> high variance, ? -> moderate variance
micros bench
2.51 WStreamWriteText nonrendering
PDF runtime change: -0.8% ±0.04%.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1844343004
Review URL: https://codereview.chromium.org/1844343004
2016-04-11 19:41:48 -07:00
cdalton
74b8d32332
Implement texel buffers
...
Adds a mechanism for processors to add buffer accesses and implements
them in the GL backend.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1870893002
Review URL: https://codereview.chromium.org/1870893002
2016-04-11 14:47:28 -07:00
bsalomon
fda880710c
Convert some unit tests from running on GL contexts to running on all contexts
...
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1873313002
Review URL: https://codereview.chromium.org/1873313002
2016-04-11 14:40:50 -07:00
bsalomon
dc0fcd41e7
Vulkan config in dm
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1872283003
Review URL: https://codereview.chromium.org/1872283003
2016-04-11 14:21:33 -07:00
iroth
849b175c02
Separate private headers for condition inclusion in BUILD file.
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1878753002
Review URL: https://codereview.chromium.org/1878753002
2016-04-11 13:45:51 -07:00
egdaniel
f4ace41dd9
Wait for all device work to finish before destroy VkDevice
...
Currently before destroying the GrVkGpu, we do wait on all queue work to finish before destroying objects there.
Since we only have one queue, the vkDeviceWaitIdle added here is probably not necessary, but the spec does suggest
having it just to make sure all work is fully done on the device.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1876863004
Review URL: https://codereview.chromium.org/1876863004
2016-04-11 13:41:52 -07:00
robertphillips
c14b978613
Switch SkTileImageFilter over to new onFilterImage interface
...
This relies on: https://codereview.chromium.org/1816223002 (Update SkSpecialImage to be able to create tight SkImages and SkSurfaces)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1810693003
Review URL: https://codereview.chromium.org/1810693003
2016-04-11 13:26:14 -07:00
mtklein
ad6a1901d1
nullptr -> "sans-serif" fixes bold in gm/colorwheel
...
This was an odd case where 8888 drew wrong and serialize-8888 was correct.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1880653002
Review URL: https://codereview.chromium.org/1880653002
2016-04-11 13:20:11 -07:00
cdalton
f8a6ce8d8c
Add GLSL support for texelFetch
...
Adds a cap and builder methods for texelFetch. This is required for
texel buffers. Also moves the texel buffer cap into the general shader
caps, and adds glTexBufferRange to the GL interface.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1869063005
Review URL: https://codereview.chromium.org/1869063005
2016-04-11 13:02:05 -07:00
cdalton
3f6f76f98b
Rename EmitArgs::fSamplers to fTexSamplers
...
Renames fSamplers to fTexSamplers in GrProcessor EmitArgs, and renames
GrGLSLTextureSampler to GrGLSLSampler. This will allow us to add a
second array of buffer samplers.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1862373003
Review URL: https://codereview.chromium.org/1862373003
2016-04-11 12:18:09 -07:00
cdalton
a6b92ad1f7
Infer sampler precision from pixel config
...
Adds a "samplerPrecision" method to GrGLSLCaps and updates
GrGLSLProgramBuilder to infer a sampler's precision based on its
config and visibility.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1846963004
Review URL: https://codereview.chromium.org/1846963004
2016-04-11 12:03:08 -07:00
senorblanco
21a465d7f4
Ensure all image filter tests have "ImageFilter" somewhere in the name.
...
This is for convenience, so that running
out/Release/dm --match ImageFilter runs them all.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1879553004
Review URL: https://codereview.chromium.org/1879553004
2016-04-11 11:58:39 -07:00
cdalton
1f50acff0d
Add appendPrecisionModifier method to GrGLSLShaderBuilder
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1881513002
Review URL: https://codereview.chromium.org/1881513002
2016-04-11 11:30:50 -07:00
robertphillips
fef28606d2
Switch SkPictureImageFilter over to new onFilterImage interface
...
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1779743002
TBR=bsalomon@google.com
Review URL: https://codereview.chromium.org/1779743002
2016-04-11 11:08:53 -07:00
borenet
25e0a0416e
Revert of Pass effects directly to fontcache (patchset #8 id:140001 of https://codereview.chromium.org/1863013003/ )
...
Reason for revert:
Seems to have broken the DEPS roll.
Original issue's description:
> Pass effects directly to fontcache
>
> BUG=skia:5176
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1863013003
>
> Committed: https://skia.googlesource.com/skia/+/c79172857c3f69cc46837e1beeae0c1ead377bb2
TBR=djsollen@google.com ,bungeman@google.com,mtklein@google.com,fmalita@chromium.org,msarett@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:5176
Review URL: https://codereview.chromium.org/1872253004
2016-04-11 10:25:28 -07:00
robertphillips
29feef80de
Force upload to VRAM in filterImage
...
This forces the conversion of image filter result to VRAM (if it is required) prior to the filtered result being put into the ImageFilter cache.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1874763002
Review URL: https://codereview.chromium.org/1874763002
2016-04-11 10:20:24 -07:00
borenet
48b88cc1f6
Fixes for CommandBuffer bot
...
BUG=skia:4957
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1877883002
Review URL: https://codereview.chromium.org/1877883002
2016-04-11 10:16:01 -07:00
egdaniel
2a0bb0a665
Fix to zoom on Vulkan Viewer
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1876853003
Review URL: https://codereview.chromium.org/1876853003
2016-04-11 08:30:40 -07:00
reed
c79172857c
Pass effects directly to fontcache
...
BUG=skia:5176
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1863013003
Review URL: https://codereview.chromium.org/1863013003
2016-04-11 07:51:07 -07:00
reed
6dc14aab5e
adjust gm bounds for better content fit
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1876753003
TBR=djsollen
Review URL: https://codereview.chromium.org/1876753003
2016-04-11 07:46:38 -07:00
robertphillips
e6277de4eb
Switch SkDisplacementImageFilter 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=1846313002
Review URL: https://codereview.chromium.org/1846313002
2016-04-11 07:23:34 -07:00
robertphillips
82b043e873
Fix roll bot's win gn build
...
TBR=borenet@google.com ,bsalomon@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1873063002
Review URL: https://codereview.chromium.org/1873063002
2016-04-10 14:04:19 -07:00
mtklein
d58f840650
arithmetic mode with Sk4f
...
After reading the SSE version, I figured I'd show off the new hotness a little. This'll get us SSE, NEON and portable implementations all in one easy to read package.
Since we've been talking about it, it's worth noting the several ways this implementation is still not constant time:
- short circuits on 0x00 and 0xff coverage;
- floating point multiplication with untrusted k1-k4; if someone figures out a clever way to sometimes create denorm floats and sometimes not, there's a gigantic performance difference.
I would hazard the pin is constant time now though.
I've also fixed the lerp to lerp between dst and r instead of src and r. That can't have been right.
curr/maxrss loops min median mean max stddev samples config bench
9/9 MB 1 25.5ms 25.5ms 25.5ms 25.5ms 0% ▃▁▁▃▂▇▅▆▇█ 8888 Xfermode_arithmetic_enforce_pm_aa
9/9 MB 1 24.1ms 24.2ms 24.2ms 24.3ms 0% ▄▃▁▄█▆▆█▃█ 8888 Xfermode_arithmetic_aa
9/9 MB 1 102ms 102ms 102ms 103ms 0% ▁▅▂▆▂█▂█▁▂ 8888 Xfermode_arithmetic_enforce_pm
9/9 MB 1 94.8ms 95.4ms 95.2ms 95.8ms 0% ▅▅▁▁▁▁▄▇█▇ 8888 Xfermode_arithmetic
~~~~>
curr/maxrss loops min median mean max stddev samples config bench
9/9 MB 1 9.71ms 9.74ms 9.73ms 9.78ms 0% █▅▄▄▁▂▂▂▄▄ 8888 Xfermode_arithmetic_enforce_pm_aa
9/9 MB 1 9.5ms 9.57ms 9.58ms 9.7ms 1% ▂▁█▅▂▂▆▃▄▄ 8888 Xfermode_arithmetic_aa
9/9 MB 1 21.8ms 21.8ms 21.8ms 21.9ms 0% █▂▂▂▂▂▂▁▄▂ 8888 Xfermode_arithmetic_enforce_pm
9/9 MB 1 16.5ms 16.6ms 16.6ms 16.6ms 0% ▃█▁▁▄▄▁▁▆▅ 8888 Xfermode_arithmetic
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1873963003
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
Review URL: https://codereview.chromium.org/1873963003
2016-04-10 06:23:28 -07:00
update-skps
af79b2dd93
Update SKP version
...
Automatic commit by the RecreateSKPs bot.
TBR=
NO_MERGE_BUILDS
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1873033002
Review URL: https://codereview.chromium.org/1873033002
2016-04-10 00:30:13 -07:00
reed
9d77d62c0c
remove unused BML (binary xml) code
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1868423002
TBR=
Review URL: https://codereview.chromium.org/1868423002
2016-04-09 11:09:49 -07:00
robertphillips
12fa47d33f
Update LightingImageFilter to sk_sp
...
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1869763002
Review URL: https://codereview.chromium.org/1869763002
2016-04-08 16:28:09 -07:00
Melnikov.Sergey.V
601e36a5c5
Add AVX/AVX2 support for runtime check
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1867193002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
Review URL: https://codereview.chromium.org/1867193002
2016-04-08 15:31:45 -07:00
robertphillips
e6356546d8
Fix memory leak in SkBlurImageFilter
...
TBR=caryclark@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1873923003
Review URL: https://codereview.chromium.org/1873923003
2016-04-08 14:52:52 -07:00
senorblanco
7adf9c1dd2
Add some benches for SkArithmeticMode.
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1868333002
Review URL: https://codereview.chromium.org/1868333002
2016-04-08 14:29:47 -07:00
herb
42da45d399
Fix context size for benchmakr.
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1871173002
Review URL: https://codereview.chromium.org/1871173002
2016-04-08 14:24:37 -07:00
robertphillips
ff3681156c
Add SkFUZZF to help whitelist imagefilter fuzz failures
...
The current use case for this is whitelisting MergeImageFilter failures when the number of inputs is too big. Presumably there will be other whitelisting use cases as we progress.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1873463002
Review URL: https://codereview.chromium.org/1873463002
2016-04-08 14:03:06 -07:00
robertphillips
23d2c18cb1
Fix scaledstrokes GM
...
Small fix to https://codereview.chromium.org/1873733003 (More cleanup in the Vulkan viewer)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1875793002
Review URL: https://codereview.chromium.org/1875793002
2016-04-08 14:03:00 -07:00
robertphillips
651bb5fafe
Make some GMs animate
...
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1870133003
Review URL: https://codereview.chromium.org/1870133003
2016-04-08 13:35:14 -07:00
egdaniel
7cbffda6c8
Don't create new descriptor set for vulkan uniforms every draw
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1872553005
Review URL: https://codereview.chromium.org/1872553005
2016-04-08 13:27:53 -07:00
herb
9e0efe57ac
Add clone to Stage. Rename place to mix and PolymorphicUnion to Stage. Cleanup.
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1877483002
Review URL: https://codereview.chromium.org/1877483002
2016-04-08 13:25:28 -07:00
jvanverth
c265a92741
More cleanup in the Vulkan viewer
...
* add animation support for GMs
* don't load all SkPictures at start, only as needed
* don't update constantly, only for animation or stats
* hide/show stats
* scale slides up/down
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1873733003
Review URL: https://codereview.chromium.org/1873733003
2016-04-08 12:51:45 -07:00