Commit Graph

19784 Commits

Author SHA1 Message Date
caryclark
da707bf563 add SkPath::isRRect
Add helper to track when a round rect was added to a path,
and then return the SkRRect specification that describes it.

Move the implementation for SkPath::RawIter to SkPathRef so it can be used there as well.

R=reed@google.com,robertphillips@google.com

Review URL: https://codereview.chromium.org/1461763004
2015-11-19 14:47:44 -08:00
joshualitt
edb36445db Avoid geometric ninepatch if rendertarget has MSAA
BUG=skia:4586

Review URL: https://codereview.chromium.org/1458883009
2015-11-19 14:29:30 -08:00
robertphillips
783a4da10b Add more batch information printouts
Review URL: https://codereview.chromium.org/1457373003
2015-11-19 14:00:02 -08:00
jvanverth
b7361580f2 Revert of Add stroking support to distance field path renderer (patchset #7 id:120001 of https://codereview.chromium.org/1460873002/ )
Reason for revert:
Asserting in nanobench and dm.

Original issue's description:
> Add stroking support to distance field path renderer
>
> Also slightly increases sizes of paths accepted for distance field
> caching.
>
> Committed: https://skia.googlesource.com/skia/+/5ce76efd1c847308c7bcac17bd87d567c42cd786

TBR=robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1458233002
2015-11-19 13:18:46 -08:00
jvanverth
5ce76efd1c Add stroking support to distance field path renderer
Also slightly increases sizes of paths accepted for distance field
caching.

Review URL: https://codereview.chromium.org/1460873002
2015-11-19 12:47:09 -08:00
mtklein
e9d2052e49 Record concat as Concat.
This seems to cause very slight diffs on GMs.
https://gold.skia.org/search2?issue=1462983002&unt=true&query=source_type%3Dgm&master=false

I'm not sure I understand why.
The diffs to at least pictureshader look like improvements.

BUG=skia:4584

Review URL: https://codereview.chromium.org/1462983002
2015-11-19 12:08:24 -08:00
fmalita
8d381022e7 Fix nearly-vertical gradient assert
Use a SkScalarNearlyZero(dx) test instead of !SkScalarIsFinite(invDx).

R=reed@google.com

Review URL: https://codereview.chromium.org/1456783005
2015-11-19 10:35:34 -08:00
reed
f38b0d86b8 add SkRecordOptimize2 and an experimental API for more aggressive opts
BUG=skia:

Review URL: https://codereview.chromium.org/1462973002
2015-11-19 10:31:08 -08:00
mtklein
1d02a60fec Remove unsigned < signed comparison.
This triggers -Wsign-compare on some builds.
Not sure why none of those builds have -Werror set.

BUG=skia:4561

Review URL: https://codereview.chromium.org/1464543002
2015-11-19 09:53:22 -08:00
fmalita
e55c312929 Parametric contour start GM
A GM to capture the newly added SkPath API.

BUG=chromium:315277
R=caryclark@google.com,reed@google.com

Review URL: https://codereview.chromium.org/1457503002
2015-11-19 09:47:12 -08:00
mtklein
6c7b104b4c Fix UB in SkDivBits
DIVBITS_ITER was shifting bits up into the sign bit, which is a no-no.
This turns numer into a uint32_t to make those defined, and adds a few notes.

x >= 0 is always true for unsigned x, so we needed a few small logic refactors.

BUG=skia:3562

Committed: https://skia.googlesource.com/skia/+/988adddd48322bfa3e3cb0c017cfce71fbbf1123

Review URL: https://codereview.chromium.org/1455163004
2015-11-19 09:40:48 -08:00
kkinnunen
c11a527cd0 Fix GpuDrawPathTest on ANGLE and enable it
Fix GpuDrawPathTest on ANGLE by avoiding a crash
if MSAA surface creation fails.

Enable the test.

BUG=skia:4581

Review URL: https://codereview.chromium.org/1463493002
2015-11-19 09:37:02 -08:00
mtklein
29d60e5ab5 Revert float xfermodes back to Sk4f (from Sk8f).
Generally this was a performance win, even on devices without AVX due
to unrolling, but on ARM+NEON it looks like that unrolling hurt a bit.

    while (...) { blend a pixel }
~~~>
    while (...) { blend two pixels }
    if (n % 2) { blend last pixel }

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

Review URL: https://codereview.chromium.org/1465483002
2015-11-19 09:10:33 -08:00
msarett
a37662937c Fix BMP RLE bug: attempt 2
BUG=skia:

Review URL: https://codereview.chromium.org/1457213003
2015-11-19 08:59:12 -08:00
mtklein
24e7db8b2e Modernize SkRecordPattern.h
- Fold Or, Or3, Or4 into one flexible Or.
  - Fold Pattern1...Pattern7 into one flexible Pattern.
  - Rename Star Greedy

Still fighting with a flexible get<N>() method instead of first, second, third, etc.

BUG=skia:

Review URL: https://codereview.chromium.org/1465443002
2015-11-19 08:53:27 -08:00
kkinnunen
4222e19aea Fix maybe unintialized warning for GrAutoLocaleSetter
In function void test_GLPrograms(skiatest::Reporter*, GrContextFactory*):
../../../src/gpu/GrAutoLocaleSetter.h:47:35: error:
als.GrAutoLocaleSetter::fOldLocale may be used uninitialized in this
function [-Werror=maybe-uninitialized]

From Build-Ubuntu-GCC-x86_64-Release-Trybot

Review URL: https://codereview.chromium.org/1456383002
2015-11-19 08:45:30 -08:00
reed
ff53af85f6 add --write option to dump_record
BUG=skia:

Review URL: https://codereview.chromium.org/1459823003
2015-11-19 08:18:04 -08:00
Brian Salomon
e416d940c6 Change prealloc number of child FPs be 1 rather than 2
TBR=joshualitt@google.com

Review URL: https://codereview.chromium.org/1458913003 .
2015-11-19 11:04:48 -05:00
bsalomon
418e26f86c Preallocate room for 2 child processors in FPs
Review URL: https://codereview.chromium.org/1456263003
2015-11-19 08:02:09 -08:00
jvanverth
76f160c61f Shift up bottom path in smallpaths GM.
This stops it from being cut off in the image.

Review URL: https://codereview.chromium.org/1462903002
2015-11-19 07:46:07 -08:00
fmalita
3b4444802f Unit test for conic weight GrPath key collision
BUG=skia:4580
R=robertphillips@google.com,bsalomon@google.com

Review URL: https://codereview.chromium.org/1454223002
2015-11-19 07:28:50 -08:00
mtklein
c3c6194ba2 Add SkRecord::defrag().
Called by SkRecordOptimize(), this moves all the NoOps to the end and
slices them off.

This implementation with std::remove_if() is linear and doesn't malloc.

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

BUG=skia:

Review URL: https://codereview.chromium.org/1461663003
2015-11-19 07:23:49 -08:00
egdaniel
a2e3e0f7f8 Move glsl onto EmitArgs struct for emitCode
BUG=skia:

Review URL: https://codereview.chromium.org/1453623003
2015-11-19 07:23:45 -08:00
egdaniel
c0604609ce Fix leak in drawBitmapNine
NOTREECHECKS=true

BUG=skia:

Review URL: https://codereview.chromium.org/1462893002
2015-11-19 06:52:50 -08:00
fmalita
fbe1c110ac [Reland] Fix NVPR assert for equivalent ovals
For oval paths, GrPath ignores the point order and only uses the bounds
when building its key.  This is problematic because

1) point order is important when dashing
2) GrStencilAndCoverPathRenderer asserts that the lookup SkPath is equal
   to the cached SkPath - which is not the case for ovals with different
   directions/different point order.

