History log of /external/skia/include/core/SkOnce.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1b81877880253c75f835eede9a8ee21b9e7b584a 02-Jun-2014 mtklein <mtklein@chromium.org> Clean up SkOnce:

1 Remove atExit feature: clients can do it just as well as SkOnce can.
2 Remove support for functors: no one but the unit test did that.
3 Remove support for unused non-static SkOnceFlag (no SK_ONCE_INIT).
4 Add SkOnce variants for no-arg functions so we're not forced to pass dummy values all the time.
5 Merge SkSpinlock and SkOnceFlag, making all members private.
6 More notes about memory barriers, adding an acquire load after acquiring the spinlock.

BUG=skia:
R=bungeman@google.com, mtklein@google.com, reed@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/302083003
/external/skia/include/core/SkOnce.h
448e2a3b3935d91e7bf84dc5b0367b92d2e2a518 29-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Add SkBarriers to ports.

This completes a TODO we've had to move our memory-barrier code out of
SkOnce. I also want to start using sk_acquire_load elsewhere.

BUG=skia:
R=bungeman@google.com, mtklein@google.com, reed@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/304593003

git-svn-id: http://skia.googlecode.com/svn/trunk@14970 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkOnce.h
86b0de4745a8a8317b54f23878498633b9210a8f 28-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Remove SkThread.h from public API."

Too much depends on SkThread being in include/core in Chrome build.

This reverts commit b1aec17df6078115c797839c9646081ccba2bd09.

NOTREECHECKS=true
NOTRY=true
R=reed@google.com, mtklein@google.com
TBR=reed

BUG=skia:

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/303813003

git-svn-id: http://skia.googlecode.com/svn/trunk@14934 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkOnce.h
b1aec17df6078115c797839c9646081ccba2bd09 28-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Remove SkThread.h from public API.

BUG=skia:
R=reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/303463009

git-svn-id: http://skia.googlecode.com/svn/trunk@14926 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkOnce.h
f672cead70404080a991ebfb86c38316a4589b23 27-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> teach TSAN about SkSpinlock, SkRefCnt, and SkOnce

BUG=skia:

Committed: http://code.google.com/p/skia/source/detail?r=14353

NOTRY=true
NOTREECHECKS=true

Committed: http://code.google.com/p/skia/source/detail?r=14354

R=bsalomon@google.com, bungeman@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/247813005

git-svn-id: http://skia.googlecode.com/svn/trunk@14390 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkOnce.h
1d24eb20e77f0b291a6dcf6aa054b74f41fa1af2 24-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> teach TSAN about SkSpinlock, SkRefCnt, and SkOnce

BUG=skia:
R=bsalomon@google.com, bungeman@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/247813005

git-svn-id: http://skia.googlecode.com/svn/trunk@14353 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkOnce.h
6f2d4d4679f5f0e1a1b5c2e940f1b65e34d94649 02-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> ARM Skia NEON patches - 35 - First AArch64 support

Aarch64 support

This change contains the necessary modifications to have Skia build and
run properly on an ARMv8 processor in aarch64 execution state.

Here's a list of the changes:

- add an arm64 target to the build system + SK_CPU_ARM64 flag

- MatrixTest was failing when built in Release mode. Fused MAC
instructions were generated which made some intermediate results
more accurate. As the test relies on result comparison, the more
precise results when compared to others led to a gap bigger than
what was tolerated. As I don't know if some actual skia code relies
on results being comparable, I've disabled fused MAC instruction
with -ffp-contract=off for arm64.

- Modify include/core/SkOnce.h to have barriers work.

- SK_CPU_ARM64 implies SK_ARM_NEON_MODE_ALWAYS.

- use existing Xfermode optimisations with modifications that can be
removed in the future when toolchains are ready. Also save a few
instructions is two Xfermodes (will apply to ARM too).

- use existing SkBoxBlur and SkMorphology optimisations.

- use existing SkBlitMask optimisations

- use existing BitmapProcState and Convolution optimisations.

Future changes will include:

- Blitters (only partialy merged upstream)

- SkUtils (there's little value in sending asm optimisations without
having them benchmarked on real hardware).

Signed-off-by: Kevin PETIT <kevin.petit@arm.com>

BUG=skia:

Committed: http://code.google.com/p/skia/source/detail?r=13980

R=djsollen@google.com, reed@google.com, mtklein@google.com, halcanary@google.com

Author: kevin.petit@arm.com

Review URL: https://codereview.chromium.org/143423004

