Commit Graph

24291 Commits

Author SHA1 Message Date
bsalomon
e2e87f3484 Change implementation of flush-count based GrGpuResource purging
Change default to approx 30seconds (given some API usage assumptions)
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2361093002

Review-Url: https://codereview.chromium.org/2361093002
2016-09-22 12:42:11 -07:00
csmartdalton
5745d795a1 skpbench fixes for linux
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2354273004

Review-Url: https://codereview.chromium.org/2354273004
2016-09-22 12:37:22 -07:00
msarett
cf7b877d62 Add BGRA as input format to SkColorSpaceXform
This is immediately useful for webp and I think it's a fair guess
that BGRA src formats are not uncommon.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2353363008

Review-Url: https://codereview.chromium.org/2353363008
2016-09-22 12:37:04 -07:00
bungeman
5f544345d6 Remove assert that current color is never used.
The COLR table format allows for use of the 'current color'.
Currently the code asserts if this is used, but will use a nearby
luminance grey to this color instead if the assert is ignored.
Remove the assert now that this path is known to be used.

BUG=skia:5788

Review-Url: https://codereview.chromium.org/2359923004
2016-09-22 12:32:07 -07:00
brianosman
d454609f62 Support for color-spaces with multi-stop (texture) gradients
Texture is F16 linear, unless that's not supported. In that
case, we pack down to sRGB.

Added more test patches to the gamut GM with many stops,
to test this case. Now they render correctly.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2343253002

Review-Url: https://codereview.chromium.org/2343253002
2016-09-22 12:31:59 -07:00
mtklein
ecbc526418 GN: build skiaserve
I trimmed the libmicrohttpd sources and defines down to the minimum needed to build and run.  This builds and runs on Linux and Android for me.

Request.h was missing an include for SkTypes.h, which supplies the default for SK_GPU_SUPPORTED if not otherwise defined.

To build on Android, exit() -> _exit().

build.py was unused.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2367513002

NOTREECHECKS=true

