04eb02f4055069104ceb330a0722fdaf906e43e4 |
|
05-Oct-2017 |
Ben Wagner <bungeman@google.com> |
Fewer atomic ops in debug with SkBufferHead. In debug builds an assert would do an atomic load to assert the reference count was greater than zero, then a fetch_add would access the value again to do the reference counting. Instead just assert in debug on the value produced by the reference counting. This both improves debug performance and (more importantly) makes the debug asserts correct instead of mearly opprotunistic. Change-Id: Ic4ce788930d2564b5f86ab0e09fcd66006c8b73d Reviewed-on: https://skia-review.googlesource.com/55880 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Ben Wagner <bungeman@google.com>
/external/skia/src/core/SkRWBuffer.cpp
|
8d64ee7795991ceaa2346a63bd9660e4722f346e |
|
04-Oct-2017 |
Ben Wagner <bungeman@google.com> |
Update SkBufferHead fRefCnt to std::atomic. This fixes the noisiest bit of a debug tsan build. Change-Id: I5df8cb3003c73640c04bd73e0aad1aefd87f833e Reviewed-on: https://skia-review.googlesource.com/55480 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Ben Wagner <bungeman@google.com>
/external/skia/src/core/SkRWBuffer.cpp
|
0ca21466da7441baf471966be8c628d408752a72 |
|
20-Sep-2017 |
Mike Reed <reed@google.com> |
remove dead code for STREAM_API Bug: skia: Change-Id: I5c5a65710af443c60a3d13fb309ce31309be7f74 Reviewed-on: https://skia-review.googlesource.com/49460 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/core/SkRWBuffer.cpp
|
98c5d92ee60f6d395f9591891922aa9852a497ee |
|
16-Sep-2017 |
Mike Reed <reed@google.com> |
Revert "Revert "use unique_ptr for stream api"" This reverts commit 7031b247c9fe0cb8fa32129f9bc24fea2043cee2. Bug: skia: Change-Id: I24c34bbee703f02994be8e206bcb9c10b5427d84 Reviewed-on: https://skia-review.googlesource.com/47541 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/core/SkRWBuffer.cpp
|
7031b247c9fe0cb8fa32129f9bc24fea2043cee2 |
|
15-Sep-2017 |
Mike Reed <reed@google.com> |
Revert "use unique_ptr for stream api" This reverts commit 49f1f34438d3431f6d7e32847accd2ba96948a73. Reason for revert: broke win-chrome ../../third_party/skia/src/ports/SkFontMgr_win_dw.cpp(89): error C2228: left of '.release' must have class/struct/union ../../third_party/skia/src/ports/SkFontMgr_win_dw.cpp(89): note: type is 'SkStreamAsset *' ../../third_party/skia/src/ports/SkFontMgr_win_dw.cpp(89): note: did you intend to use '->' instead? Original change's description: > use unique_ptr for stream api > > Bug: skia:6888 > Change-Id: I3459b4913982a7cae1c0061697c82cc65ad9a2d8 > Reviewed-on: https://skia-review.googlesource.com/26740 > Reviewed-by: Mike Klein <mtklein@chromium.org> > Commit-Queue: Mike Reed <reed@google.com> TBR=mtklein@chromium.org,mtklein@google.com,bungeman@google.com,reed@google.com Change-Id: Ic1e4af557317abd06b7f6b7f5056645df7e469f0 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:6888 Reviewed-on: https://skia-review.googlesource.com/47440 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/core/SkRWBuffer.cpp
|
49f1f34438d3431f6d7e32847accd2ba96948a73 |
|
15-Sep-2017 |
Mike Reed <reed@google.com> |
use unique_ptr for stream api Bug: skia:6888 Change-Id: I3459b4913982a7cae1c0061697c82cc65ad9a2d8 Reviewed-on: https://skia-review.googlesource.com/26740 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/core/SkRWBuffer.cpp
|
67af673d7adbaf6f4d81d3ccf3eaece2dd45167e |
|
02-Jun-2017 |
Florin Malita <fmalita@chromium.org> |
Remove deprecated SkRWBuffer snapshot methods Change-Id: I98fc6059fe74458fb359eaf00ccfcae50996a9e1 Reviewed-on: https://skia-review.googlesource.com/18480 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
/external/skia/src/core/SkRWBuffer.cpp
|
69270fbb2b42e2ea6985a83006f40ae9921f1eb3 |
|
01-Jun-2017 |
Florin Malita <fmalita@chromium.org> |
Add smartptr SkRWBuffer snapshot methods Change-Id: Id816a38213a86bf090230ebaaef00d98a9487965 Reviewed-on: https://skia-review.googlesource.com/18266 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
/external/skia/src/core/SkRWBuffer.cpp
|
b549cc38c8404c58642ada75c0b24907702cc005 |
|
27-Mar-2017 |
Herb Derby <herb@google.com> |
Change SkMemory to the more accurately named SkMalloc. Change-Id: I6b08a74234b99bac866bad71014b94f7ec2d4bc8 Reviewed-on: https://skia-review.googlesource.com/10188 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/src/core/SkRWBuffer.cpp
|
d3b65972aad96453ff4510caa3e25a2b847c6d1e |
|
22-Mar-2017 |
Brian Salomon <bsalomon@google.com> |
Mark overridden destructors with 'override' and remove 'virtual' This silences a new warning in clang 5.0 Change-Id: Ieb5b75a6ffed60107c3fd16075d2ecfd515b55e8 Reviewed-on: https://skia-review.googlesource.com/10006 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
/external/skia/src/core/SkRWBuffer.cpp
|
d7b34a5ca0a9183e70737125c688d2a8b5310d81 |
|
20-Mar-2017 |
Herb Derby <herb@google.com> |
Make SkMemory.h and adjust all files for usage. This will be rolled out in three stages: 1) make SkMemory.h and have SkTypes.h include it. 2) Adjust chromium and android. 3) no long include SkMemory.h in SkTypes.h Change-Id: If360ef5e1164d88f50b03f279e2e963ca2f57d5d Reviewed-on: https://skia-review.googlesource.com/9874 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Herb Derby <herb@google.com>
/external/skia/src/core/SkRWBuffer.cpp
|
704cd32e4a92d6c3eae6bfae4adcc20126bf4437 |
|
07-Nov-2016 |
Hal Canary <halcanary@google.com> |
src/core: s/SkAutoTUnref/sk_sp/g BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4492 Change-Id: I753ad01b03e891221965252e3befe280d09cdb9f Reviewed-on: https://skia-review.googlesource.com/4492 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
/external/skia/src/core/SkRWBuffer.cpp
|
5776508126534db2af97d560588e7046e745df65 |
|
30-Sep-2016 |
fmalita <fmalita@chromium.org> |
Add a SkRWBuffer reserve mechanism Currently, Chromium stores segmented data in a SharedBuffer and appends to SkRWBuffer one segment at a time: const char* segment = 0; for (size_t length = data->getSomeData(segment, m_rwBuffer->size()); length; length = data->getSomeData(segment, m_rwBuffer->size())) { m_rwBuffer->append(segment, length, remaining); } This can yield a bunch of just-above-4k allocations => wasted RAM due to internal fragmentation. Ideally, we'd want a SkRWBuffer::reserve(size_t bytes) API, but the current internals don't support that trivially. Alternatively, the caller can pass a reserve hint at append() time. BUG=chromium:651698 R=scroggo@google.com,reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2385803002 Review-Url: https://codereview.chromium.org/2385803002
/external/skia/src/core/SkRWBuffer.cpp
|
2e36e88f40c8a37043d5b9ef17bc72b69a394b95 |
|
30-Sep-2016 |
fmalita <fmalita@chromium.org> |
SkRWBuffer: preallocate 'initialCapacity' We're currently ignoring the hint, resulting in multiple unneeded allocations later. BUG=chromium:651698 R=scroggo@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2384763002 Review-Url: https://codereview.chromium.org/2384763002
/external/skia/src/core/SkRWBuffer.cpp
|
fc6c37b981daeece7474ce61070c707c37eefa62 |
|
27-Sep-2016 |
Mike Klein <mtklein@chromium.org> |
Remove stray semicolons. Turns out function declarations don't end in semicolons... BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2720 No public API changes. TBR=reed@google.com Change-Id: I72b56d52e1ff7fa6e89c295b0de8c46599791ebb Reviewed-on: https://skia-review.googlesource.com/2720 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
/external/skia/src/core/SkRWBuffer.cpp
|
635164028594b4af0086ec85b5e4570dd11091da |
|
22-Apr-2016 |
scroggo <scroggo@google.com> |
Fixes for SkRWBuffer Do not call SkBufferHead::validate in SkROBuffer's destructor, which may be called in a separate thread from SkRWBuffer::append. validate() reads SkBufferBlock::fUsed, and append() writes to it, resulting in a data race. Update some comments to be more clear about how it is safe to use these classes across threads. Test the readers in separate threads. In addition, make sure it is safe to create a reader even when no data has been appended. Add tests for this case. Mark a parameter to SkBufferHead::validate() as const, reflecting its use. BUG=chromium:601578 BUG=chromium:605479 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1871953002 Review URL: https://codereview.chromium.org/1871953002
/external/skia/src/core/SkRWBuffer.cpp
|
a3760992c93ddb5512d96671831576907441605d |
|
14-Apr-2016 |
bungeman <bungeman@google.com> |
Revert of Fixes for SkRWBuffer (patchset #5 id:80001 of https://codereview.chromium.org/1871953002/ ) Reason for revert: Making MSAN and TSAN rather unhappy. https://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN/builds/1586 https://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN/builds/5922 Original issue's description: > Fixes for SkRWBuffer > > Do not call SkBufferHead::validate in SkROBuffer's destructor, which > may be called in a separate thread from SkRWBuffer::append. validate() > reads SkBufferBlock::fUsed, and append() writes to it, resulting in > a data race. > > Update some comments to be more clear about how it is safe to use > these classes across threads. > > Test the readers in separate threads. > > In addition, make sure it is safe to create a reader even when no > data has been appended. Add tests for this case. > > Mark a parameter to SkBufferHead::validate() as const, reflecting > its use. > > BUG=chromium:601578 > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1871953002 > > Committed: https://skia.googlesource.com/skia/+/d06920a29fe11c68bde2b93948ec99f277bb8459 TBR=mtklein@google.com,reed@google.com,scroggo@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=chromium:601578 Review URL: https://codereview.chromium.org/1882853004
/external/skia/src/core/SkRWBuffer.cpp
|
d06920a29fe11c68bde2b93948ec99f277bb8459 |
|
14-Apr-2016 |
scroggo <scroggo@google.com> |
Fixes for SkRWBuffer Do not call SkBufferHead::validate in SkROBuffer's destructor, which may be called in a separate thread from SkRWBuffer::append. validate() reads SkBufferBlock::fUsed, and append() writes to it, resulting in a data race. Update some comments to be more clear about how it is safe to use these classes across threads. Test the readers in separate threads. In addition, make sure it is safe to create a reader even when no data has been appended. Add tests for this case. Mark a parameter to SkBufferHead::validate() as const, reflecting its use. BUG=chromium:601578 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1871953002 Review URL: https://codereview.chromium.org/1871953002
/external/skia/src/core/SkRWBuffer.cpp
|
377add74267e5e0c94521858fb1f9ac5cf299667 |
|
08-Apr-2016 |
reed <reed@google.com> |
Fix race condition in SkROBuffer. SkBufferBlock::fUsed may be updated by the writer while a reader is attempting to read it. BUG=chromium:601578 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1872853002 Review URL: https://codereview.chromium.org/1872853002
/external/skia/src/core/SkRWBuffer.cpp
|
2c4bd0798e929acb9663668985eabe74d7378c46 |
|
08-Apr-2016 |
bungeman <bungeman@google.com> |
Convert SkRefCnt to std::atomic. This enables removing the more complicated atomic shims from SkAtomics.h. TBR=reed This doesn't actually change any API. CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN-Trybot,Test-Ubuntu-GCC-Golo-GPU-GT610-x86_64-Release-TSAN-Trybot Review URL: https://codereview.chromium.org/1867863002
/external/skia/src/core/SkRWBuffer.cpp
|
9dec5d2acdd12202a1f0ed571cb5ecee574a2550 |
|
16-Feb-2016 |
scroggo <scroggo@google.com> |
Make SkRWBuffer destruct safely Check for NULL before calling unref. Add a test. BUG=483369 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1691383002 Review URL: https://codereview.chromium.org/1691383002
/external/skia/src/core/SkRWBuffer.cpp
|
b512aaa5c808bcb1336c147682657882ee54e652 |
|
11-Jan-2016 |
scroggo <scroggo@google.com> |
Make SkROBuffer::Iter::size() work when exhausted According to the documentation, this method will return 0 when the Iter is exhausted. Prior to this CL, it crashes instead. Prevent a crash with a null fHead, and add a test to verify the behavior. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1574603002 Review URL: https://codereview.chromium.org/1574603002
/external/skia/src/core/SkRWBuffer.cpp
|
96fcdcc219d2a0d3579719b84b28bede76efba64 |
|
27-Aug-2015 |
halcanary <halcanary@google.com> |
Style Change: NULL->nullptr DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
/external/skia/src/core/SkRWBuffer.cpp
|
385fe4d4b62d7d1dd76116dd570df3290a2f487b |
|
26-Aug-2015 |
halcanary <halcanary@google.com> |
Style Change: SkNEW->new; SkDELETE->delete DOCS_PREVIEW= https://skia.org/?cl=1316123003 Review URL: https://codereview.chromium.org/1316123003
/external/skia/src/core/SkRWBuffer.cpp
|
f059900f75639f1b1a03f2c25333ef9aa22d58b8 |
|
13-Jul-2015 |
mtklein <mtklein@chromium.org> |
Fix up -Winconsistent-missing-override (and a couple presubmit fixes) This allows us to turn back on -Werror for LLVM coverage builds, and more generally supports building with Clang 3.7. No public API changes. TBR=reed@google.com BUG=skia: Review URL: https://codereview.chromium.org/1232463006
/external/skia/src/core/SkRWBuffer.cpp
|
5b6db07fb5d3b67476db6df126eb8290d49e564d |
|
29-Apr-2015 |
reed <reed@chromium.org> |
SkRWBuffer for thread-safe 'stream' sharing WIP - Can accumulate (write) data in one thread, and share snapshots of it in other threads ... e.g. network accumulates image data, and periodically we want to decode/draw it - If this sort of thing sticks, should we promote SkData to have the same generality as SkRBuffer? BUG=skia: TBR= Review URL: https://codereview.chromium.org/1106113002
/external/skia/src/core/SkRWBuffer.cpp
|