git-svn-id: http://skia.googlecode.com/svn/trunk@14025 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkOnce.h
d643a90ee248d22ec8260512812dee6d463de555 28-Mar-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of ARM Skia NEON patches - 35 - First AArch64 support (https://codereview.chromium.org/143423004/)

Reason for revert:
GYP's failing on most (all?) bots.

Original issue's description:
> ARM Skia NEON patches - 35 - First AArch64 support
>
> Aarch64 support
>
> This change contains the necessary modifications to have Skia build and
> run properly on an ARMv8 processor in aarch64 execution state.
>
> Here's a list of the changes:
>
> - add an arm64 target to the build system + SK_CPU_ARM64 flag
>
> - MatrixTest was failing when built in Release mode. Fused MAC
> instructions were generated which made some intermediate results
> more accurate. As the test relies on result comparison, the more
> precise results when compared to others led to a gap bigger than
> what was tolerated. As I don't know if some actual skia code relies
> on results being comparable, I've disabled fused MAC instruction
> with -ffp-contract=off for arm64.
>
> - Modify include/core/SkOnce.h to have barriers work.
>
> - SK_CPU_ARM64 implies SK_ARM_NEON_MODE_ALWAYS.
>
> - use existing Xfermode optimisations with modifications that can be
> removed in the future when toolchains are ready. Also save a few
> instructions is two Xfermodes (will apply to ARM too).
>
> - use existing SkBoxBlur and SkMorphology optimisations.
>
> - use existing SkBlitMask optimisations
>
> - use existing BitmapProcState and Convolution optimisations.
>
> Future changes will include:
>
> - Blitters (only partialy merged upstream)
>
> - SkUtils (there's little value in sending asm optimisations without
> having them benchmarked on real hardware).
>
> Signed-off-by: Kevin PETIT <kevin.petit@arm.com>
>
> BUG=skia:
>
> Committed: http://code.google.com/p/skia/source/detail?r=13980

R=djsollen@google.com, reed@google.com, halcanary@google.com, kevin.petit@arm.com
TBR=djsollen@google.com, halcanary@google.com, kevin.petit@arm.com, reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/216113005

git-svn-id: http://skia.googlecode.com/svn/trunk@13983 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkOnce.h
7a0e27577dddd63e035e3ad8fde71f880d39943e 28-Mar-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> ARM Skia NEON patches - 35 - First AArch64 support

Aarch64 support

This change contains the necessary modifications to have Skia build and
run properly on an ARMv8 processor in aarch64 execution state.

Here's a list of the changes:

- add an arm64 target to the build system + SK_CPU_ARM64 flag

- MatrixTest was failing when built in Release mode. Fused MAC
instructions were generated which made some intermediate results
more accurate. As the test relies on result comparison, the more
precise results when compared to others led to a gap bigger than
what was tolerated. As I don't know if some actual skia code relies
on results being comparable, I've disabled fused MAC instruction
with -ffp-contract=off for arm64.

- Modify include/core/SkOnce.h to have barriers work.

- SK_CPU_ARM64 implies SK_ARM_NEON_MODE_ALWAYS.

- use existing Xfermode optimisations with modifications that can be
removed in the future when toolchains are ready. Also save a few
instructions is two Xfermodes (will apply to ARM too).

- use existing SkBoxBlur and SkMorphology optimisations.

- use existing SkBlitMask optimisations

- use existing BitmapProcState and Convolution optimisations.

Future changes will include:

- Blitters (only partialy merged upstream)

- SkUtils (there's little value in sending asm optimisations without
having them benchmarked on real hardware).

Signed-off-by: Kevin PETIT <kevin.petit@arm.com>

BUG=skia:
R=djsollen@google.com, reed@google.com, mtklein@google.com, halcanary@google.com

Author: kevin.petit@arm.com

Review URL: https://codereview.chromium.org/143423004

git-svn-id: http://skia.googlecode.com/svn/trunk@13980 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkOnce.h
ba9354b9d4de62988cc2a56c0760fd5e52da3679 10-Feb-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> SkOnce in is_lcd_supported instead of hand rolled double-checked locking.

BUG=skia:
R=bungeman@google.com, reed@google.com

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/155963003

git-svn-id: http://skia.googlecode.com/svn/trunk@13387 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkOnce.h
ea6e14a3825d6f805527ddfbce4fd6b2bf73a7df 04-Feb-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> TSAN: use somewhat pithier SK_ANNOTATE_UNPROTECTED_READ.

This is a little bit better practice to be i than the existing SK_ANNOTATE_BENIGN_RACE, as UNPROTECTED_READ will only ignore reads, not writes.

Tag SkRefCnt::unique() as a safe unprotected read like SkOnce's double-checked locking.

BUG=skia:
R=reed@google.com, bungeman@google.com

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/144953005

git-svn-id: http://skia.googlecode.com/svn/trunk@13309 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkOnce.h
709ca75f032d7c60eb53c5840524a875a3a6cdb1 24-Jan-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> SkOnce: add option to call another cleanup function once at exit.

Use this to clean up empty SkData and SkPathRef.

Current leaks:
Leaked SkRefCntBase: 40
Leaked SkFlattenable: 32
Leaked SkPixelRef: 32
Leaked SkMallocPixelRef: 32
Leaked SkFontConfigInterface: 1
Leaked SkWeakRefCnt: 1
Leaked SkTypeface: 1
Leaked SkFontMgr: 1
Leaked SkDataTable: 3
Leaked SkImage: 1
Leaked ???: 1
Leaked ???: 1

BUG=skia:
R=halcanary@google.com, reed@google.com

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/132803005

git-svn-id: http://skia.googlecode.com/svn/trunk@13180 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkOnce.h
91506eb0b9461a19c6fc7dc0b15edbdbd1ed094d 21-Jan-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Scope our ANNOTATE_BENIGN_RACE.

This should unstick the DEPS roll. When building with TSAN, Chromium's pulling
in the canonical one from dynamic_annotations.h, and we're trying to redefine it.

R=robertphillips@google.com, reed@google.com, bsalomon@google.com
TBR=reed@google.com
BUG=

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/144063002

git-svn-id: http://skia.googlecode.com/svn/trunk@13129 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkOnce.h
2ab1ba055536825552d6b49f0210c4e1531f02f0 17-Jan-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Make leak counters thread-safe and turn them on by default for Debug

Make leak counters implemented with SK_DECLARE_INST_COUNT thread-safe.
Enable the leak counting for Debug builds when Skia is built as a
static library. Having SK_DECLARE_INST_COUNT without
SK_DEFINE_INST_COUNT relies on static variables in member functions
declared in the header files. These might be duplicated in the clients
of the library when Skia is built as a dynamic library, producing
incorrect operation.

Protect the instance counter initialization step (initStep) by
using SkOnce.

Makes SkOnce.h part of the public API, since SkInstCnt is public.

Protect the per-class child list shared variable with a per-class mutex.

Changes the behavior in the way that if the child list has been
"cleaned up", it will still try to create subsequent child lists.

BUG=skia:1219
R=robertphillips@google.com, mtklein@google.com, bsalomon@google.com, bungeman@google.com, djsollen@google.com

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/99483003

git-svn-id: http://skia.googlecode.com/svn/trunk@13120 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkOnce.h
8844f997805ee6c554f457b2777a9af0ff2f3ed3 14-Jan-2014 djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Make leak counters thread-safe and turn them on by default for Debug"

iThis CL is breaking the Android debug test bots by firing an assert.

BUG=skia:1219

Review URL: https://codereview.chromium.org/138683006

git-svn-id: http://skia.googlecode.com/svn/trunk@13076 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkOnce.h
46de153d4e887d82b5309316ed2e26e5cdc291f0 14-Jan-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Make leak counters thread-safe and turn them on by default for Debug

Make leak counters implemented with SK_DECLARE_INST_COUNT thread-safe.
Enable the leak counting for Debug builds.

Protect the instance counter initialization step (initStep) by
using SkOnce.

Makes SkOnce.h part of the public API, since SkInstCnt is public.

Protect the per-class child list shared variable with a per-class mutex.

Changes the behavior in the way that if the child list has been
"cleaned up", it will still try to create subsequent child lists.

BUG=skia:1219

Committed: http://code.google.com/p/skia/source/detail?r=12635

R=robertphillips@google.com, mtklein@google.com, bsalomon@google.com, bungeman@google.com

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/99483003

git-svn-id: http://skia.googlecode.com/svn/trunk@13068 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkOnce.h
388695146469f09942e21a2d03d8ca0428f9489c 12-Dec-2013 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Reverting r12635 (Make leak counters thread-safe - https://codereview.chromium.org/99483003) due to compile errors on Mac 10.6 & in Chrome



git-svn-id: http://skia.googlecode.com/svn/trunk@12637 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkOnce.h
469a9732c5e75c70e73f51a5e4e0657b0129fdc7 12-Dec-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Make leak counters thread-safe and turn them on by default for Debug

Make leak counters implemented with SK_DECLARE_INST_COUNT thread-safe.
Enable the leak counting for Debug builds.

Protect the instance counter initialization step (initStep) by
using SkOnce.

Makes SkOnce.h part of the public API, since SkInstCnt is public.

Protect the per-class child list shared variable with a per-class mutex.

Changes the behavior in the way that if the child list has been
"cleaned up", it will still try to create subsequent child lists.

BUG=skia:1219
R=robertphillips@google.com, mtklein@google.com, bungeman@gmail.com, bsalomon@google.com, bungeman@google.com

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/99483003

git-svn-id: http://skia.googlecode.com/svn/trunk@12635 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/include/core/SkOnce.h