Commit Graph

19983 Commits

Author SHA1 Message Date
jvanverth
6b237b420b Re-enable WritePixels test for iOS
BUG=skia:2733
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1537793002

Review URL: https://codereview.chromium.org/1537793002
2015-12-17 14:17:30 -08:00
fmalita
a379da41b7 SkMatrix::preScale() is too conservative
SkMatrix::preScale() always sets the kScale bit, which means something
like

  m = SkMatrix::MakeScale(2, 2);
  m.preScale(0.5, 0.5);

leaves m.getType() == kScale_Mask, and can throw off the bitmap proc
heuristics.

We could detect the inverse case and clear the scale bit instead.

R=reed@google.com,caryclark@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1531323002

Review URL: https://codereview.chromium.org/1531323002
2015-12-17 14:12:30 -08:00
xidachen
f5d1f8dcc8 Create a hash table from id<-->key in SkImageFilter::CacheImpl
There is memory leak in the SkImageFilter::Cache. There are two sources
of memory leak:
1. The cache filling up quickly.
2. A slow small leak that never stops.
This CL solves the first issue, which prevents the cache filling up quickly.
This CL creates a new hash table that index the
SkImageFilter::uniqueID to an array of keys, and with the existing
key<-->Value hash table, we can have SkImageFilters proactively
purge content derived cached content when destroyed.

BUG=489543
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1514893003

Review URL: https://codereview.chromium.org/1514893003
2015-12-17 14:12:23 -08:00
robertphillips
e80eb928ba Add default ctor to SkMask
The minimal fix here seems to be handling BoxBlur's return value in SkBlurMaskFilter.cpp::GrRRectBlurEffect::Create. We seem to do enough special handling of the fImage field though that always initialializing it may not be a bad idea.

BUG=570232
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1539553002

Review URL: https://codereview.chromium.org/1539553002
2015-12-17 11:33:12 -08:00
cdalton
1250944aaa Fixup GL instanced rendering commands
We've ended up with a flag in both GrCaps and GrGLCaps to indicate
the same instanced rendering functionality. This change removes the
GrGLCaps version of the flag and also also fixes the interface assembler
to use the proper suffix when loading the EXT version of the extension.

BUG=skia:

Review URL: https://codereview.chromium.org/1537483002
2015-12-17 11:11:40 -08:00
ethannicholas
3819d2d767 Added concave paths to aaxfermodes GM
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1534823004

Review URL: https://codereview.chromium.org/1534823004
2015-12-17 10:58:28 -08:00
mtklein
f6d8d28883 update CMake and Google3 builds for AVX/AVX2
The _avx.cpp code was working in a degraded (SSE2/SSSE3) mode silently.
This CL will make the _avx.cpp code start using AVX.

There is currently no _avx2.cpp code, but I'm writing some now,
and this change will make it work properly from the start.

Chrome and Android builds should already be okay.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1535443003
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac10.9-Clang-x86_64-Release-CMake-Trybot

Review URL: https://codereview.chromium.org/1535443003
2015-12-17 10:18:04 -08:00
bsalomon
62a627be6a Move the GrGLGpu config stencil format index into ConfigTable
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1526253007

Review URL: https://codereview.chromium.org/1526253007
2015-12-17 09:50:47 -08:00
rmistry
3922cef805 Add 2 new SKPS to the buildbot repository
BUG=skia:4713
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1534483004
NOTRY=true

Review URL: https://codereview.chromium.org/1534483004
2015-12-17 09:40:30 -08:00
jvanverth
2ef610858a Don't allow BGRA rendertargets on iOS w/ES 3.0+.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1531283002

Review URL: https://codereview.chromium.org/1531283002
2015-12-17 09:07:32 -08:00
fs
c91065d028 Use the unswapped end point y for early out case in winding_line
The x-coordinates are not swapped, so using the swapped y will result
in a comparison with the wrong (end) point.

BUG=skia:4265
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1533873002

Review URL: https://codereview.chromium.org/1533873002
2015-12-17 09:03:28 -08:00
bsalomon
f0795ab1f2 Fix thread-unsafe construction of GrUniqueKey in GR_DEFINE_STATIC_UNIQUE_KEY
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1530313002

Review URL: https://codereview.chromium.org/1530313002
2015-12-17 08:15:47 -08:00
senorblanco
c834ab178e Fix gaussian blur for small sigma.
I broke this in https://skia.googlesource.com/skia/+/c57e0ded7d535523cfc6bf07c78e5f3479bb8c42.
That change added support for cropping during blur, but
did not do the correct thing for the small-sigma 2D matrix convolution
optimization when blurring from small-to-large textures.

