Commit Graph

19448 Commits

Author SHA1 Message Date
mtklein
e8e17cf23d SkPx: new approach to fixed-point SIMD
SkPx is like Sk4px, except each platform implementation of SkPx can declare
a different sweet spot of N pixels, with extra loads and stores to handle the
ragged edge of 0<n<N pixels.

In this case, _sse's sweet spot remains 4 pixels.   _neon jumps up to 8 so
we can now use NEON's transposing loads and stores, and _none is just 1.
This makes operations involving alpha considerably more efficient on NEON,
as alpha is its own distinct 8x8 bit plane that's easy to toss around.

This incorporates a few other improvements I've been wanting:
  - no requirement that we're dealing with SkPMColor.  SkColor works too.
  - no anonymous namespace hack to differentiate implementations.

Codegen and perf look good on Clang/x86-64 and GCC/ARMv7.
The NEON code looks very similar to the old NEON code, as intended.
No .skp or GM diffs on my laptop.  Don't expect any.

I intend this to replace Sk4px.  Plan after landing:
  - port SkXfermode_opts.h
  - port Color32 in SkBlitRow_D32.cpp (and move to SkBlitRow_opts.h like other
    SkOpts code)
  - delete all Sk4px-related code
  - clean up evolutionary dead ends in SkNx (Sk16b, Sk16h, Sk4i, Sk4d, etc.)
    leaving Sk2f, Sk4f (and Sk2s, Sk4s).
  - find a machine with AVX2 to work on, write SkPx_avx2.h handling 8 pixels
    at a time.

In the end we'll have Sk4f for float pixels, SkPx for fixed-point pixels.

BUG=skia:4117

Committed: https://skia.googlesource.com/skia/+/82c93b45ed6ac0b628adb8375389c202d1f586f9

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot;client.skia.compile:Build-Mac10.8-Clang-Arm7-Debug-Android-Trybot

Committed: https://skia.googlesource.com/skia/+/a7627dc5cc2bf5d9a95d883d20c40d477ecadadf

Review URL: https://codereview.chromium.org/1317233005
2015-11-06 14:10:48 -08:00
robertphillips
2b0536f37a Clean up GrBatchAtlas a bit
The main thrust of this CL is to remove knowledge of the atlas' backing texture from the BatchPlot. It also reduces the API surface of the BatchPlot and shrinks the amount of fields in the BatchAtlas.

Review URL: https://codereview.chromium.org/1413403009
2015-11-06 14:10:42 -08:00
reed
16d7e96f37 add sequence for nov talk
BUG=skia:
TBR=
NOTRY=True
NOTREECHECKS=True

