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=falseTBR=reed@google.com
Review URL: https://codereview.chromium.org/1430593007
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
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
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
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
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
Updates setColocatedSampleLocations to use glFramebufferParameteri when
the DSA version glNamedFramebufferParameteri is not present.
BUG=skia:
Review URL: https://codereview.chromium.org/1415503008
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
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
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
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
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/+/1b82ceb737c73327412f2e8a91748481e1aec9e4TBR=mtklein@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4502, skia:4526
Review URL: https://codereview.chromium.org/1428053002
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
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
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