Review-Url: https://codereview.chromium.org/2367513002
2016-09-22 11:51:24 -07:00
caryclark
bac104605e Reland of ix for conic fuzz (patchset #1 id:1 of https://codereview.chromium.org/2361473004/ )
Reason for revert:
Landed suppression in Chrome's LayoutTests/TestExpectations

Original issue's description:
> Revert of fix for conic fuzz (patchset #3 id:40001 of https://codereview.chromium.org/2350263003/ )
>
> Reason for revert:
> See if this fixes the layout tests.
>
> Original issue's description:
> > fix for conic fuzz
> >
> > A fuzzer generates a conic that hangs when drawn.
> > The quads that approximate the conics move up and down
> > in y, confusing the renderer.
> >
> > This fix ensures that the split conic maintains the
> > same y direction as the original conic.
> >
> > R=reed@google.com
> > BUG=647922
> > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2350263003
> >
> > Committed: https://skia.googlesource.com/skia/+/ac78863acdef4b428aaf66985b80c76d1be0fdea
>
> TBR=reed@google.com
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=647922
>
> Committed: https://skia.googlesource.com/skia/+/08b345588414b861af8a55950e7dc21a1bd85a28

TBR=reed@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=647922

Review-Url: https://codereview.chromium.org/2359253002
2016-09-22 10:24:59 -07:00
caryclark
08b3455884 Revert of fix for conic fuzz (patchset #3 id:40001 of https://codereview.chromium.org/2350263003/ )
Reason for revert:
See if this fixes the layout tests.

Original issue's description:
> fix for conic fuzz
>
> A fuzzer generates a conic that hangs when drawn.
> The quads that approximate the conics move up and down
> in y, confusing the renderer.
>
> This fix ensures that the split conic maintains the
> same y direction as the original conic.
>
> R=reed@google.com
> BUG=647922
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2350263003
>
> Committed: https://skia.googlesource.com/skia/+/ac78863acdef4b428aaf66985b80c76d1be0fdea

TBR=reed@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=647922

Review-Url: https://codereview.chromium.org/2361473004
2016-09-22 07:42:39 -07:00
brianosman
2a75e5df30 Add output format properties to SkImageFilter::Context
For now, this is just the color space (of the original
requesting device). This is used when constructing
intermediate rendering surfaces, so that we ensure we
land in a surface that's similar/compatible to the
final consumer of the DAG's output.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2357273002

Review-Url: https://codereview.chromium.org/2357273002
2016-09-22 07:15:37 -07:00
msarett
4be0e7cfe0 Make SkColorSpaceXform::New() take bare ptrs
There's no need to take sk_sp if we're not going to
ref the ptr.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2360863003

Review-Url: https://codereview.chromium.org/2360863003
2016-09-22 07:02:24 -07:00
mtklein
90939aa22f Run commandbuffer config on CommandBuffer Perf bots.
Uh, so hey, I just noticed that while the CommandBuffer Test bot runs
with --config commandbuffer, the Perf bot just runs as a vanilla GPU bot.
Shouldn't we pass --config commandbuffer?

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2364483002

CQ_INCLUDE_TRYBOTS=master.client.skia:Perf-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug-CommandBuffer-Trybot

Review-Url: https://codereview.chromium.org/2364483002
2016-09-22 06:50:24 -07:00
mtklein
415a14d039 Clean up dead code.
SkOSEnvironment was used to set --enable-gl-path-rendering, and is now unused.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2365483002

Review-Url: https://codereview.chromium.org/2365483002
2016-09-22 06:01:18 -07:00
cblume
921bc678a7 Is char* or uintptr_t easier to read?
Using a char* instead of uintptr_t allows us to use fewer
reinterpret_casts which may make the code easier to read.

BUG=648512
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2356703002

Review-Url: https://codereview.chromium.org/2356703002
2016-09-22 05:25:26 -07:00
benjaminwagner
02472ddc94 Add recipe support for Intel HD Graphics 530.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2358183002

Review-Url: https://codereview.chromium.org/2358183002
2016-09-22 05:25:12 -07:00
msarett
9340c2685c Do not quickReject until virtual drawPatch
TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2358873003

Review-Url: https://codereview.chromium.org/2358873003
2016-09-22 05:20:21 -07:00
caryclark
e7bb5b2266 fix next kevin fuzz
Fix one more fuzzer crash.

R=kjlubick@google.com
BUG=skia:5775
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2357373002

Review-Url: https://codereview.chromium.org/2357373002
2016-09-22 05:20:07 -07:00
caryclark
ac78863acd fix for conic fuzz
A fuzzer generates a conic that hangs when drawn.
The quads that approximate the conics move up and down
in y, confusing the renderer.

This fix ensures that the split conic maintains the
same y direction as the original conic.

R=reed@google.com
BUG=647922
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2350263003

Review-Url: https://codereview.chromium.org/2350263003
2016-09-22 05:15:15 -07:00
caryclark
d1d628120a speed up debug dm
SkPathMeasure can take minutes with pathological cases.
Limit the debug check to a reasonable number.

R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2356343004

Review-Url: https://codereview.chromium.org/2356343004
2016-09-22 05:15:04 -07:00
csmartdalton
d7a9db6444 Add hardware monitoring to skpbench
Adds a Hardware class with hooks for entering and exiting
"benchmarking" mode (e.g. locking clocks, etc.) as well as periodic
polling of hardware to verify the environment is stable.

Adds a partial implementation for generic Android hardware, but
ultimately we will need to write specific classes tailored to each
unique platform we need to test.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2360473002

Review-Url: https://codereview.chromium.org/2360473002
2016-09-22 05:10:03 -07:00
borenet
50537e46e4 Add Jobs to tasks.json
BUG=skia:5723
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2363443002

Review-Url: https://codereview.chromium.org/2363443002
2016-09-22 05:09:56 -07:00
mtklein
605d952893 GN: take over CommandBuffer bot
As you suspected, I see nothing preventing us from building our side of things unconditionally.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2358173002
NOTREECHECKS=true

Review-Url: https://codereview.chromium.org/2358173002
2016-09-21 14:01:32 -07:00
bsalomon
0e4a466a61 Use sk_careful_memcpy when writing optional conic weights for GrShape path data key.
TBR=robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2359933002

NO_DEPENDENCY_CHECKS=true

Review-Url: https://codereview.chromium.org/2359933002
2016-09-21 11:23:46 -07:00
bsalomon
39ef7fb885 Add optional sw generated path coverage mask caching
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2335343008

All the bots except the painfully slow windows compiler have finished so,
NOTRY=true

Review-Url: https://codereview.chromium.org/2335343008
2016-09-21 11:16:05 -07:00
reed
669983856d allow clip calls w/o op param, remove unnecessary kReplace ops
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2357333002

Review-Url: https://codereview.chromium.org/2357333002
2016-09-21 11:15:07 -07:00
robertphillips
df55827ae6 Remove unused SkImage_Base and SkImage_Gpu onNewSurface methods
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2353403002

Review-Url: https://codereview.chromium.org/2353403002
2016-09-21 11:00:23 -07:00
bsalomon
2eda5b3a65 Conditionally insert gl_PointSize into shaders.
BUG=chromium:648816
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2358843002

Review-Url: https://codereview.chromium.org/2358843002
2016-09-21 10:53:24 -07:00
jvanverth
7d05f32a1d Always use transfer_dst for buffers.
This will allow Adreno to use non-coherent buffers.

BUG=skia:5034
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2361473002

Review-Url: https://codereview.chromium.org/2361473002
2016-09-21 10:20:23 -07:00
mtklein
38925aa37c Build tools on NoGPU bots.
I was just lazy disabling this before.  It turns out to not be difficult.

This gets us slightly better testing out of the NoGPU bot, as we now know
not only that Skia compiles, but also that DM and nanobench can link (and
thus that Skia's got enough compiled in it to be a coherent library).

skpbench requires GPU support.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2356283002

Review-Url: https://codereview.chromium.org/2356283002
2016-09-21 10:11:25 -07:00
brianosman
04a44d0fd4 Add a transient image filter cache to SkImage::makeWithFilter & PDF
Added a bench for makeWithFilter (~23 ms -> ~6 ms median locally).

Also fixed indentation.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2360663002

Review-Url: https://codereview.chromium.org/2360663002
2016-09-21 09:46:57 -07:00
mtklein
3e8012e74f GN: is_skia_standalone
is_skia_standalone will be defined and set to true iff we're using our
standalone BUILDCONFIG.gn.  Any other build (Fuchsia, Chrome, Pdfium)
will have their own BUILDCONFIG.gn, which presumably does not define
is_skia_standalone.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2357963002

Review-Url: https://codereview.chromium.org/2357963002
2016-09-21 09:14:19 -07:00
caryclark
45f04b8ea8 fix skia pathops fuzzers
Add isolated tests.

R=kjlubick@google.com
BUG=skia:5775
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2358043002

Review-Url: https://codereview.chromium.org/2358043002
2016-09-21 08:46:56 -07:00
bsalomon
67fa4e31d8 Make GrShape compute keys for short paths from path data instead of using the gen id.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2357643002

Review-Url: https://codereview.chromium.org/2357643002
2016-09-21 08:26:57 -07:00
bsalomon
8eb43e5f63 Stop closing filled paths in GrShape
This can force a copy of the path data and isn't really being taken advantage of. It complicates a forthcoming change to key small paths based on their data rather than gen id.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2355833002

Committed: https://skia.googlesource.com/skia/+/ad001fdc77b2dfe32c1723cb58636728dfb776d8
Review-Url: https://codereview.chromium.org/2355833002
2016-09-21 07:47:34 -07:00
egdaniel
e4a9bd79c6 Add define of SK_ENABLE_VK_LAYERS to gn build
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2357953002

Review-Url: https://codereview.chromium.org/2357953002
2016-09-21 07:36:14 -07:00
liyuqian
71477bdfb0 Add setBounds to SkLiteDL for Android
The RootRenderNode in Android is changing bounds dynamically. This is a
temporary fix to accomodate that behaviour. (See also b/31304115)

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2358793002

Review-Url: https://codereview.chromium.org/2358793002
2016-09-21 07:11:08 -07:00
sdefresne
67ba29ce84 Fix memory leaks reported by clang static analyzer.
The CFURLCopyFileSystemPath & CFURLCopyFileSystemPath methods
respect the "Create Rule" [1] regarding the ownership of the
returned reference. This means that the objects need to be
deallocated explicitly by calling CFRelease.

[1]: https://developer.apple.com/library/content/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html#//apple_ref/doc/uid/20001148-103029

BUG=648210
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2360573002

Review-Url: https://codereview.chromium.org/2360573002
2016-09-21 06:51:33 -07:00
brianosman
2695eaa41f Fix some GPU image filter code to preserve precision and color space
On the pure-GPU path, we just have an SkSpecialImage (that's definitely
texture backed), and we need a renderable config for the draw context we
make. Added a helper function to pick - this is basically the high
precision analog of what we were doing before (always using 8888).

The assert that I added catches many other problems in image filter code,
but those fixes are coming in subsequent CLs.

12 GMs render correctly (or more correctly) in gpusrgb and gpuf16
configs. In most cases, they were drawing previously nothing.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2359443003

Review-Url: https://codereview.chromium.org/2359443003
2016-09-21 06:45:09 -07:00
bungeman
4d450d24f5 Remove SK_ADDING_src_ports_SkFontConfigInterface_cpp
This flag is no longer defined anywhere, so remove it and the code it
was guarding.

TBR=reed
This is just removing dead transitional code.

Review-Url: https://codereview.chromium.org/2352163002
2016-09-20 15:46:36 -07:00
fmalita
bef51c23c3 [SVGDom] Opacity optimization
Apply opacity as fill/stroke paint alpha instead of saveLayer, when
possible.

R=robertphillips@google.com,stephana@google.com,reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2353503005

Committed: https://skia.googlesource.com/skia/+/3dbb7b9f196d793fbd16243157ee67638891f5dc
Review-Url: https://codereview.chromium.org/2353503005
2016-09-20 15:45:57 -07:00
mtklein
768dc8f496 Blacklist serialize-8888 typefacerendering_pfaMac
BUG=skia:5778
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2356753003

TBR=halcanary@google.com
NOTREECHECKS=true
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug-GN-Trybot

Review-Url: https://codereview.chromium.org/2356753003
2016-09-20 15:41:29 -07:00
mtklein
e9fb3d553c GN: fold :vulkan into :gpu.
Obviously, :vulkan can't be used without :gpu, but more subtly,
:gpu needs to see SK_VULKAN defined if we're using Vulkan.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2352923003
NOTREECHECKS=true

Review-Url: https://codereview.chromium.org/2352923003
2016-09-20 15:11:46 -07:00
fmalita
e918417dc3 Revert of Stop closing filled paths in GrShape (patchset #1 id:1 of https://codereview.chromium.org/2355833002/ )
Reason for revert:
Triggers msaa16 asserts: https://build.chromium.org/p/client.skia/builders/Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug/builds/4236/steps/test_skia%20on%20Windows/logs/stdio

c:\b\work\skia\src\gpu\grmesh.h:76: fatal error: "assert(indexCount)"

Caught exception 2147483651 EXCEPTION_BREAKPOINT, was running:
	msaa16 svg  cartman.svg
Likely culprit:
	msaa16 svg  cartman.svg

Original issue's description:
> Stop closing filled paths in GrShape
>
> This can force a copy of the path data and isn't really being taken advantage of. It complicates a forthcoming change to key small paths based on their data rather than gen id.
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2355833002
>
> Committed: https://skia.googlesource.com/skia/+/ad001fdc77b2dfe32c1723cb58636728dfb776d8

TBR=robertphillips@google.com,bsalomon@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/2357713002
2016-09-20 14:06:57 -07:00
borenet
a5344ee50a Revert of [SVGDom] Opacity optimization (patchset #4 id:60001 of https://codereview.chromium.org/2353503005/ )
Reason for revert:
Failing assertion

Original issue's description:
> [SVGDom] Opacity optimization
>
> Apply opacity as fill/stroke paint alpha instead of saveLayer, when
> possible.
>
> R=robertphillips@google.com,stephana@google.com,reed@google.com
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2353503005
>
> Committed: https://skia.googlesource.com/skia/+/3dbb7b9f196d793fbd16243157ee67638891f5dc

TBR=reed@google.com,robertphillips@google.com,stephana@google.com,fmalita@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2359603002
2016-09-20 13:39:46 -07:00
mtklein
a627b5c3b9 GN: add skia_use_mesa for OSMesa in tools.
I tested by running
  $ out/dm --src gm --config mesa
  $ out/nanobench --config mesa --match Xfermode
... but I ran out of patience waiting for nanobench to finish.  Probably works.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2357703002

Review-Url: https://codereview.chromium.org/2357703002
2016-09-20 13:36:47 -07:00
borenet
c549212cb3 Attempt to fix nanobench upload
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2356813003

Review-Url: https://codereview.chromium.org/2356813003
2016-09-20 13:32:38 -07:00
stani
89e6af69b2 Revert of Clear stencil buffer before using it for drawing (patchset #2 id:20001 of https://codereview.chromium.org/2342873004/ )
Reason for revert:
performance regression in Android macrobench tests

Original issue's description:
> Clear stencil buffer before using it for drawing
>
> Clear stencil buffer before using it for drawing. This is
> resolving an issue with a failing android CTS test in drawArc.
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2342873004
>
> Committed: https://skia.googlesource.com/skia/+/c326a383e1069497884905f9dd3e720e17d8fcb5

TBR=bsalomon@google.com,reed@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.

Review-Url: https://codereview.chromium.org/2355923002
2016-09-20 13:24:49 -07:00
jvanverth
65b8cb05a7 Fix VkWrapTests
BUG=skia:
TBR=bsalomon@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2352173002

Review-Url: https://codereview.chromium.org/2352173002
2016-09-20 13:18:00 -07:00
halcanary
4ecf0d4843 GM: add test for type1 font
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2350453002

Review-Url: https://codereview.chromium.org/2350453002
2016-09-20 13:11:01 -07:00
egdaniel
7517e45e78 Disable framebuffer fetch on the Adreno5xx devices.
This should help with some of the rendering bugs currently in GL for the
S7.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2348293004

Review-Url: https://codereview.chromium.org/2348293004
2016-09-20 13:00:26 -07:00
egdaniel
d5797b3059 Fix possible divide by zero in vulkan granularity adjustments
This should fix the divide by zero crash on the nexus player bots

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2358613002

Review-Url: https://codereview.chromium.org/2358613002
2016-09-20 12:57:45 -07:00