Commit Graph

19624 Commits

Author SHA1 Message Date
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
mtklein
accaf480c3 stifle Math test on Mac bot too
BUG=skia:3562

Review URL: https://codereview.chromium.org/1454093002
2015-11-18 07:56:30 -08:00
mtklein
f19385387d Clean up dead code: filter.
We haven't used this since at least landing the new SkPicture backend.

BUG=skia:

Review URL: https://codereview.chromium.org/1459583003
2015-11-18 07:45:09 -08:00
rmistry
7224ae9d51 Update all code site issue tracker links to point to bug.skia.org
BUG=skia:
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1461613002

Review URL: https://codereview.chromium.org/1461613002
2015-11-18 06:47:11 -08:00
mtklein
f970ad6ee1 Clean up dead code: render_pdfs.
DM can do this.

BUG=skia:

Review URL: https://codereview.chromium.org/1461633002
2015-11-18 06:39:01 -08:00
stephana
9c08b9d3f0 Revert of Parametric contour start GM (patchset #1 id:1 of https://codereview.chromium.org/1457503002/ )
Reason for revert:
Breaks unit test across various platforms:

../../../src/gpu/batches/GrStencilAndCoverPathRenderer.cpp:75: failed assertion "path->isEqualTo(skPath, stroke)"

Original issue's description:
> Parametric contour start GM
>
> A GM to capture the newly added SkPath API.
>
> BUG=chromium:315277
> R=caryclark@google.com,reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/56847a65648af4d06da9c26c55242949a1bf31ab

TBR=caryclark@google.com,reed@google.com,fmalita@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:315277

Review URL: https://codereview.chromium.org/1456973002
2015-11-18 06:21:35 -08:00
hcm
059dbe1a31 Update issue tracker in docs
BUG=skia:
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1462493002

Review URL: https://codereview.chromium.org/1462493002
2015-11-18 05:04:08 -08:00
kkinnunen
4e18413b78 Move SkImage tests from SurfaceTest to ImageTest
The general SkImage features seem to be tested in
ImageTest instead of SurfaceTest.

Helps in reviewing further reformatting of SurfaceTest.

BUG=skia:2992

Review URL: https://codereview.chromium.org/1452123002
2015-11-17 22:53:28 -08:00
mtklein
cbf4fba439 div255(x) as ((x+128)*257)>>16 with SSE
_mm_mulhi_epu16 makes the (...*257)>>16 part simple.
This seems to speed up every transfermode that uses div255(),
in the 7-25% range.

It even appears to obviate the need for approxMulDiv255() on SSE.
I'm not sure about NEON yet, so I'll keep approxMulDiv255() for now.

Should be no pixels change:
https://gold.skia.org/search2?issue=1452903004&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/1452903004
2015-11-17 14:19:52 -08:00
fmalita
56847a6564 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-17 13:15:42 -08:00
joshualitt
3622d41703 fix ninepatch iter from generating invalid rects
BUG=skia:

Review URL: https://codereview.chromium.org/1451183004
2015-11-17 12:11:57 -08:00