Commit Graph

19423 Commits

Author SHA1 Message Date
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
mtklein
444d91fec1 SkRemote: saveLayer
https://gold.skia.org/search2?issue=1432593002&unt=true&query=source_type%3Dgm&master=false&include=true

BUG=skia:

Review URL: https://codereview.chromium.org/1432593002
2015-11-03 09:45:03 -08:00
cdalton
98cad6219b Fix setColocatedSampleLocations on ES and GL < 4.5
Updates setColocatedSampleLocations to use glFramebufferParameteri when
the DSA version glNamedFramebufferParameteri is not present.

BUG=skia:

Review URL: https://codereview.chromium.org/1415503008
2015-11-03 09:33:21 -08:00
egdaniel
4036674952 Create swizzle table inside of glsl caps
BUG=skia:

Review URL: https://codereview.chromium.org/1420033005
2015-11-03 08:15:29 -08:00
scroggo
501b7344f1 Combine native sampling with sampling
In SkSampledCodec, allow the native codec to do its scaling first, then
sample on top of that. Since the only codec which can do native scaling
is JPEG, and we know what it can do, hard-code for JPEG. Check to see
if the sampleSize is something JPEG supports, or a multiple of
something it supports. If so, use JPEG directly or combine them.

BUG=skia:4320

Review URL: https://codereview.chromium.org/1417583009
2015-11-03 07:55:12 -08:00
bsalomon
f7de08a52b 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

Review URL: https://codereview.chromium.org/1428053003
2015-11-03 07:50:39 -08:00
mtklein
479f54dd94 SkRemote: some images, many TODOs
You can see from the diffs this is a step forward, but with bugs to fix:

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

BUG=skia:

Review URL: https://codereview.chromium.org/1418483006
2015-11-03 07:35:28 -08:00
reed
7b81994d95 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=

Review URL: https://codereview.chromium.org/1410343011
2015-11-03 07:12:16 -08:00
robertphillips
e51fa4ac31 Clean up GrAtlas and rename it GrLayerAtlas
Review URL: https://codereview.chromium.org/1412243013
2015-11-03 07:04:48 -08:00
mtklein
f27f08b76d DM+VB: WallTimer -> SkTime::GetNSecs().
The same timer with a simpler interface.

BUG=skia:

Review URL: https://codereview.chromium.org/1427033003
2015-11-03 06:54:24 -08:00
senorblanco
48343eea6f Simplify SkGpuBlurUtils.
We compute a lot of { srcRect, dstRect } pairs in this
code, but they're always the same width and height, and
dstRect often has a zero origin. So pass only one or
the other and an offset, where required. Among other
things, this simplifies the code in convolve_gaussian(),
since we only have to 3-patch the dstRect.

BUG=skia:4502

