Long lived SkImageHeap objects currently accumulate refs indefinitely.
This leads to massive memory leaks in the gpu-accelerated 2D canvas
code path. This CL does not implement a general fix for SkGPipe, but
it resolves the leak in SkDeferredCanvas (currently the only user
of SkGPipe) by resetting the image heap when the deferral queue is
flushed. This change also fixes the accounting of bytes allocated
by referenced images in order to trigger flushing heuristics
appropriately.
BUG=crbug.com/494148
Review URL: https://codereview.chromium.org/1145893007
Reason for revert:
breaking tests
Original issue's description:
> Fix dst bound reported by SkTileImageFilter
>
> In the example from the bug we had the filter DAG:
>
> color filter (table)
> 0: xfermode filter (arith)
> 0: tile filter [0,80,34,114] -> [0,80,800,480]
> 0: color filter (table)
> 0: bitmap src 34x34 -> [0,80,34,114]
> 1: color filter (table)
> 0: picture filter [0, 80, 800, 480]
>
> computeFastBounds was coming out of the DAG with a bound of [0,80,34,114] which didn't represent the pixels that would be drawn.
>
> This CL updates SkTileImageFilter to correctly set the bound for the pixels it will hit.
>
> BUG=493783
>
> Committed: https://skia.googlesource.com/skia/+/05be93bbdf09576f7903130e3b106b0a8c7c4b4eTBR=reed@google.com,senorblanco@google.com,senorblanco@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=493783
Review URL: https://codereview.chromium.org/1143083006
In the example from the bug we had the filter DAG:
color filter (table)
0: xfermode filter (arith)
0: tile filter [0,80,34,114] -> [0,80,800,480]
0: color filter (table)
0: bitmap src 34x34 -> [0,80,34,114]
1: color filter (table)
0: picture filter [0, 80, 800, 480]
computeFastBounds was coming out of the DAG with a bound of [0,80,34,114] which didn't represent the pixels that would be drawn.
This CL updates SkTileImageFilter to correctly set the bound for the pixels it will hit.
BUG=493783
Review URL: https://codereview.chromium.org/1152553006
Renames getInvariantOutput to getInvariantBlendedColor on GrXPFactory
and redefines it to not account for coverage conflation. This is the
information that all the callsites actually wanted to know.
BUG=skia:
Review URL: https://codereview.chromium.org/1161273005
Reason for revert:
seems to be breaking DEPS roll
FAILED: /b/build/goma/gomacc ../../third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -shared -Wl,--fatal-warnings -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -fuse-ld=gold -Wl,--no-undefined -Wl,--exclude-libs=libgcc.a -Wl,--exclude-libs=libc++_static.a -Wl,--exclude-libs=libvpx_assembly_arm.a -Wl,--icf=safe -Wl,--warn-shared-textrel -nostdlib --sysroot=/b/build/slave/android_chromium_gn/build/src/third_party/android_tools/ndk/platforms/android-14/arch-arm -Wl,--warn-shared-textrel -Wl,-O1 -Wl,--gc-sections -Wl,--as-needed -Wl,--version-script=/b/build/slave/android_chromium_gn/build/src/build/android/android_no_jni_exports.lst -L../../third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a -o ./libskia.so -Wl,-soname=libskia.so @./libskia.so.rsp && { /b/build/goma/gomacc ../../third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-readelf -d ./libskia.so | grep SONAME ; /b/build/goma/gomacc ../../third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-nm -gD -f p ./libskia.so | cut -f1-2 -d' '; } > ./libskia.so.tmp && if ! cmp -s ./libskia.so.tmp ./libskia.so.TOC; then mv ./libskia.so.tmp ./libskia.so.TOC; fi && mkdir -p lib.stripped && ../../third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip --strip-unneeded -o lib.stripped/libskia.so.tmp libskia.so && if ! cmp -s lib.stripped/libskia.so.tmp lib.stripped/libskia.so; then mv lib.stripped/libskia.so.tmp lib.stripped/libskia.so; fi
../../third_party/skia/src/ports/SkFontHost_FreeType.cpp:283: error: undefined reference to 'FT_Get_MM_Var'
../../third_party/skia/src/ports/SkFontHost_FreeType.cpp:302: error: undefined reference to 'FT_Set_Var_Design_Coordinates'
../../third_party/skia/src/ports/SkFontHost_FreeType.cpp:1766: error: undefined reference to 'FT_Get_MM_Var'
collect2: error: ld returned 1 exit status
Original issue's description:
> Remove SK_FREETYPE_HAS_MM.
>
> The SK_FREETYPE_HAS_MM define was added to delay the changes to
> support GX variation fonts on platforms which did not compile ftmm.c
> into their FreeType build. Now that all builds should have this file
> the define can be removed.
>
> Committed: https://skia.googlesource.com/skia/+/4f61fee53af956a8beb4c56fa6479cb6b1aa5159TBR=djsollen@google.com,bungeman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1148303005
The SK_FREETYPE_HAS_MM define was added to delay the changes to
support GX variation fonts on platforms which did not compile ftmm.c
into their FreeType build. Now that all builds should have this file
the define can be removed.
Review URL: https://codereview.chromium.org/1143133006
Added /infra directory, it will contain chrome-infra specific files, in
particular configs for chrome infra services.
/infra/project-config/cr-buildbucket.cfg defines buckets on
cr-buildbucket.appspot.com
R=borenet@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/1164633002
GrGpu, GrGLGpu, GrPathRendering, GrGLPathRendering all duplicated
each others' path rendering related member functions. Make
GrPathRending the logical extension of GrGpu by removing the methods
from GrGpu. Similarly to the GL variants.
Changes includes and forward declarations due to removing
GrDrawTarget.h include from GrGpu.h. This was necessary due to
GrDrawTarget.h including GrPathRendering.h, and now GrPathRendering.h
includes GrGpu.h. (Also GrGpu.h does not need GrDrawTarget.h anymore).
Very slight runtime improvement on x86_64:
desk_fontwipe.skp_1 836us -> 841us 1.01x
desk_silkfinance.skp_1 2.01ms -> 2.01ms 1x
desk_forecastio.skp_1 7.03ms -> 7.05ms 1x
desk_weather.skp_1 3.74ms -> 3.74ms 1x
desk_twitter.skp_1 8.02ms -> 8.01ms 1x
desk_mapsvg.skp_1 5.24ms -> 5.23ms 1x
desk_pokemonwiki.skp_1 7.06ms -> 7.03ms 1x
desk_sfgate.skp_1 3.19ms -> 3.17ms 1x
tabl_cuteoverload.skp_1 2.66ms -> 2.64ms 0.99x
...
tabl_transformice.skp_1 3.06ms -> 2.98ms 0.98x
tabl_googlecalendar.skp_1 11.3ms -> 11ms 0.97x
tabl_gamedeksiam.skp_1 12.8ms -> 12.4ms 0.97x
desk_samoasvg.skp_1 10.6ms -> 10.3ms 0.97x
tabl_worldjournal.skp_1 4.44ms -> 4.3ms 0.97x
Review URL: https://codereview.chromium.org/1157683006
Reason for revert:
gfx_unittests (under linux_asan)
@@@STEP_LOG_LINE@RenderTextTest.HarfBuzz_HorizontalPositions@Direct leak of 368 byte(s) in 1 object(s) allocated from:@@@
@@@STEP_LOG_LINE@RenderTextTest.HarfBuzz_HorizontalPositions@ #0 0x4cc74b in __interceptor_malloc (/b/build/slave/linux_asan/build/src/out/Release/gfx_unittests+0x4cc74b)@@@
@@@STEP_LOG_LINE@RenderTextTest.HarfBuzz_HorizontalPositions@ #1 0x7f2f7060ebdf in _cairo_image_surface_create_for_pixman_image /build/buildd/cairo-1.10.2/src/cairo-image-surface.c:158@@@
@@@STEP_LOG_LINE@RenderTextTest.HarfBuzz_HorizontalPositions@@@@
@@@STEP_LOG_LINE@RenderTextTest.HarfBuzz_HorizontalPositions@Indirect leak of 256 byte(s) in 1 object(s) allocated from:@@@
@@@STEP_LOG_LINE@RenderTextTest.HarfBuzz_HorizontalPositions@ #0 0x4cc74b in __interceptor_malloc (/b/build/slave/linux_asan/build/src/out/Release/gfx_unittests+0x4cc74b)@@@
@@@STEP_LOG_LINE@RenderTextTest.HarfBuzz_HorizontalPositions@ #1 0x7f2f6c7be26a in _pixman_image_allocate /build/buildd/pixman-0.30.2/build/pixman/../../pixman/pixman-image.c:184@@@
@@@STEP_LOG_LINE@RenderTextTest.HarfBuzz_HorizontalPositions@@@@
I think they are creating a cairo surface, but it has no pixels (zero size?). In this CL, if I see no pixels, I ignore the call-back which is used to free the surface (doh).
Original issue's description:
> Revert[4] of add asserts around results from requestLock
>
> This reverts commit 19663e54c0.
>
> BUG=skia:
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/df91b73a34e3a306c93a5e320704736255c3d9f0TBR=reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1151063005
Reason for revert:
asserts in ui/gfx unittests (need to investigate why)
[ RUN ] RenderTextTest.SelectionKeepsLigatures
[14602:14602:0529/134016:16779526944:INFO:SkPixelRef.cpp(164)] ../../third_party/skia/src/core/SkPixelRef.cpp:164: failed assertion "pixels"
Original issue's description:
> add asserts around results from requestLock and lockPixels, ensuring that true always means we have non-null pixels (and non-null colortable if that matches the colortype)
>
> BUG= 491975
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/f941a68126d8fe647eaea902c244c466568b7809TBR=scroggo@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 491975
Review URL: https://codereview.chromium.org/1159013006
This test font contains
☓ U+2613 SALTIRE
⬛ U+2B1B BLACK LARGE SQUARE
⬜ U+2B1C WHITE LARGE SQUARE
All at full EM size (with standard amount above and below the
baseline).
Review URL: https://codereview.chromium.org/1134153002