With this CL we no longer use the reduced oval key when dashing, and
instead fall through to the more general path cases.  The assert is
adjusted to accommodate "equivalent" ovals (when not dashing).

Also re-enabled & updated the GpuDrawPath unit test (disabled in
https://codereview.chromium.org/1456463003/, presumably due to the use
of uninitialized SkRects).

R=bsalomon@google.com,robertphillips@google.com,cdalton@nvidia.com

Review URL: https://codereview.chromium.org/1457073002
2015-11-18 20:12:57 -08:00
bsalomon
a7c41c5217 Make SkTLList prealloc its first block of nodes
Review URL: https://codereview.chromium.org/1458703005
2015-11-18 19:48:50 -08:00
bsalomon
f045d600fc Make block size a template parameter of SkTLList
Review URL: https://codereview.chromium.org/1457123002
2015-11-18 19:01:12 -08:00
mtklein
9b341146d9 Revert SkBlitMask_opts.h back to hand-coded NEON.
SkPx has triggered a bunch of small (2-9%) regressions on NEON devices.

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/1462783002
2015-11-18 18:59:18 -08:00
stephana
1ac3f40b43 Revert of Fix NVPR assert for equivalent ovals (patchset #1 id:1 of https://codereview.chromium.org/1457073002/ )
Reason for revert:
Causes failures on Android and Win8:

...
( 137/1245MB      9) 73.9ms	unit test  GpuLayerCachec:\0\build\slave\workdir\build\skia\include\private\skuniqueptr.h:164: failed assertion "get() != pointer()"

Caught exception 2147483651 EXCEPTION_BREAKPOINT
...

Original issue's description:
> Fix NVPR assert for equivalent ovals
>
> For oval paths, GrPath ignores the point order and only uses the bounds
> when building its key.  This is problematic because
>
> 1) point order is important when dashing
> 2) GrStencilAndCoverPathRenderer asserts that the lookup SkPath is equal
>    to the cached SkPath - which is not the case for ovals with different
>    directions/different point order.
>
> With this CL we no longer use the reduced oval key when dashing, and
> instead fall through to the more general path cases.  The assert is
> adjusted to accommodate "equivalent" ovals (when not dashing).
>
> Also re-enabled & updated the GpuDrawPath unit test (disabled in
> https://codereview.chromium.org/1456463003/, presumably due to the use
> of uninitialized SkRects).
>
> R=bsalomon@google.com,robertphillips@google.com,cdalton@nvidia.com
>
> Committed: https://skia.googlesource.com/skia/+/f9b1577d763988ebc043ddabf80674f71571ecff