The fix is pass the correct dstRect and srcOffset to convolve_gaussian_2d.
I also changed convolve_gaussian_1d() and convolve_gaussian_2d() to take
the original (non-negated) srcOffset, and to negate them when constructing
the local matrix.

Test: added a new (blur 0.3 0.3) column to imagefilterscropexpand, so that
GM will have to be rebaselined.

BUG=skia:4719,569883
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1529313003

Review URL: https://codereview.chromium.org/1529313003
2015-12-17 08:10:17 -08:00
reed
70509762c8 check bounds of each cubic segment against clip
Timing against complex svg image (map),
no tiling: no change or very slightly faster
tiling (4x4): went from 3x slower (than untiled) to 2x slower

no gold changes expected

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1532733002

Review URL: https://codereview.chromium.org/1532733002
2015-12-17 07:55:39 -08:00
reed
96205ddedc remove obsolete ondrawsprite base virtual
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1529283003

TBR=

Review URL: https://codereview.chromium.org/1529283003
2015-12-16 14:25:30 -08:00
scroggo
c8f969309c Revert of Add test for previously unflattenables (patchset #1 id:1 of https://codereview.chromium.org/1514373003/ )
Reason for revert:
Speculative fix for skbug.com/4709

Original issue's description:
> Add test for previously unflattenables
>
> BUG=skia:4613
>
> Committed: https://skia.googlesource.com/skia/+/061aaa79f7d8a2e93962e8296abaae13f0a7a715

TBR=halcanary@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4613

Review URL: https://codereview.chromium.org/1532753002
2015-12-16 14:17:58 -08:00
mtklein
f61088321c count is an int, so constrain it to a 32-bit w-register.
This piece of code is already 64-bit only, so we don't need to think about ARMv7.

Hopefully this shuts up the warnings.  They were harmless.

If this doesn't work (it's relatively new modifier, so maybe some compilers barf), an alternative is to cast count to a size_t.

BUG=skia:4686
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1527123003
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1527123003
2015-12-16 13:42:37 -08:00
caryclark
7471fa4920 add fsync to try to get complete skps from webpage picture capture
R=reed@google.com,mtklein@google.com
BUG=skia:4691
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1530783003

Review URL: https://codereview.chromium.org/1530783003
2015-12-16 13:41:23 -08:00
joshualitt
64673afe1a Add VisualBench switch to extra_config
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1533523003

Review URL: https://codereview.chromium.org/1533523003
2015-12-16 12:54:19 -08:00
caryclark
b669300a97 only call scalar finite when necessary
Mike points that the the ulps compares
rank high in path ops profiles. The
check for finite scalars is rarely
required.

Call it less by:
- specializing _pin version of compares
- checking for 0 divides up front
- handling failing cases before comparing
- casting float to double before adding

R=reed@google.com

Review URL: https://codereview.chromium.org/1522183002
2015-12-16 12:28:35 -08:00
bsalomon
54c6fe8519 Generate a table of config->glformat info. Precursor to lifting this to caps.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1527383003

Review URL: https://codereview.chromium.org/1527383003
2015-12-16 11:51:22 -08:00
mtklein
78e0aef610 SSE 4.1 SrcOver blits: color32, blitmask.
This is mainly warmup for an AVX2 version.
The machine I'm typing this on just doesn't support AVX2.
This strategy should translate easily down to SSSE3 and SSE2.