Review URL: https://codereview.chromium.org/1415453011
2015-11-06 12:36:24 -08:00
Matt Sarett
1aaaba5216 Fix the build on Android devices 2015-11-06 15:19:24 -05:00
mtklein
1358051073 Revert of SkPx: new approach to fixed-point SIMD (patchset #12 id:220001 of https://codereview.chromium.org/1317233005/ )
Reason for revert:
master-skia unhappy:
e6c439e806/logs/build_error.log

Original issue's description:
> SkPx: new approach to fixed-point SIMD
>
> SkPx is like Sk4px, except each platform implementation of SkPx can declare
> a different sweet spot of N pixels, with extra loads and stores to handle the
> ragged edge of 0<n<N pixels.
>
> In this case, _sse's sweet spot remains 4 pixels.   _neon jumps up to 8 so
> we can now use NEON's transposing loads and stores, and _none is just 1.
> This makes operations involving alpha considerably more efficient on NEON,
> as alpha is its own distinct 8x8 bit plane that's easy to toss around.
>
> This incorporates a few other improvements I've been wanting:
>   - no requirement that we're dealing with SkPMColor.  SkColor works too.
>   - no anonymous namespace hack to differentiate implementations.
>
> Codegen and perf look good on Clang/x86-64 and GCC/ARMv7.
> The NEON code looks very similar to the old NEON code, as intended.
> No .skp or GM diffs on my laptop.  Don't expect any.
>
> I intend this to replace Sk4px.  Plan after landing:
>   - port SkXfermode_opts.h
>   - port Color32 in SkBlitRow_D32.cpp (and move to SkBlitRow_opts.h like other
>     SkOpts code)
>   - delete all Sk4px-related code
>   - clean up evolutionary dead ends in SkNx (Sk16b, Sk16h, Sk4i, Sk4d, etc.)
>     leaving Sk2f, Sk4f (and Sk2s, Sk4s).
>   - find a machine with AVX2 to work on, write SkPx_avx2.h handling 8 pixels
>     at a time.
>
> In the end we'll have Sk4f for float pixels, SkPx for fixed-point pixels.
>
> BUG=skia:4117
>
> Committed: https://skia.googlesource.com/skia/+/82c93b45ed6ac0b628adb8375389c202d1f586f9
>
> CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot;client.skia.compile:Build-Mac10.8-Clang-Arm7-Debug-Android-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/a7627dc5cc2bf5d9a95d883d20c40d477ecadadf

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

Review URL: https://codereview.chromium.org/1409843005
2015-11-06 11:34:06 -08:00
hcm
6065d8eae6 Adding Skia Debugger documentation
BUG=skia:
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1414393010

Review URL: https://codereview.chromium.org/1414393010
2015-11-06 11:29:06 -08:00
msarett
b747b90501 Remove dependencies on Android's forked decoder libraries
Disable SkImageDecoder's code which relies on Android's customized
libpng and libjpeg. Build standard versions of libpng and libjpeg-turbo
everywhere. The SkImageDecoder code has been replaced with SkCodec, which
can decode subsets using standard library APIs

BUG=skia:

Review URL: https://codereview.chromium.org/1406153015
2015-11-06 11:15:49 -08:00
msarett
69ad6a9d03 Change quality settings on SkImageDecoder_libjpeg
It has been demonstrated that higher quality settings
really do make a difference in the visual quality of
the output image.
https://code.google.com/p/chromium/issues/detail?id=385515
https://code.google.com/p/skia/issues/detail?id=3770

We are planning to replace SkImageDecoder with SkCodec,
and SkCodec will use the higher quality settings.  As
a first step, we are using SkCodec as the underlying
implementation for BitmapRegionDecoder.  CTS tests require
that BitmapRegionDecoder be a close match to BitmapFactory
(which uses SkImageDecoder), so we must also update the
quality of SkImageDecoder to maintain CTS compatibility.

BUG=skia:

Review URL: https://codereview.chromium.org/1412803009
2015-11-06 11:02:06 -08:00
msarett
8e26604262 Export tools as an include directory for Android
BUG=skia:

Review URL: https://codereview.chromium.org/1411933006
2015-11-06 10:53:01 -08:00
herb
dad837ace1 compare has a syntax error where it is missing the path to sem().
BUG=skia:

Review URL: https://codereview.chromium.org/1420963010
2015-11-06 10:35:37 -08:00
mtklein
a7627dc5cc SkPx: new approach to fixed-point SIMD
SkPx is like Sk4px, except each platform implementation of SkPx can declare
a different sweet spot of N pixels, with extra loads and stores to handle the
ragged edge of 0<n<N pixels.

In this case, _sse's sweet spot remains 4 pixels.   _neon jumps up to 8 so
we can now use NEON's transposing loads and stores, and _none is just 1.
This makes operations involving alpha considerably more efficient on NEON,
as alpha is its own distinct 8x8 bit plane that's easy to toss around.

This incorporates a few other improvements I've been wanting:
  - no requirement that we're dealing with SkPMColor.  SkColor works too.
  - no anonymous namespace hack to differentiate implementations.

Codegen and perf look good on Clang/x86-64 and GCC/ARMv7.
The NEON code looks very similar to the old NEON code, as intended.
No .skp or GM diffs on my laptop.  Don't expect any.

I intend this to replace Sk4px.  Plan after landing:
  - port SkXfermode_opts.h
  - port Color32 in SkBlitRow_D32.cpp (and move to SkBlitRow_opts.h like other
    SkOpts code)
  - delete all Sk4px-related code
  - clean up evolutionary dead ends in SkNx (Sk16b, Sk16h, Sk4i, Sk4d, etc.)
    leaving Sk2f, Sk4f (and Sk2s, Sk4s).
  - find a machine with AVX2 to work on, write SkPx_avx2.h handling 8 pixels
    at a time.

In the end we'll have Sk4f for float pixels, SkPx for fixed-point pixels.

BUG=skia:4117

Committed: https://skia.googlesource.com/skia/+/82c93b45ed6ac0b628adb8375389c202d1f586f9

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot;client.skia.compile:Build-Mac10.8-Clang-Arm7-Debug-Android-Trybot

Review URL: https://codereview.chromium.org/1317233005
2015-11-06 09:18:57 -08:00
msarett
5cb4885b4c Rename SkBitmapRegionDecoder and Create function
We no longer need to worry about namespace
conflicts SkBitmapRegionDecoder in Android (which
we are replacing).

Additionally, the static Create() function does not
need to repeat the name BitmapRegionDecoder.

BUG=skia:

Review URL: https://codereview.chromium.org/1415243007
2015-11-06 08:56:32 -08:00
halcanary
aa4ba90792 SkPDF: images support 32-but-not-N32 colortype
BUG=550559

Review URL: https://codereview.chromium.org/1407063005
2015-11-06 07:27:23 -08:00
cdalton
63f6c1fc5b Loosen requirements for mixed samples support
Quits requiring EXT_raster_multisample and
NV_sample_mask_override_coverage for mixed samples support. This will
allow platforms without those latter extensions (i.e. Chrome) to still
use mixed samples for path rendering. Also moves the mixed samples cap
out of shader caps, since it no longer denotes shader functionality.

BUG=skia:

Review URL: https://codereview.chromium.org/1410383011
2015-11-06 07:09:43 -08:00
egdaniel
f3bace9392 Add addFragPosUniform to GrGLrogramBuilder
BUG=skia:

Review URL: https://codereview.chromium.org/1434483002
2015-11-06 06:57:12 -08:00
robertphillips
cf1d19805a Revert of Update Layer Hoisting to store its atlas texture in the resource cache (patchset #6 id:100001 of https://codereview.chromium.org/1406013006/ )
Reason for revert:
Android

Original issue's description:
> Update Layer Hoisting to store its atlas texture in the resource cache
>
> BUG=skia:4346
>
> Committed: https://skia.googlesource.com/skia/+/42597bc99f00553825843b5ed41e81b121773368

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

Review URL: https://codereview.chromium.org/1413483004
2015-11-06 05:59:14 -08:00
robertphillips
42597bc99f Update Layer Hoisting to store its atlas texture in the resource cache
BUG=skia:4346

Review URL: https://codereview.chromium.org/1406013006
2015-11-06 04:14:55 -08:00
msarett
fcff08c830 SkBitmapRegionCodec needs to use the rowBytes on the pixel ref
BUG=skia:4538

Review URL: https://codereview.chromium.org/1422023006
2015-11-05 15:00:56 -08:00
senorblanco
c57e0ded7d Make SkBlurImageFilter capable of cropping during blur (GPU path).
This is the GPU equivalent of https://codereview.chromium.org/1415653003/.

It requires passing down the bounds of the crop rect (srcBounds), and
turning the blur 3-patch optimization in convolve_gaussian() into a 5-patch:
clear above and below srcBounds, blur with bounds checks inside left and
right rects, blur without bounds checks in middle rect.

Note: this change causes minor pixels diffs in the
imagefilterscropexpand GM: for odd crop positions relative to the
dstBounds, we are now correctly resampling at an even pixel boundary.

BUG=skia:4502, skia:4526

Review URL: https://codereview.chromium.org/1431593002
2015-11-05 14:48:43 -08:00
egdaniel
fca294b83b Create Sample that combines combose shader and coons patch
BUG=skia:

Review URL: https://codereview.chromium.org/1417123004
2015-11-05 13:09:08 -08:00
reed
b7ffe03b12 add --sequence filename option to SampleApp
BUG=skia:

Review URL: https://codereview.chromium.org/1412143005
2015-11-05 11:59:17 -08:00
joshualitt
474a9ea051 Wire up SDL on Android
BUG=skia:

Committed: https://skia.googlesource.com/skia/+/a4d3797c3b0f0cac8493c46cb334ca88a5d6ccf6

Review URL: https://codereview.chromium.org/1415453009
2015-11-05 11:49:35 -08:00
msarett
691ad76fca Fix bug in sampled decodes
BUG=skia:

Review URL: https://codereview.chromium.org/1417993006
2015-11-05 11:19:29 -08:00
joshualitt
5d7a7fe563 Revert of Wire up SDL on Android (patchset #4 id:60001 of https://codereview.chromium.org/1415453009/ )
Reason for revert:
breaks appurify

Original issue's description:
> Wire up SDL on Android
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/a4d3797c3b0f0cac8493c46cb334ca88a5d6ccf6

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

Review URL: https://codereview.chromium.org/1410703009
2015-11-05 10:48:41 -08:00
bsalomon
a2e69fcded Rename non-aa rect methods on GrDrawContext in anticipation of making them support aa
R=joshualitt@google.com

Review URL: https://codereview.chromium.org/1409753008
2015-11-05 10:41:43 -08:00
mtklein
cd49541524 For non-opaque SkBitmapDevices, replace malloc-then-zero with calloc.
There seem about a zillion possible ways to slice this.
This adds and uses SkMallocPixelRef::ZeroedPRFactory.
I'm not married to it.

This appears to clear up a hot spot in the benchmark referenced in this bug:
BUG=516426
I'm not confident enough on Windows to declare that definitively yet.

It probably helps all other non-opaque layers too.  Possibly significantly.

So I don't forget, I profiled this:
out/Release/performance_browser_tests.exe  --gtest_filter=TabCapturePerformanceTest.Performance/2 --single-process

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

TBR=reed@google.com

Review URL: https://codereview.chromium.org/1430593007
2015-11-05 09:46:23 -08:00
bsalomon
8515377d8f Make bicubic FP factories return const FPs
TBR=egdaniel@google.com

Review URL: https://codereview.chromium.org/1413403008
2015-11-05 09:35:01 -08:00
joshualitt
a4d3797c3b Wire up SDL on Android
BUG=skia:

Review URL: https://codereview.chromium.org/1415453009
2015-11-05 08:35:31 -08:00
plesner
d975fc9599 Add ifdef guard around gpu-specific code in native windows window.
Review URL: https://codereview.chromium.org/1405963014
2015-11-05 08:10:45 -08:00
aleksandar.stojiljkovic
2944fbb532 Assert when running SampleApp with msaa 16 on Windows 10
Trivial: skip calling SkWGLExtensions::selectFormat with 0 elements,
 and handle if called.

BUG=4529

Review URL: https://codereview.chromium.org/1427583007
2015-11-05 07:48:12 -08:00
joshualitt
8377e80951 Fix for atlas doesn't call eviction functions
TBR=
BUG=551094

Review URL: https://codereview.chromium.org/1412663011
2015-11-05 07:14:56 -08:00
joshualitt
65d6fbb576 Create SDL backed SkOSWindow
BUG=skia:

Review URL: https://codereview.chromium.org/1413593007
2015-11-04 13:41:02 -08:00
reed
6f45c17147 Revert[4] of "stop using drawSprite (at least w/ no filters) as it is going away"
This reverts commit 67b8b5e67a.

BUG=skia:
TBR=

Previous revert was due to faulty unittest (now fixed) -- unrelated to this CL.

Review URL: https://codereview.chromium.org/1422703009
2015-11-04 08:34:07 -08:00
mtklein
81919d3c67 SkRecord: text blobs
Other text as blobs to follow.

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

BUG=skia:

Review URL: https://codereview.chromium.org/1417703009
2015-11-04 08:19:24 -08:00
kkinnunen
7f97a76b80 Avoid hang in OncePtr test with --threads 1
Avoid hang in OncePtr test when using "dm --threads 1".

The test will hang the threads until sk_num_cores() threads have run
the code. This requires that sk_num_cores() threads to be run in
parallel, which the global thread pool will not do if the thread count
is smaller than sk_num_cores().

BUG=skia:

Review URL: https://codereview.chromium.org/1419593004
2015-11-04 06:30:17 -08:00
bsalomon
f57ef1c05f Add outer blur to bleed GM family
Review URL: https://codereview.chromium.org/1429863007
2015-11-04 04:36:12 -08:00
scroggo
e95a06883b Make AndroidOptions const
Make the struct passed to SkAndroidCodec::getAndroidPixels const. This
matches SkCodec, and makes sense, since it is not used as an output.

Brought up in crrev.com/1417583009

Review URL: https://codereview.chromium.org/1411693005
2015-11-04 04:31:12 -08:00
robertphillips
07b41eb962 Update RecordReplaceDraw unit test
Review URL: https://codereview.chromium.org/1407143011
2015-11-04 04:31:06 -08:00
msarett
677de31a2f Compile bitmap_region_decoder on Android
BUG=skia:

Review URL: https://codereview.chromium.org/1422313004
2015-11-04 04:28:59 -08:00
scroggo
6bd9c21019 Fix an error message
Remove double negative.
Also, change another error message to be slightly (meaningfully)
different so I can find the right one based on the log.

Review URL: https://codereview.chromium.org/1424083004
2015-11-04 04:28:54 -08:00
egdaniel
b7e7d5748d Create swizzle table inside of glsl caps
BUG=skia:

Committed: https://skia.googlesource.com/skia/+/4036674952f341dab0695c3b054fefa5bb8cdec1

Review URL: https://codereview.chromium.org/1420033005
2015-11-04 04:23:53 -08:00
bsalomon
df85a72547 change alpha bmp generator in bleed to make more discernable results
TBR=robertphillips@google.com

Review URL: https://codereview.chromium.org/1408063011
2015-11-04 04:23:45 -08:00
mtklein
143fd5547c bin/deps-and-gyp -> bin/sync-and-gyp
NOTREECHECKS=true

BUG=skia:

Review URL: https://codereview.chromium.org/1423463005
2015-11-03 12:07:47 -08:00
bsalomon
c03bdfa8e6 Revert of Reland "By default purge resources that haven't been used for 64 flushes (patchset #5 id:80001 of h… (patchset #1 id:1 of https://codereview.chromium.org/1428053003/ )
Reason for revert:
Breaking the DEPS roller - again

Original issue's description:
> Reland "By default purge resources that haven't been used for 64 flushes (patchset #5 id:80001 of https://codereview.chromium.org/1316233003/ )"
>
> TBR=robertphillips@google.com
>
> Committed: https://skia.googlesource.com/skia/+/f7de08a52b5287cb16b2e89a8e3691676a4dbe5f

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

Review URL: https://codereview.chromium.org/1414693007
2015-11-03 11:48:43 -08:00
reed
67b8b5e67a Revert of Revert[2] of "stop using drawSprite (at least w/ no filters) as it is going away" (patchset #1 id:1 of https://codereview.chromium.org/1410343011/ )
Reason for revert:
failing on msaa

Original issue's description:
> Revert[2] of "stop using drawSprite (at least w/ no filters) as it is going away"
>
> Fixed assert in test that was calling GrRecordReplaceDraw(). That function now uses
> drawBitmap, so updated the test to check for that (instead of drawSprite).
>
> This reverts commit 21b7663470.
>
> BUG=skia:
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/7b81994d95f10cda80ddb85af68a2651ff31782f

TBR=
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1420053009
2015-11-03 11:27:07 -08:00
halcanary
4a40a46c65 bin/deps-and-gyp: deal with corner cases cleanly
TBR=mtklein@google.com
NOTRY=true

Review URL: https://codereview.chromium.org/1415193006
2015-11-03 11:18:11 -08:00
bungeman
3f846ae913 Take mutex when calling into FreeType.
SkScalerContext_FreeType::generateCharToGlyph and generateGlyphToChar
do not take a mutex when calling into FreeType, but they need to.
The setupSize method also requires the mutex to be locked, which is
not a problem since it currently always is, but add a debug assert
to ensure that it continues to be.

BUG=chromium:542640

Review URL: https://codereview.chromium.org/1431683006
2015-11-03 11:07:20 -08:00
egdaniel
0c2999974d Revert of Create swizzle table inside of glsl caps (patchset #12 id:210001 of https://codereview.chromium.org/1420033005/ )
Reason for revert:
Breaking gm's on nexus7 and s3

Original issue's description:
> Create swizzle table inside of glsl caps
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/4036674952f341dab0695c3b054fefa5bb8cdec1

TBR=bsalomon@google.com,robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1426653008
2015-11-03 10:33:14 -08:00
halcanary
0575131e57 bin/deps-and-gyp: gclient-free solution
Review URL: https://codereview.chromium.org/1426103004
2015-11-03 10:30:05 -08:00
halcanary
6aff54c322 tools/git-sync-deps: speed up common case by skipping fetch
Review URL: https://codereview.chromium.org/1431713002
2015-11-03 09:50:03 -08:00