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
An additional positive of this CL is that GrGLShaderBuilder is now GL independent besides GrGLProgramBuilder
BUG=skia:
Review URL: https://codereview.chromium.org/1431433003
Some Skia classes use SkTRegistry, which requires the source files be linked in order to be registered.
Also replace "*CG*" with "SkImageDecoder_CG.cpp" for clarity.
BUG=skia:
Review URL: https://codereview.chromium.org/1405023013
These are benches similar to the imagefilterscropexpand GM: an
input filter is cropped to a smaller size, then the blur is re-expanded
out to a larger size.
BUG=skbug:4502
Review URL: https://codereview.chromium.org/1412373004
The utility SubsetPath removes parts of a potentially very large path to isolate a minimal test case. SubsetPath is very useful for debugging path ops, but is not path ops specific.
PathOpsBuilderConicTest compares the output of the Path Ops Builder, sequential calls to Simplify, and SkRegions for some number of rotated ovals.
Some tests caused path ops to hang. It was caught adding a loop of curves because the head was not found by the tail. Even though the root cause has been fixed, SkSegment::addCurveTo callers now abort the path op if the same curve was added twice.
The subdivided conic weight was been computed anew. Fortunately, it's a simpler computation that the one it replaces.
Some Simplify() subroutines returned false to signal that the results needed assembling. Change these to abort the current operation instead.
Coincident curve intersection triggered two small bugs; one where no perpendicular could be found for coincident curves, and one where no coincident curves remain after looping.
The SixtyOvals test can be run through multiple processes instead of multiple threads. This strategy allows a 48 core machine to saturate all cores at 100%.
The DEBUG_VISUALIZE_CONICS code in PathOpsConicIntersectionTest acknowleges that it is easier to visualize conics with Skia than with script and html canvas. This test also verifies that path ops subdivision matches geometry chopping.
TBR=reed@google.com
Review URL: https://codereview.chromium.org/1405383004
Follow up to https://codereview.chromium.org/1418073005/ (Remove gpu-side clip mask merging from clip mask manager).
The path renderer chain is only ever allocated when it is about to be used (so the delayed initialization doesn't buy us anything).
We can now reduce the lifetime of the pipelineBuilder in createAlphaClipMask
Review URL: https://codereview.chromium.org/1416113006
Use DumpStackTrace in SkASSERT in GOOGLE3.
There are extra assertions enabled in debug mode that cause RecordDraw_TextBounds to fail.
New include causes a naming conflict with global name "base".
Corresponding internal cl/106495354
No public API changes.
TBR=reed@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/1423013004
Logically this CL:
Moves the PathRendererChain from GrContext to GrDrawManager
- this was needed to untangled the Path-Chain/Renderer header mess
- this entailed adding getDrawingMgr so the CMM could access the PathRenderingChain
- this also entailed re-adding freeGpuResources to the GrDrawingMgr
Moves the CanDrawArgs struct up stack
Removes the GrPipelineBuilder from the CanDrawArgs struct
Review URL: https://codereview.chromium.org/1407883004
The unrotated CTFont was introduced to fix color emoji scaling.
Use only the unrotated CTFont and apply the rotations manually.
This allows removal of one CTFont and allows us to apply (correctly)
the transformation CoreText would otherwise need to apply
(which it appears to do inconsistently).
Review URL: https://codereview.chromium.org/1360663002
Recent changes to WallTimer broke --samplingTime. In particular, this idiom became nonsensical:
WallTimer timer;
timer.start();
do {
...
timer.end();
} while(timer.fWall < ...);
WallTimer started making private use of fWall between when start() and end() were called, so the second time around the loop we end up with nonsense.
If that makes no sense, don't worry. The code here using now_ms() is just as fast, just as precise, and clearer.
I took the opportunity to simplify --samplingTime <complicated string parsing> to --ms <int>, and to simplify the code that depends on it.
BUG=skia:
Review URL: https://codereview.chromium.org/1419103004
For optimizing saveLayer() offscreens, it is useful to know the
bounds of the primitive being drawn. Currently, the bounds passed to
saveLayer() are filtered, which makes it difficult to know the original
bounds of the primitive. This CL changes the semantics to accept
unfiltered bounds. This actually simplifies the callsites too. In
order to result in the correct pixels being produced, we then call
computeFastBounds() inside clipRectBounds().
The old behaviour is wrapped in #ifdef SK_SAVE_LAYER_BOUNDS_ARE_FILTERED,
until we can update Chrome's callsites (see
https://codereview.chromium.org/1316243002/).
This change will affect the following GMs:
testimagefilters: saveLayer bounds no longer cause clipping
imagefiltersbase: slight pixel diffs
resizeimagefilter: slight pixel diffs on the "high quality" test case
imagefilterscropexpand: displacement results are now correct
filterfastbounds: slight pixel diffs
matriximagefilter: slight pixel diffs
BUG=skia:3194 skia:4526
Review URL: https://codereview.chromium.org/1304883004
In the clip mask merging path, the CMM creates new renderTargets and draws to them. In the non-MDB world this is okay b.c. all the draws land in the same drawTarget anyway. In the MDB world the draws for the new renderTargets have to land in different drawTargets.
This can be resolved by a lot of plumbing and refactoring to create drawContexts for the created renderTargets or by removing the mask-merging drawing path.
Since, https://codereview.chromium.org/1424853002/ (Disable gpu-side clip mask merging in the clip mask manager), appears to have stuck, this CL removes the clip mask merging code.
BUG=skia:4094
BUG=skia:4519
Review URL: https://codereview.chromium.org/1418073005
This gives ~15% improvement on blur_image on Linux Z620,
and should allow me to implement cropping without
incurring a perf hit.
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/1426583004
This makes it consistent with Linux/Mac. There, stderr is not buffered, so the flush is not needed / implicit.
BUG=skia:
Review URL: https://codereview.chromium.org/1419073003