Review URL: https://codereview.chromium.org/1430593006
2015-11-03 05:07:43 -08:00
robertphillips
21b7663470 Revert of stop using drawSprite (at least w/ no filters) as it is going away (patchset #2 id:20001 of https://codereview.chromium.org/1411173010/ )
Reason for revert:
Breaking the bots

Original issue's description:
> stop using drawSprite (at least w/ no filters) as it is going away
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/4a21602982d411bb764e46dc47e009b12bd5cb39

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

Review URL: https://codereview.chromium.org/1413363011
2015-11-03 04:35:58 -08:00
aleksandar.stojiljkovic
7600183ba7 SkScan_Antihair: assert in debug and potentialy lost last pixels
alpha: (uint8_t) 256 is clamped to 255 before static cast to
uint8_t in SkToU8.

BUG=4406

Review URL: https://codereview.chromium.org/1424253002
2015-11-02 13:28:51 -08:00
senorblanco
29a440d2d6 Make SkBlurImageFilter capable of cropping during blur (raster path)
SkBlurImageFilter can currently only process a source image
which is larger than or equal to the destination rect. If
the source image (or crop rect) is smaller, it is padded
out to dest size with transparent black via the 6-param
version of applyCropRect().

Fixing this requires modifying all the flavours of RGBA
box_blur() to accept a src crop rect.

BUG=skia:4502, skia:4526
CQ_EXTRA_TRYBOTS=client.skia.android:Test-Android-GCC-Nexus5-CPU-NEON-Arm7-Release-Trybot;client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Committed: https://skia.googlesource.com/skia/+/1b82ceb737c73327412f2e8a91748481e1aec9e4

Review URL: https://codereview.chromium.org/1415653003
2015-11-02 12:55:47 -08:00
bsalomon
9c58654fa2 Add bleed GM variants for bmp backed by an oversized texture
Review URL: https://codereview.chromium.org/1426253002
2015-11-02 12:33:21 -08:00
reed
4a21602982 stop using drawSprite (at least w/ no filters) as it is going away
BUG=skia:

Review URL: https://codereview.chromium.org/1411173010
2015-11-02 12:11:13 -08:00
senorblanco
8de01c642c Revert of Make SkBlurImageFilter capable of cropping during blur (patchset #16 id:400001 of https://codereview.chromium.org/1415653003/ )
Reason for revert:
ASAN failures (see https://codereview.chromium.org/1415653003/)

Original issue's description:
> Make SkBlurImageFilter capable of cropping during blur (raster path)
>
> SkBlurImageFilter can currently only process a source image
> which is larger than or equal to the destination rect. If
> the source image (or crop rect) is smaller, it is padded
> out to dest size with transparent black via the 6-param
> version of applyCropRect().
>
> Fixing this requires modifying all the flavours of RGBA
> box_blur() to accept a src crop rect.
>
> BUG=skia:4502, skia:4526
> CQ_EXTRA_TRYBOTS=client.skia.android:Test-Android-GCC-Nexus5-CPU-NEON-Arm7-Release-Trybot;client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/1b82ceb737c73327412f2e8a91748481e1aec9e4

TBR=mtklein@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4502, skia:4526

Review URL: https://codereview.chromium.org/1428053002
2015-11-02 11:56:18 -08:00
bsalomon
8c07b7ab53 Allow max tile size to be overridden separately from max texture size.
This allows internal Gr texture creation code to succeed for extraneous textures while running the bleed GM. This means we can turn on the shader variants.

Review URL: https://codereview.chromium.org/1418473004
2015-11-02 11:36:52 -08:00
iroth
8b99ef4347 Enable building Skia for iOS with bazel.
BUG=skia:

Review URL: https://codereview.chromium.org/1429863002
2015-11-02 11:11:21 -08:00
senorblanco
1b82ceb737 Make SkBlurImageFilter capable of cropping during blur (raster path)
SkBlurImageFilter can currently only process a source image
which is larger than or equal to the destination rect. If
the source image (or crop rect) is smaller, it is padded
out to dest size with transparent black via the 6-param
version of applyCropRect().

Fixing this requires modifying all the flavours of RGBA
box_blur() to accept a src crop rect.

BUG=skia:4502, skia:4526
CQ_EXTRA_TRYBOTS=client.skia.android:Test-Android-GCC-Nexus5-CPU-NEON-Arm7-Release-Trybot;client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1415653003
2015-11-02 11:09:05 -08:00
halcanary
1f17364dc8 bin/sync-and-gyp: gclient hackery
Review URL: https://codereview.chromium.org/1427183003
2015-11-02 10:22:43 -08:00
mtklein
1ee76510f5 Start making all .cpp files compile-able on all platforms.
I sometimes dream to hone our build process down to something as simple as
    $ find src -name '*.cpp' | xargs c++ <some cflags> -c -o skia.o

To start, it helps if we can compile all files on all platforms.  Each
non-portable file guards itself with defines provided by SkTypes.h.  This does
not convert all non-portable code, but it's a good representative chunk.

E.g. instead of having to remember which SkDebug_*.cpp to compile on which
platform we can just compile all three and let the code itself sort it out.

This has the nice side effect of making non-portable code declare the
conditions under which it can compile explicitly.

I've been testing mostly with the CMake build as it's easiest, but this should
apply equally to BUILD, Gyp, and GN files... to any build system really.

BUG=skia:4269
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/1411283005
2015-11-02 10:20:27 -08:00
fmalita
3f0424ff57 [SkDebugger] Remove unneeded SkDebuggerGUI includes
R=robertphillips@google.com,mtklein@google.com

Review URL: https://codereview.chromium.org/1411963006
2015-11-02 09:32:54 -08:00
mtklein
d1f7e354a1 SkRemote: all paint effects except typeface
Changes:
https://gold.skia.org/search2?issue=1408383007&unt=true&query=source_type%3Dgm&master=false&include=true

BUG=skia:

Review URL: https://codereview.chromium.org/1408383007
2015-11-02 09:08:17 -08:00
egdaniel
c8a66eb633 Fix assert in GrGLShaderBuilder regarding shader outputs
Fixes crashing bot.

BUG=skia:

Review URL: https://codereview.chromium.org/1408063009
2015-11-02 07:46:25 -08:00
caryclark
952ebfe228 path ops: fix fuzz-found divide by zero
TBR=reed@google.com
BUG=542391

Review URL: https://codereview.chromium.org/1427913005
2015-11-02 07:32:58 -08:00