Commit Graph

3 Commits

Author SHA1 Message Date
Mike Klein
526525a37c Revert "While we can, restrict SkFixedAlloc/SkFallbackAlloc to POD."
This reverts commit 1ee70359a1.

Reason for revert: breaking my various rolls.

Original change's description:
> While we can, restrict SkFixedAlloc/SkFallbackAlloc to POD.
> 
> This trims the overhead down to a uniform 4 bytes.
> 
> BUG=skia:
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4786
> 
> Change-Id: I92127a0c2d6c23a4a372eca39842e22195d2dc99
> Reviewed-on: https://skia-review.googlesource.com/4786
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> 

TBR=mtklein@chromium.org,herb@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Iae9ef553422352a1abf95b709fccd014d468da86
Reviewed-on: https://skia-review.googlesource.com/4829
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-11-15 18:01:21 +00:00
Mike Klein
1ee70359a1 While we can, restrict SkFixedAlloc/SkFallbackAlloc to POD.
This trims the overhead down to a uniform 4 bytes.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4786

Change-Id: I92127a0c2d6c23a4a372eca39842e22195d2dc99
Reviewed-on: https://skia-review.googlesource.com/4786
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-15 16:03:36 +00:00
Mike Klein
58b130681d SkFixedAlloc
Looking at SkSmallAlloc hasn't left me terribly impressed.  I think we can replace it with something a lot simpler to work with.

That simpler thing's core would be something like SkFixedAlloc, which allocates objects out of a fixed sized buffer, and cleans them up when done.

If needed, we can wrap that with logic to try to allocate out of an SkFixedAlloc, falling back on mallc() when exhausted.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4658

Change-Id: I8d94156ddf98802e42ec0890cff0f06b21f073b0
Reviewed-on: https://skia-review.googlesource.com/4658
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2016-11-11 16:42:57 +00:00