TBR=bsalomon@google.com,cdalton@nvidia.com,robertphillips@google.com,fmalita@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1461913002
2015-11-18 18:35:56 -08:00
bsalomon
5aaef1ff1a simplify insertion methods for SkTLList
Review URL: https://codereview.chromium.org/1459663002
2015-11-18 14:11:08 -08:00
fmalita
f9b1577d76 Fix NVPR assert for equivalent ovals
For oval paths, GrPath ignores the point order and only uses the bounds
when building its key.  This is problematic because

1) point order is important when dashing
2) GrStencilAndCoverPathRenderer asserts that the lookup SkPath is equal
   to the cached SkPath - which is not the case for ovals with different
   directions/different point order.

With this CL we no longer use the reduced oval key when dashing, and
instead fall through to the more general path cases.  The assert is
adjusted to accommodate "equivalent" ovals (when not dashing).

Also re-enabled & updated the GpuDrawPath unit test (disabled in
https://codereview.chromium.org/1456463003/, presumably due to the use
of uninitialized SkRects).

R=bsalomon@google.com,robertphillips@google.com,cdalton@nvidia.com

Review URL: https://codereview.chromium.org/1457073002
2015-11-18 14:07:13 -08:00
mtklein
c8e8fc6e98 Revert of Fix UB in SkDivBits (patchset #2 id:10002 of https://codereview.chromium.org/1455163004/ )
Reason for revert:
Need to reland with #define guards for tiny layout test changes. (Yikes!)

Original issue's description:
> Fix UB in SkDivBits
>
> DIVBITS_ITER was shifting bits up into the sign bit, which is a no-no.
> This turns numer into a uint32_t to make those defined, and adds a few notes.
>
> x >= 0 is always true for unsigned x, so we needed a few small logic refactors.
>
> BUG=skia:3562
>
> Committed: https://skia.googlesource.com/skia/+/988adddd48322bfa3e3cb0c017cfce71fbbf1123

TBR=caryclark@google.com,mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:3562

Review URL: https://codereview.chromium.org/1457863002
2015-11-18 14:01:07 -08:00
benjaminwagner
a445cbccef In BUILD.public, remove compile-time dependency on GL.
BUG=skia:

Review URL: https://codereview.chromium.org/1458603006
2015-11-18 13:48:47 -08:00
jvanverth
8450cc3d3d Add small paths GM
Used to testing caching and quality of distance field paths.

Review URL: https://codereview.chromium.org/1456823003
2015-11-18 13:40:15 -08:00
joshualitt
5df175ee71 Make has GrBatchAtlas::ID() inlineable
BUG=skia:

Review URL: https://codereview.chromium.org/1456113002
2015-11-18 13:37:54 -08:00
joshualitt
33a5fce612 Initial implementation of GPU no filter NinePatch
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1454933002
2015-11-18 13:28:51 -08:00
benjaminwagner
39e7aa48d7 Remove Lua from the Google3 build.
See internal cl/107087297 for details.

Rename some variables in BUILD/BUILD.public.

BUG=skia:

Review URL: https://codereview.chromium.org/1425013008
2015-11-18 13:26:10 -08:00
benjaminwagner
58afee8220 Fix GOOGLE3 Android build.
DebugWriteToStderr isn't defined for Android. I'm not sure if I just didn't test compiling for Android or if this is due to a change in the base library.

BUG=skia:

No public API changes.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1438773003
2015-11-18 13:14:14 -08:00
djsollen
a745186c93 Update debugger UI to auto-refresh the directory listing
Review URL: https://codereview.chromium.org/1462633002
2015-11-18 13:00:21 -08:00
robertphillips
2b82982197 [debugger] Add visualization of center rect for drawBitmapNine calls
Review URL: https://codereview.chromium.org/1462643002
2015-11-18 12:59:42 -08:00
Brian Salomon
a911f8f8bb Fix has_aligned_samples helper for SkGpuDevice::drawTextureProducer
Review URL: https://codereview.chromium.org/1454183002 .
2015-11-18 15:19:57 -05:00
msarett
bc890c8490 Fix BMP RLE bug
decodeRows() should return an int, not an SkCodec::Result

BUG=skia:

Review URL: https://codereview.chromium.org/1457793003
2015-11-18 11:43:08 -08:00
jcgregorio
15d5b82f90 Add an example of embedding a Skia Perf graph to the site docs.
This specific page:

  https://skia.org/dev/testing/skiaperf?cl=1462583002

BUG=skia:
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1462583002

Review URL: https://codereview.chromium.org/1462583002
2015-11-18 11:14:31 -08:00
mtklein
2f2903d7a0 restore dump_record
And,
    - 4 space indents
    - print out time units (microseconds)

BUG=skia:

Review URL: https://codereview.chromium.org/1458943002
2015-11-18 11:06:37 -08:00
bsalomon
b1b019985b Convert SkGpuDevice::drawTextureAdjuster to SkGpuDevice::drawTextureProducer
Move createFragmentProcessor to GrTextureProducer base class.

Make non-tiled sw-bitmap draws go through drawTextureProducer.

Review URL: https://codereview.chromium.org/1459433002
2015-11-18 10:56:08 -08:00
herb
e59124ed1a Convert drawText to using the find and place code.
BUG=skia:

Review URL: https://codereview.chromium.org/1448453002
2015-11-18 10:54:39 -08:00
herb
5520dede29 Fix buffer overrun, bit overrun and add a test.
BUG=539691

Review URL: https://codereview.chromium.org/1453163002
2015-11-18 10:50:33 -08:00
mtklein
988adddd48 Fix UB in SkDivBits
DIVBITS_ITER was shifting bits up into the sign bit, which is a no-no.
This turns numer into a uint32_t to make those defined, and adds a few notes.

x >= 0 is always true for unsigned x, so we needed a few small logic refactors.

BUG=skia:3562

Review URL: https://codereview.chromium.org/1455163004
2015-11-18 09:56:28 -08:00
mtklein
835c1b69a2 Clean up dead code: PictureRenderer
Doesn't appear to actually be used by anything.

BUG=skia:

Review URL: https://codereview.chromium.org/1457753002
2015-11-18 09:41:06 -08:00
egdaniel
4ca2e60343 Add ShaderBuilders to EmitArgs and remove gettings from ProgBuilder.
BUG=skia:

Review URL: https://codereview.chromium.org/1457543003
2015-11-18 08:01:26 -08:00