Xfermode_SrcOver:    2.73ms -> 2.62ms  (0.96x)   (That's Color32.)
Xfermode_SrcOver_aa: 3.48ms -> 3.09ms  (0.89x)   (That's BlitMask_D32_A8.)

AA text blits (text_16_AA_{88,FF,WT,BK}) show speedups in the range of 5 to 20%.

Unlike previous versions of this code, all the div255() are exactly (x+127)/255.
This won't fix any major bugs, but it does correct our bias in the middle.
There will be many diffs, all minor.

I've punted for now on pmaddubsw for lerping. I do intend to try that,
but I want this (relatively simple) code as my basis for comparison.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1526883004
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1526883004
2015-12-16 11:15:57 -08:00
joshualitt
431dded51c Blacklist GLInstancedArraysBench on ipad
TBR=jvanverth@google.com
BUG=skia:4714

Review URL: https://codereview.chromium.org/1522273006
2015-12-16 10:38:35 -08:00
scroggo
789fd99659 Remove Subset*Benches
These were originally used to compare to the old implementation of
subset decoding in SkImageDecoder. The old implementation has been
removed, and they do not provide useful information that is not
covered by the BitmapRegionDecoderBenches.

This will greatly speed up some of our infra bots, which spend a lot of
time decoding interlaced PNGs repeatedly (thanks to
SubsetTranslateBench).

BUG=skia:4715
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1531833002

Review URL: https://codereview.chromium.org/1531833002
2015-12-16 10:21:44 -08:00
joshualitt
477815cb8b Revert of Blacklist GLInstancedArraysBench on the ipad (patchset #1 id:1 of https://codereview.chromium.org/1529973002/ )
Reason for revert:
Whoops, this is for nanobench

Original issue's description:
> Blacklist GLInstancedArraysBench on the ipad
>
> BUG=skia:4714
>
> Committed: https://skia.googlesource.com/skia/+/5d16fea9e22221be5fbe2866bbcfe8d6f4c6aeac

TBR=jvanverth@google.com,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4714

Review URL: https://codereview.chromium.org/1534513002
2015-12-16 10:20:11 -08:00
caryclark
1f17ab5992 This brings hairlines into agreement with thick strokes.
Add more testing and a pixel magnification to GM.

R=reed@google.com, fmalita@chromium.org
BUG=skia:4599
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1527083002

Review URL: https://codereview.chromium.org/1527083002
2015-12-16 08:53:41 -08:00
reed
da420b976e Reland of move drawSprite from canvas (patchset #1 id:1 of https://codereview.chromium.org/1529803004/ )
Reason for revert:
guard has landed in chrome

Original issue's description:
> Revert of remove drawSprite from canvas (patchset #4 id:60001 of https://codereview.chromium.org/1534443003/ )
>
> Reason for revert:
> need to remove an override in chrome
>
> Original issue's description:
> > remove drawSprite from canvas
> >
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/4657ce2324ea197507c4ba728d81138f56da13b1
>
> TBR=fmalita@chromium.org,robertphillips@google.com,senorblanco@chromium.org,mtklein@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/32704674f64cb6a14356dfebe060cd3484c06cc7

TBR=fmalita@chromium.org,robertphillips@google.com,senorblanco@chromium.org,mtklein@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1530203002
2015-12-16 08:38:16 -08:00
reed
32704674f6 Revert of remove drawSprite from canvas (patchset #4 id:60001 of https://codereview.chromium.org/1534443003/ )
Reason for revert:
need to remove an override in chrome

Original issue's description:
> remove drawSprite from canvas
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/4657ce2324ea197507c4ba728d81138f56da13b1

TBR=fmalita@chromium.org,robertphillips@google.com,senorblanco@chromium.org,mtklein@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1529803004
2015-12-16 08:27:10 -08:00
reed
4657ce2324 remove drawSprite from canvas
BUG=skia:

Review URL: https://codereview.chromium.org/1534443003
2015-12-16 07:52:47 -08:00
scroggo
ce5ac45d39 Use SK_BUILD_FOR_ANDROID_FRAMEWORK in compose
We are trying to support the behavior provided by the Android
framework. Other developers do not necessarily need this behavior.

BUG=skia:4296

Review URL: https://codereview.chromium.org/1518933002
2015-12-16 07:34:21 -08:00
robertphillips
7354a4b193 Avoid pixel GPU readback in saveLayerWithPickup
When the default framebuffer is wrapped in a device for rendering we don't get a GrTexture. This CL adds a copy to a temporary texture in this instance so the rest of the Ganesh pipeline can continue on as usual.

Review URL: https://codereview.chromium.org/1531493002
2015-12-16 05:08:27 -08:00
joshualitt
5d16fea9e2 Blacklist GLInstancedArraysBench on the ipad
BUG=skia:4714

Review URL: https://codereview.chromium.org/1529973002
2015-12-15 13:07:21 -08:00
bsalomon
f46a124ddd Set GL_PACK_ALIGNMENT before calling glReadPixels
Review URL: https://codereview.chromium.org/1525193002
2015-12-15 12:37:38 -08:00
joshualitt
66957946c0 Make draw* lines responsible for cache management
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1521613002
2015-12-15 11:33:19 -08:00
ethannicholas
c88cb8942e Fix for GrAALinearizingConvexPathRenderer incorrectly drawing non-convex paths
BUG=552080

Review URL: https://codereview.chromium.org/1522973002
2015-12-15 11:01:12 -08:00
smklein
db284c52e6 Porting Skia for newlib compatibility.
"locale_t" is not defined for Newlib.

BUG=https://github.com/domokit/mojo/issues/431

Review URL: https://codereview.chromium.org/1526703003
2015-12-15 10:52:51 -08:00
joshualitt
4541f6e2e3 Blacklist AndroidOne + WritePixelsTest
BUG=skia:4711

Review URL: https://codereview.chromium.org/1528033002
2015-12-15 10:46:21 -08:00
bsalomon
6176bc1df3 Add helper for determining whether to use sized internal format in GL
Fix case where texture format and data format are different.

Use helper when createing a testing "backend" texture.

BUG=skia:

Review URL: https://codereview.chromium.org/1527753002
2015-12-15 09:25:06 -08:00
halcanary
02faf31080 Tests: reduce verbosity
Review URL: https://codereview.chromium.org/1526943003
2015-12-15 09:20:19 -08:00
mseaborn
19b0420e87 SkPreConfig.h: Allow defined(__unix__) to imply SK_BUILD_FOR_UNIX
This is more general than checking for __linux, __FreeBSD__, etc.  (In
principle we could remove some of the existing checks such as
__FreeBSD__, but I have not tried that so far.)

In particular, it allows Skia to build with the NaCl or PNaCl
toolchains, which is something we would like for Mojo.

BUG=https://github.com/domokit/mojo/issues/431
TEST=none

Review URL: https://codereview.chromium.org/1523733003
2015-12-15 07:52:31 -08:00
mtklein
fce612ac32 Specialize Sk2d for SSE2
Given the autovectorization we've seen, I wouldn't expect big speedups
from this, but it does give us a point of control over what's going on.

BUG=skia:
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1526923003
2015-12-15 07:38:54 -08:00
benjaminwagner
6822c20705 Revert of In BUILD.public, enable SK_SUPPORT_LEGACY_HAIR_IGNORES_CAPS. (patchset #1 id:1 of https://codereview.chromium.org/1516863007/ )
Reason for revert:
The failing test has been blacklisted. The issue was not caused by this CL.

Original issue's description:
> In BUILD.public, enable SK_SUPPORT_LEGACY_HAIR_IGNORES_CAPS.
>
> Somehow https://codereview.chromium.org/1491843006 causes fills to change in one test.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/b6c77f6d62a62db3aec483e0a995ca30b9c97f0b

TBR=mtklein@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1530533003
2015-12-15 07:13:21 -08:00
fmalita
aed4d32de9 SkBitmapProcState rounding bias
Epsilon bias to keep bitmap sample rounding consistent with geometry
rounding.

Also update the GM to draw an outer border + drop uninteresting
scales in favor of negative scale variants.

BUG=skia:4680,skia:4649
R=reed@google.com,caryclark@google.com,mtklein@google.com

Review URL: https://codereview.chromium.org/1527633002
2015-12-15 06:48:48 -08:00
rmistry
11f457e162 Add link to Gold trybot runs in every uploaded Skia CL
BUG=skia:4433
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1521913005

Review URL: https://codereview.chromium.org/1521913005
2015-12-15 06:23:33 -08:00
borenet
f64be44667 adb_wait_for_device: More fixes
BUG=skia:4690

Review URL: https://codereview.chromium.org/1527713002
2015-12-15 04:25:39 -08:00
msarett
a35434aadc Fix valgrind suppressions for libjpeg-turbo warning
BUG=skia:

Review URL: https://codereview.chromium.org/1518393003
2015-12-14 14:14:06 -08:00
benjaminwagner
2796767eda Update sync_google3.sh to match autoroller.py.
BUG=skia:

Review URL: https://codereview.chromium.org/1526593003
2015-12-14 12:41:10 -08:00
bsalomon
489147c78b Add option to control maximum GrBatch lookback
Review URL: https://codereview.chromium.org/1498653002
2015-12-14 12:13:09 -08:00
ethannicholas
1cbb5ea0a0 Switch fragment coordinate to 'highp' to fix various broken GMs.
BUG=skia:4693

Review URL: https://codereview.chromium.org/1523793002
2015-12-14 11:37:55 -08:00
mtklein
6f37b4a475 Unify some SkNx code
- one base case and one N=1 case instead of two each (or three with doubles)
 - use SkNx_cast instead of FromBytes/toBytes
 - 4-at-a-time Sk4f::ToBytes becomes a special standalone Sk4f_ToBytes

If I did everything right, this'll be perf- and pixel- neutral.

https://gold.skia.org/search2?issue=1526523003&unt=true&query=source_type%3Dgm&master=false

BUG=skia:
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1526523003
2015-12-14 11:25:18 -08:00