SkFAIL is a legacy macro which is just SK_ABORT. This CL mechanically
changes uses of SkFAIL to SK_ABORT in preparation for its removal. The
related sk_throw macro will be changed independently, due to needing to
actually clean up its users.
Change-Id: Id70b5c111a02d2458dc60c8933f444df27d9cebb
Reviewed-on: https://skia-review.googlesource.com/35284
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Some renames, comments, and override->final
Change-Id: Iebc7aeee9a64021e958f76bf4278ffff56884a56
Reviewed-on: https://skia-review.googlesource.com/35165
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Change 3b5a3fa8b1 introduced support
for out-of-range intersections, which is necessary when the top and
bottom vertices of an edge differ by only one ULP in the primary sort
order and can't be split in-order.
However, some out-of-range intersections produce edges which cancel
each other out on splitting, in particular when the intersection is
collinear with the newly-computed edge. This undoes the effect of the
split. The tessellator then rewinds, re-detects the intersection, resplits,
an infinite loop.
The fix is to check for out-of-range intersections which are also
collinear, and ignore them. This is ok, because these are not
the cases we care about it change 3b5a3f above, which are
never collinear.
Bug: 753867
Change-Id: I590231e0e6f19c98f1ccf46cb7acc8a63ba35a9d
Reviewed-on: https://skia-review.googlesource.com/34925
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
This reverts commit c667dff58d.
Reason for revert: temporary while I fix Android, Google3.
Original change's description:
> Turn on exceptions in test tools.
>
> This allows us to test things that, e.g., throw std::bad_alloc.
>
> Change-Id: I6409159b89f1d93d403b1a1f40539cf2531a8b68
> Reviewed-on: https://skia-review.googlesource.com/34982
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
TBR=mtklein@chromium.org,herb@google.com
Change-Id: Iafdc34c5f70f99f7df3cd0bbad65eed0828453a1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/35081
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This allows us to test things that, e.g., throw std::bad_alloc.
Change-Id: I6409159b89f1d93d403b1a1f40539cf2531a8b68
Reviewed-on: https://skia-review.googlesource.com/34982
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This reverts commit 0bc4d60fe0.
Reason for revert: https://chromium-swarm.appspot.com/task?id=38007b6df51fef10&refresh=10
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Caught signal 6 [Aborted], was running:
8888 image scanline_kNonNative_premul interlaced3.png
unit test ArenaAllocReallyBigAlloc
unit test ClampRange
565 image scaled_codec_premul_0.200 interlaced3.png_0.200
unit test ClipStack
Likely culprit:
unit test ArenaAllocReallyBigAlloc
Stack trace:
/mnt/pd0/s/w/ir/out/Debug/dm(+0x2381c1) [0x567aa1c1]
linux-gate.so.1(__kernel_sigreturn+0) [0xf770cca0]
linux-gate.so.1(__kernel_vsyscall+0x9) [0xf770cc89]
/lib/i386-linux-gnu/libc.so.6(gsignal+0xb0) [0xf7027dc0]
/lib/i386-linux-gnu/libc.so.6(abort+0x157) [0xf7029287]
/usr/lib/i386-linux-gnu/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x16f) [0xf729d2ff]
/usr/lib/i386-linux-gnu/libstdc++.so.6(+0x71ea4) [0xf729aea4]
/usr/lib/i386-linux-gnu/libstdc++.so.6(+0x71f1d) [0xf729af1d]
/usr/lib/i386-linux-gnu/libstdc++.so.6(__cxa_rethrow+0) [0xf729b1d0]
/usr/lib/i386-linux-gnu/libstdc++.so.6(+0x727ff) [0xf729b7ff]
/usr/lib/i386-linux-gnu/libstdc++.so.6(_Znaj+0x18) [0xf729b898]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZN12SkArenaAlloc11ensureSpaceEjj+0xa0) [0x56f113a6]
/mnt/pd0/s/w/ir/out/Debug/dm(+0x3c2462) [0x56934462]
/mnt/pd0/s/w/ir/out/Debug/dm(+0x239acb) [0x567abacb]
/mnt/pd0/s/w/ir/out/Debug/dm(+0x239bdc) [0x567abbdc]
/mnt/pd0/s/w/ir/out/Debug/dm(+0xa6417b) [0x56fd617b]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZNKSt8functionIFvvEEclEv+0x20) [0x56f10504]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZN12SkThreadPool4LoopEPv+0x298) [0x56f10bdb]
/mnt/pd0/s/w/ir/out/Debug/dm(+0xb39700) [0x570ab700]
/lib/i386-linux-gnu/libpthread.so.0(+0x627a) [0xf76df27a]
/lib/i386-linux-gnu/libc.so.6(clone+0x66) [0xf70e3b56]
Aborted
Command exited with code 134
Original change's description:
> Fix bogus math in object allocation.
>
> When a size_t is convert from a very large number to ptrdiff_t, it
> becomes negative causing the existing block to be used instead of
> allocating a new block.
>
> BUG=chromium:744109
>
> Change-Id: I0bf98e3fb924851c162f6eca43d29a3f40dc9eaa
> Reviewed-on: https://skia-review.googlesource.com/34541
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
TBR=bungeman@google.com,herb@google.com
Change-Id: I8ce2b45d13178395247dabd7af6853354399721c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:744109
Reviewed-on: https://skia-review.googlesource.com/35000
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
When a size_t is convert from a very large number to ptrdiff_t, it
becomes negative causing the existing block to be used instead of
allocating a new block.
BUG=chromium:744109
Change-Id: I0bf98e3fb924851c162f6eca43d29a3f40dc9eaa
Reviewed-on: https://skia-review.googlesource.com/34541
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Bug: skia:
Change-Id: Ifbccc6d6880522177ac7a0ae2183be64a3ebfe50
Reviewed-on: https://skia-review.googlesource.com/34681
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
On desktop, this saves just over 5% of the time in the SkSL compiler.
As written, the code will now build either way, so it's much easier to
switch back (or even have some platforms use SkString, if that's ever
required).
Bug: skia:
Change-Id: I634f26a4f6fcb404e59bda6a5c6a21a9c6d73c0b
Reviewed-on: https://skia-review.googlesource.com/34381
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
We can record multiple frames in an .skp by recording SkCanvas::flush().
This should make SkPictures, SkLiteDL, and .skp files all record flush().
Change-Id: I6cf6e0e4ef993530d9f92fa168a53702ffce7d5e
Reviewed-on: https://skia-review.googlesource.com/34081
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
We use SK_SUPPORT_LEGACY_DELTA_AA to guard the golden image change.
Such flag is defined for Android, Chrome, and Google3 so our auto-rollers
should all be OK.
TBR: bungeman@google.com
Bug: skia:6947
Change-Id: Ic2705e82f4f7f15ec08499254dce75b93d41727e
Reviewed-on: https://skia-review.googlesource.com/33762
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
Do multiply (mul) and add while tracking that the
calculation does not overflow, which can be checked with
ok().
The new unit test shows a couple examples.
Author: Herb Derby <herb@google.com>
Change-Id: I7e67671d2488d67f21d47d9618736a6bae8f23c3
Reviewed-on: https://skia-review.googlesource.com/33721
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Herb Derby <herb@google.com>
We only need to clip a temporary x to ensure that we don't blit
beyond clip. Storing such clipped x is problematic because it
may make our edges unsorted.
The added unit test would fail without this fix.
Bug: skia:6947
Change-Id: I6c21d7c7c097e50fef18ab151921d6c07c089318
Reviewed-on: https://skia-review.googlesource.com/33420
Commit-Queue: Yuqian Li <liyuqian@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Change-Id: I985e54a071338e99292a5aa2f42c92bc115b4008
Reviewed-on: https://skia-review.googlesource.com/32760
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Also makes paint clones use cloned fragment processors.
Change-Id: I60efcfc6a46a4f8430a72f4d1ec79c7d99fbe593
Reviewed-on: https://skia-review.googlesource.com/33084
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This reverts commit 0f450acd76.
Bug: skia:
Change-Id: I97428fbbc6d82bf8b186ec5fdbf1a939c00e4126
Reviewed-on: https://skia-review.googlesource.com/32726
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit 175af0d011.
Reason for revert: Chrome doesn't know about portable format specifiers. Sigh.
Original change's description:
> GrContext::dump that produces JSON formatted output
>
> Includes caps, GL strings, and extensions
>
> Bug: skia:
> Change-Id: I1e8b3dd50fb68357f9de8ca6149cf65443d027ef
> Reviewed-on: https://skia-review.googlesource.com/32340
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,brianosman@google.com
Change-Id: Ie280b25275725f0661da7541f54ed62897abb82f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/32861
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Includes caps, GL strings, and extensions
Bug: skia:
Change-Id: I1e8b3dd50fb68357f9de8ca6149cf65443d027ef
Reviewed-on: https://skia-review.googlesource.com/32340
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
rects are already auto-vectorized, so no need to explicitly write a 4f version of SkRect::round()
Bug: skia:
Change-Id: I098945767bfcaa7093d770c376bd17ff3bdc9983
Reviewed-on: https://skia-review.googlesource.com/32060
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
- Bring back some previously deleted macros and helper types.
- Automatically inject base_type information into snapshot events,
to allow simpler tracking of polymorphic object types.
- Fix JSON formatting of pointer values (they were serializing as bool).
Bug: skia:
Change-Id: Iac7803f72ce5396ffd2fbcb5a36d76745c5e3f3e
Reviewed-on: https://skia-review.googlesource.com/28220
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
My next step is to change the uniform_color context to
struct {
float r,g,b,a;
uint32_t rgba;
};
so that it's trivial to load in both float and 8-bit pipelines.
Change-Id: If9bdde353ced3bf9eb0c63204b4770ed614ad16b
Reviewed-on: https://skia-review.googlesource.com/30481
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Change-Id: I34cf12b2aa16b2441b9e57162cbaee1444f42c52
Reviewed-on: https://skia-review.googlesource.com/29607
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit cc8eb60c48.
Reason for revert: Chrome change landed that should fix chrome roll
Original change's description:
> Revert "Revert "Revert "Add support for semaphores to be inserted on GrContext flush"""
>
> This reverts commit 876aed8758.
>
> Reason for revert: the bots seem to be unhappily red with this CL
>
> Original change's description:
> > Revert "Revert "Add support for semaphores to be inserted on GrContext flush""
> >
> > This reverts commit 8724b46099.
> >
> > Reason for revert: Creating a test CL to see what happens on the bots
> >
> > Original change's description:
> > > Revert "Add support for semaphores to be inserted on GrContext flush"
> > >
> > > This reverts commit cd1416efbc.
> > >
> > > Reason for revert: speculative, to try to fix roll see gpu_tests.pixel_integration_test.PixelIntegrationTest.Pixel_GpuRasterization_ConcavePaths
> > >
> > > Original change's description:
> > > > Add support for semaphores to be inserted on GrContext flush
> > > >
> > > > This also moves the logic of inserting semaphores down into GrDrawingManager
> > > > and finishFlush on GrGpu. With it being on finishFlush, there should be no
> > > > issues when the DrawingManager starts respecting the proxy passed in assuming
> > > > it always calls finishFlush at the end (which it should).
> > > >
> > > > Bug: skia:
> > > > Change-Id: I925c2a289dcbbb9159b9120878af1d34f21a2dc7
> > > > Reviewed-on: https://skia-review.googlesource.com/25641
> > > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > >
> > > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
> > >
> > > Change-Id: I9c5b9cf8c060193e1861dbb8f0c10fb11dfb5249
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: skia:
> > > Reviewed-on: https://skia-review.googlesource.com/25980
> > > Reviewed-by: Mike Reed <reed@google.com>
> > > Commit-Queue: Mike Reed <reed@google.com>
> >
> > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reed@google.com
> >
> > # Not skipping CQ checks because original CL landed > 1 day ago.
> >
> > Bug: skia:
> > Change-Id: I5edbeaa0769670ee58f362f0ccaa78319410aa6c
> > Reviewed-on: https://skia-review.googlesource.com/26160
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reed@google.com
>
> Change-Id: I22fd6febafe70489a5fdb695c6f4263368eb423d
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/29422
> Reviewed-by: Yuqian Li <liyuqian@google.com>
> Commit-Queue: Yuqian Li <liyuqian@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,liyuqian@google.com,reed@google.com
Change-Id: Ie3eae818b02599a70f714ef6b6635ce7d171bde6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/30000
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This reverts commit 93061b5344.
Reason for revert: bot failures
Original change's description:
> support for 'half' types in sksl, plus general numeric type improvements
>
> Bug: skia:
> Change-Id: Id285262fda8291847f11343d499b5df62ddb4b09
> Reviewed-on: https://skia-review.googlesource.com/28980
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
TBR=bsalomon@google.com,ethannicholas@google.com
Change-Id: Ie8672271d35b9fcdf567f8bc3674084748be66ad
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/29600
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
If we were doing this math with real numbers or even just doubles, these
clamps wouldn't be necessary. But we're favoring speed over accuracy
here when we emulate fmod() and some of those inaccuracies end up with
values outside the [0,tile) range, negative!
To keep the spirit of fast over 100% accurate, I've just added a safety
clamp to 0. The case in the unit test now returns 0 where it should
really return something like 7 or 8, but at least we won't try to read
_way_ outside the image buffer.
BUG=chromium:749260
Change-Id: Ifc5cfe69798beccbb2a16547510158576e06eb3a
Reviewed-on: https://skia-review.googlesource.com/29580
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This reverts commit 876aed8758.
Reason for revert: the bots seem to be unhappily red with this CL
Original change's description:
> Revert "Revert "Add support for semaphores to be inserted on GrContext flush""
>
> This reverts commit 8724b46099.
>
> Reason for revert: Creating a test CL to see what happens on the bots
>
> Original change's description:
> > Revert "Add support for semaphores to be inserted on GrContext flush"
> >
> > This reverts commit cd1416efbc.
> >
> > Reason for revert: speculative, to try to fix roll see gpu_tests.pixel_integration_test.PixelIntegrationTest.Pixel_GpuRasterization_ConcavePaths
> >
> > Original change's description:
> > > Add support for semaphores to be inserted on GrContext flush
> > >
> > > This also moves the logic of inserting semaphores down into GrDrawingManager
> > > and finishFlush on GrGpu. With it being on finishFlush, there should be no
> > > issues when the DrawingManager starts respecting the proxy passed in assuming
> > > it always calls finishFlush at the end (which it should).
> > >
> > > Bug: skia:
> > > Change-Id: I925c2a289dcbbb9159b9120878af1d34f21a2dc7
> > > Reviewed-on: https://skia-review.googlesource.com/25641
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> >
> > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
> >
> > Change-Id: I9c5b9cf8c060193e1861dbb8f0c10fb11dfb5249
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: skia:
> > Reviewed-on: https://skia-review.googlesource.com/25980
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Mike Reed <reed@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reed@google.com
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: skia:
> Change-Id: I5edbeaa0769670ee58f362f0ccaa78319410aa6c
> Reviewed-on: https://skia-review.googlesource.com/26160
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reed@google.com
Change-Id: I22fd6febafe70489a5fdb695c6f4263368eb423d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/29422
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
This reverts commit 8724b46099.
Reason for revert: Creating a test CL to see what happens on the bots
Original change's description:
> Revert "Add support for semaphores to be inserted on GrContext flush"
>
> This reverts commit cd1416efbc.
>
> Reason for revert: speculative, to try to fix roll see gpu_tests.pixel_integration_test.PixelIntegrationTest.Pixel_GpuRasterization_ConcavePaths
>
> Original change's description:
> > Add support for semaphores to be inserted on GrContext flush
> >
> > This also moves the logic of inserting semaphores down into GrDrawingManager
> > and finishFlush on GrGpu. With it being on finishFlush, there should be no
> > issues when the DrawingManager starts respecting the proxy passed in assuming
> > it always calls finishFlush at the end (which it should).
> >
> > Bug: skia:
> > Change-Id: I925c2a289dcbbb9159b9120878af1d34f21a2dc7
> > Reviewed-on: https://skia-review.googlesource.com/25641
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
>
> Change-Id: I9c5b9cf8c060193e1861dbb8f0c10fb11dfb5249
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/25980
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reed@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: skia:
Change-Id: I5edbeaa0769670ee58f362f0ccaa78319410aa6c
Reviewed-on: https://skia-review.googlesource.com/26160
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This reverts commit df0e09feac.
Reason for revert: Experimental revert to see if this is blocking the roll
Original change's description:
> Remove origin field from GrSurface
>
> This mainly consists of rm origin from GrSurface and the wrapBackEnd*
> methods and then re-adding an explicit origin parameter to all the
> GrGpu methods that need it.
>
> Change-Id: Iabd79ae98b227b5b9409f3ab5bbcc48af9613c18
> Reviewed-on: https://skia-review.googlesource.com/26363
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
TBR=bsalomon@google.com,robertphillips@google.com
Change-Id: Id606aa01e84e2b83be71d833eefca477c1ad0d01
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/29220
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This mainly consists of rm origin from GrSurface and the wrapBackEnd*
methods and then re-adding an explicit origin parameter to all the
GrGpu methods that need it.
Change-Id: Iabd79ae98b227b5b9409f3ab5bbcc48af9613c18
Reviewed-on: https://skia-review.googlesource.com/26363
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:6880
Change-Id: Ia8b94e52eec3feb5104d2351bf7a7e6f99101deb
Reviewed-on: https://skia-review.googlesource.com/26370
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Also adds testing of copying ImageStorageAccess and ref counts of proxies held by cloned FPs.
Change-Id: Ia23220bf65b4df83d1c874b46d8525cc3540f716
Reviewed-on: https://skia-review.googlesource.com/28004
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
https://skia-review.googlesource.com/c/26363 (Remove origin field from GrSurface) is
already too large. This pulls some of the cosmetic changes out for separate review.
Change-Id: I1d8b95522144b2f4cbd916ef38faa3dde6f78087
Reviewed-on: https://skia-review.googlesource.com/27840
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Change-Id: I71cf04b12be95a54b7fb47d048ba1f8672ed9a8f
Reviewed-on: https://skia-review.googlesource.com/27760
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
This reverts commit a4ce4b1f6b.
Fix SkPathRef deserialization malloc crash
If the path says it has more points/verbs/etc than the buffer could
be holding, then resetToSize could try to allocate something huge
and crash.
Bug: skia:
Change-Id: I23b8870e9f74386aca89fb8f9a60d3b452044094
Reviewed-on: https://skia-review.googlesource.com/26805
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
In a future world where GrSurface no longer has an origin it will be
useful for the GrPipeline to be holding the GrRenderTargetProxy (which will
still have an origin).
Change-Id: I743a8cc07b6b92f8116227fb77b7c37da43cde8a
Reviewed-on: https://skia-review.googlesource.com/26804
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit df6660f64e.
Reason for revert: crashing dm on android and windows
Original change's description:
> Fix SkPathRef deserialization malloc crash
>
> If the path says it has more points/verbs/etc than the buffer could
> be holding, then resetToSize could try to allocate something huge
> and crash.
>
> Change-Id: I40e8db87e4f61abb23217281ab0365c6af222fa3
> Reviewed-on: https://skia-review.googlesource.com/24802
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
TBR=bungeman@google.com,reed@google.com,enne@chromium.org
Change-Id: I06fa89c05b785652b097ae04e7ebc001a7c176b2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/26944
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
If the path says it has more points/verbs/etc than the buffer could
be holding, then resetToSize could try to allocate something huge
and crash.
Change-Id: I40e8db87e4f61abb23217281ab0365c6af222fa3
Reviewed-on: https://skia-review.googlesource.com/24802
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
- Remove one especially chatty event, and one pointless test
- Use TRACE_FUNC everywhere, rather than manual strings
Bug: skia:
Change-Id: Icb795294009150ca9a260436738d79546a733337
Reviewed-on: https://skia-review.googlesource.com/26701
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
I was going to be clever here and only clamp when we
know the inputs are out of range, but this filter is
rare and slow enough that I think I'd rather it just
be super paranoid safe.
The test crashes without this fix and passes with it.
Change-Id: I4e17aad2b5c1e96180ce8d73b97bee746cf985c2
Reviewed-on: https://skia-review.googlesource.com/26702
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Bug: skia:
Change-Id: I8c0abf16d5eb366cdc5296f8df9f33cc0e8f4cc4
Reviewed-on: https://skia-review.googlesource.com/26662
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Improve GrGLNonlinearColorSpaceXformEffect to correctly implement
scRGB transfer function and allow for negative colors.
Relax SkSurface_Gpu::Valid to allow kRGBA_half_GrPixelConfig
render target without a color space needed for legacy blending on
Android.
Bug: b/62347704
Change-Id: Ibc6144e69c26cdbdcbf29348c4f612fb6b639e01
Reviewed-on: https://skia-review.googlesource.com/26143
Commit-Queue: Stan Iliev <stani@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Will need guards for android (at least)
Bug: skia:
Change-Id: I2bb8e656997984489ef1f2e41cd3d301c4e7b947
Reviewed-on: https://skia-review.googlesource.com/26040
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
We occasionally make copies of GrPaints. clone() fill facilitate this case when GrFragmentProcessors are non-shareable..
Change-Id: I004e34f6ce8c293f9e0664d26532e44bd6b9fdff
Reviewed-on: https://skia-review.googlesource.com/26360
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Change-Id: I562d438bd65e9fd900cfc6831f971b4af25c8ae6
Reviewed-on: https://skia-review.googlesource.com/26361
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This is part of setting the stage for moving GrFragmentProcessor to unique_ptr ownership.
Change-Id: I2dfb4977319605d56c4debe05ff0b3dc970bb4c5
Reviewed-on: https://skia-review.googlesource.com/26141
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This reverts commit cd1416efbc.
Reason for revert: speculative, to try to fix roll see gpu_tests.pixel_integration_test.PixelIntegrationTest.Pixel_GpuRasterization_ConcavePaths
Original change's description:
> Add support for semaphores to be inserted on GrContext flush
>
> This also moves the logic of inserting semaphores down into GrDrawingManager
> and finishFlush on GrGpu. With it being on finishFlush, there should be no
> issues when the DrawingManager starts respecting the proxy passed in assuming
> it always calls finishFlush at the end (which it should).
>
> Bug: skia:
> Change-Id: I925c2a289dcbbb9159b9120878af1d34f21a2dc7
> Reviewed-on: https://skia-review.googlesource.com/25641
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
Change-Id: I9c5b9cf8c060193e1861dbb8f0c10fb11dfb5249
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/25980
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This also moves the logic of inserting semaphores down into GrDrawingManager
and finishFlush on GrGpu. With it being on finishFlush, there should be no
issues when the DrawingManager starts respecting the proxy passed in assuming
it always calls finishFlush at the end (which it should).
Bug: skia:
Change-Id: I925c2a289dcbbb9159b9120878af1d34f21a2dc7
Reviewed-on: https://skia-review.googlesource.com/25641
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This reverts commit 467022b186.
Reason for revert: GrAHardwareBufferImageGenerator.cpp
Original change's description:
> Reduce dependence on GrSurface's origin field
>
> Unfortunately, GrGPU and its ilk are still using the GrSurface's origin a lot. I will clean that up in a second CL.
>
> Change-Id: Iba729440ce8ea8d24bb7f4e5de55ed576a0f176d
> Reviewed-on: https://skia-review.googlesource.com/24700
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,robertphillips@google.com
Change-Id: I1b3f5c3b82d250ac164beb1d5c83abb6c3c6ab3b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/25620
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Unfortunately, GrGPU and its ilk are still using the GrSurface's origin a lot. I will clean that up in a second CL.
Change-Id: Iba729440ce8ea8d24bb7f4e5de55ed576a0f176d
Reviewed-on: https://skia-review.googlesource.com/24700
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
[√] convert all stages to use SkJumper_MemoryCtx / be 2d-compatible
[√] convert compile to 2d also, remove 1d run/compile
[√] convert all call sites
[√] no diffs
Change-Id: I3b806eb8fe0c3ec043359616409f7cd1211a1e43
Reviewed-on: https://skia-review.googlesource.com/24263
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
This is mostly dead code.
In order to make it truly dead, we need to opt drawing unpremul images
into SkRasterPipelineBlitter. They had been handled by
SkLinearBitmapPipeline, but can't be draw by SkBitmapProcLegacyShader.
Drawing unpremul images is tested by the GM all_variants_8888, which
gave us trouble last time around (serialize-8888 drew right, 8888 wrong)
but now draws fine. I think this was probably also the root of the
revert, drawing some unpremul image in Chrome's tests somewhere.
Change-Id: I453f9df44ade807316935921cbae82961e2f08aa
Reviewed-on: https://skia-review.googlesource.com/24862
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Instead of query and maxSampleCount and using that to cap, we now have
each config store its supported values and when requested returns either
the next highest or equal supported value, or if non the max config supported.
Bug: skia:
Change-Id: I8802d44c13b3b1703ee54a7e69b82102d4b8dc2d
Reviewed-on: https://skia-review.googlesource.com/24302
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Previously, we reported the first image as soon as it was available. As
a result, in crrev.com/2565323003, InitializeNewFrame might be called
before the metadata is known, meaning it would read the wrong metadata.
Instead of looking at the imagesCount(), SkGifCodec::NewFromStream looks
at frameContext(0), which may still exist even if it's not yet counted
in imagesCount().
Add a test that confirms the desired behavior.
Change-Id: Ib392721ecd2218ba0fcd35aaa64117c0ba3e4ea6
Reviewed-on: https://skia-review.googlesource.com/24405
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
gather_i8 is now unused, so we can remove it.
That in turn makes the ctable field of SkJumper_GatherCtx unused.
After removing ctable, SkJumper_GatherCtx and SkJumper_PtrStride look
identical, so I've now fused them into SkJumper_MemoryCtx, which will
eventually be used by everything loading from, gathering from, or
storing to memory.
Change-Id: Ia882d2dbd54c9fcf9a8250a1ce83304389dd284a
Reviewed-on: https://skia-review.googlesource.com/24085
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
- Add run_2d(x,y,w,h) and start_pipeline_2d().
- Add and test a 2d-compatible store_8888_2d stage.
Change-Id: Ib9c225d1b8cb40471ae4333df1d06eec4d506f8a
Reviewed-on: https://skia-review.googlesource.com/24401
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Needs google3 to be updated before this can land.
Bug: skia:6828
Change-Id: I2c16be13c6937ffa48768cc24f9f980171c824d6
Reviewed-on: https://skia-review.googlesource.com/23940
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Change-Id: I395e3387df44cf5370fef6ab73db73228225622f
Reviewed-on: https://skia-review.googlesource.com/23946
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Update NewFromStream to report an error on failure to create an
SkCodec, so that a client can distinguish between
- not enough data
- invalid data
In Chromium, this will allow blink::ImageDecoder to call SetFailed if
the stream is invalid early and we never create an SkCodec. Without
this, ImageDecoder will keep trying to create an SkCodec when it
receives more data.
Change-Id: I4f505c56d91c982be36a828fd0f7db17b1596588
Reviewed-on: https://skia-review.googlesource.com/22642
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Chris Blume <cblume@chromium.org>
Fixes the threshold logic for "0 ~= d1 && 0 ~= d2".
Previously, if d1 and d2 were both near zero, but on opposite sides
of the threshold, the curve could be misclassified as kCuspAtInfinity
and drawn incorrectly.
Bug: skia:
Change-Id: I65f30ddebf0a4a0b933610d8cc1a2f489efc99e4
Reviewed-on: https://skia-review.googlesource.com/22400
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Previously, if ReadHeader returned false, it deleted the input stream.
But there are a couple of cases where ReadHeader creates an SkCodec and
then returns false. The SkCodec deletes the stream, and then so does
NewFromStream.
Make sure that we do not double delete by only deleting if no SkCodec
was created.
Add a test, so such a double delete will be caught by the bots.
Bug: b/37623797
Change-Id: I787422c9af58f0b92ad9e9ef9ad87c54a12f5e31
Reviewed-on: https://skia-review.googlesource.com/23620
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
We're currently adding picture shader cache entries to the resource
cache, but we don't ever purge. To avoid exhausting the budget, add
logic to associate cached entries with their owning picture shader, and
purge when the shader is deleted.
-- Side note --
The current cache key is
K(pictureID, ...)
so technically the cache entries are associated with the picture, not the
shader. One could resonably argue we should only purge when the
*picture* is deleted. Unfortunately, this doesn't work: the cache entries
contain indirect refs to the picture (SkImageShader -> SkImage_Generated
-> SkPictureImageGenerator -> SkPicture), so the picture is always kept
alive.
Associating the cache entries with the shader itself seems like a
reasonable alternative, even if we give up some cache persistence in the
process.
Change-Id: Ia115dbb5ae627e5ee171da7c4430fecfd42f4292
Reviewed-on: https://skia-review.googlesource.com/23380
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Bug: skia:
Change-Id: I84dbd56c17d4856496af4491f340ec560e29c8a6
Reviewed-on: https://skia-review.googlesource.com/23200
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
If the bounds of the blob are empty, we will request a zero-sized surface
which will fail. Just check for that.
Only expect this if the typeface is empty (e.g. faked out for testing)
Bug: skia:
Change-Id: Idcac0e9d4e2a5fe68926a33250015609b5c7e365
Reviewed-on: https://skia-review.googlesource.com/22360
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
Although this adds a new method to GrResourceProvider, it is a slight improvement in that it removes some GrProxy stuff from GrResourceProvider (which arguably should only deal in GrSurface-derived classes).
Bug: skia:
Change-Id: I6d097ed178cd2aa5662770a164135bf2553b80e6
Reviewed-on: https://skia-review.googlesource.com/22023
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit 742a3e298f.
Reason for revert: Breaking Android roll:
frameworks/base/core/jni/android/graphics/BitmapFactory.cpp:453:18: error: no member named 'fColorPtr' in 'SkAndroidCodec::AndroidOptions'
codecOptions.fColorPtr = colorPtr;
~~~~~~~~~~~~ ^
frameworks/base/core/jni/android/graphics/BitmapFactory.cpp:454:18: error: no member named 'fColorCount' in 'SkAndroidCodec::AndroidOptions'
codecOptions.fColorCount = colorCount;
~~~~~~~~~~~~ ^
Original change's description:
> Remove support for decoding to kIndex_8
>
> Fix up callsites, and remove tests that no longer make sense.
>
> Bug: skia:6828
> Change-Id: I2548c4b7528b7b1be7412563156f27b52c9d4295
> Reviewed-on: https://skia-review.googlesource.com/21664
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Commit-Queue: Leon Scroggins <scroggo@google.com>
TBR=djsollen@google.com,scroggo@google.com
Change-Id: I1bc669441f250690884e75a9a61427fdf75c6907
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6828
Reviewed-on: https://skia-review.googlesource.com/22120
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Bug: skia:6842
Change-Id: I0bf58f2a00de66cae161561fc87e7adaac651e4f
Reviewed-on: https://skia-review.googlesource.com/22064
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Special cases:
- "sRGB"
- "AdobeRGB"
- "DCI-P3"
- "Linear Transfer with sRGB Gamut"
- "2.2 Transfer with sRGB Gamut"
- "sRGB Transfer with DCI-P3 Gamut"
- "Linear Transfer with DCI-P3 Gamut"
- "sRGB Transfer with Rec-BT-2020 Gamut"
- "Linear Transfer with Rec-BT-2020 Gamut"
tools/colorspaceinfo now prints out the Tag.
Also: constants representing gSRGB_TransferFn, g2Dot2_TransferFn, and
gLinear_TransferFn, gDCIP3_TransferFn.
BUG=skia:6720
Change-Id: I92a3f9db9d744d3ec366e4e59afd759ba043c235
Reviewed-on: https://skia-review.googlesource.com/20225
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Fix up callsites, and remove tests that no longer make sense.
Bug: skia:6828
Change-Id: I2548c4b7528b7b1be7412563156f27b52c9d4295
Reviewed-on: https://skia-review.googlesource.com/21664
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
See anglebug.com/2098
No-Tree-Checks: true
Change-Id: I793459f57a75ccefc7f071ef506e9d128c5abbe4
Reviewed-on: https://skia-review.googlesource.com/21860
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Update unittest to build test image with legal premul pixels.
Bug: skia:
Change-Id: Iebd1d2f81cac77f8913bd79f6ac25983ed710641
Reviewed-on: https://skia-review.googlesource.com/21735
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
The cache is scoped with the SkColorSpaceXformer object.
This ensures we're not transforming nodes with a degree > 1 multiple
times, and preserves the DAG topology.
Change-Id: I0b072cdac95f9f1c34e0565ed4f258aba986e1ae
Reviewed-on: https://skia-review.googlesource.com/21726
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Previously, SkGifCodec treated an error in the LZW data as incomplete,
since we can still draw the partially decoded image. But a client doing
incremental decodes needs to distinguish this from truly incomplete
data. In the case of an error, the client should not attempt to provide
more data and decode again.
Add kErrorInInput, and return it when SkGifCodec sees a fatal error.
Treat it the same as kIncompleteInput when it comes to filling and DM.
Bug: skia:6825
Change-Id: Ic6ce3a62c0b065ed34dcd8006309e43272a3db9f
Reviewed-on: https://skia-review.googlesource.com/21530
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Chris Blume <cblume@chromium.org>
Fixes build of Skia lib when GR_TEST_UTILS=0
Makes GR_TEST_UTILS=0 for official builds
Makes "Mini" builder bot exercise building GPU with is_official_build=true
Bug: skia:6786
Change-Id: I6186683a3a216d2e779645bd9e8276a66bcff4d5
Reviewed-on: https://skia-review.googlesource.com/21524
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This is to support a Mock backend that passes non-rendering context unit tests and has minimal config support.
Change-Id: I57c3ad2d347659d14382a8a7cf53424633bd86c6
Reviewed-on: https://skia-review.googlesource.com/21534
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: skia:
Change-Id: I641b206fc3bc19ac190ad94ee755ab9e1caab9b3
Reviewed-on: https://skia-review.googlesource.com/21341
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
... faster and more accurate than using SkTableColorFilter
todo: update blink after this lands
Bug:737981
Change-Id: I55b5c60dd23b9d2cbe9d60f83c74be1a8f3dcfcf
Reviewed-on: https://skia-review.googlesource.com/21368
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This is all kind of silly... this is just a little bit of code that's
not really reachable, but there to satisfy compilers that can't figure
that out.
Change-Id: Ib39e8bf0fd26e28541cfad37c7ea135a30dbe85a
Reviewed-on: https://skia-review.googlesource.com/21365
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
From the bug it looks like a null fragment processors may be getting into the processor set. This CL tries to plug any gaps in our fragmentProcessor handling.
The only real substantive part to this CL is the addition of some "if (!fp) { return nullptr; }" blocks.
Everything else is just to add chokepoints for processor allocation.
Bug: 734076
Change-Id: I4952b1a05bc6690d5aa09de977fa6dc54c80338a
Reviewed-on: https://skia-review.googlesource.com/21267
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:
Change-Id: Ie8a31ea8131c08d251a825622484342e3e174474
Reviewed-on: https://skia-review.googlesource.com/21207
Commit-Queue: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
In our current implementation of SkImageFilterCache, when the
removeInternal() function is called, the Value is removed, but their
corresponding keys are not always removed in SkImageFilter. That could
result in memory leak.
In this CL, we made changes such that the Value structure now keeps
a pointer to the SkImageFilter. Each time when the removeInternal()
is called, we ask the SkImageFilter to remove the associated keys.
Bug: 689740
Change-Id: I0807fa3581881ad1530536df5289e3976792281f
Reviewed-on: https://skia-review.googlesource.com/20960
Commit-Queue: Xida Chen <xidachen@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
There are two remaining swap_rb uses that both look non-trivial to
replace:
- sampling out of index8 when the color table is bgra
- table transforms on bgra inputs in SkColorSpaceXform
I don't think it's a big deal to just leave swap_rb around,
just a little sad.
Change-Id: I3d30200cf867cbf37d6f86572b1574d3e22e3490
Reviewed-on: https://skia-review.googlesource.com/21040
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
NOTREECHECKS:true
Bug: skia:
Change-Id: I612989c6ce2f309d2f70f896500f73e4baa971a7
Reviewed-on: https://skia-review.googlesource.com/19811
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
This reverts commit c070939fd1.
Reason for revert:
This has some knock-on effects in the generation of Android.bp from our GN files. See gn/gn_to_bp.py? We're seeing things like "tmp/tmpsBVycx/gen/" end up in the include search path in Android.bp, which obviously don't exist there...
Original change's description:
> Re-land sksl fragment processor support
>
> This reverts commit ed50200682.
>
> Bug: skia:
> Change-Id: I9caa7454b391450620d6989dc472abb3cf7a2cab
> Reviewed-on: https://skia-review.googlesource.com/20965
> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
TBR=benjaminwagner@google.com,ethannicholas@google.com
Change-Id: I502486b5405923b322429219f4cc396a45a14cea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/20990
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Change-Id: I25619f010f8ac6441529cfe8dff2d8c42d7400cf
Reviewed-on: https://skia-review.googlesource.com/20988
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>