Revert "[skottie] Reduce CompositionBuilder stack footprint"

This reverts commit 3f751f29ad.

Reason for revert: build errors

Original change's description:
> [skottie] Reduce CompositionBuilder stack footprint
>
> LayerBuilder has grown to be pretty chunky.  Using inline storage
> SkSTArray<64> in stack-allocated CompositionBuilders is excessive
> (and unnecessary).
>
> -fstack-usage before:
>   AnimationBuilder::attachPrecompLayer() 7536
>
> -fstack-usage after:
>   AnimationBuilder::attachPrecompLayer() 368
>
>
> Change-Id: Ia905d58e02519d9251620f3eeedbbdc434e3392d
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319342
> Reviewed-by: Mike Klein <mtklein@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Florin Malita <fmalita@google.com>
> Commit-Queue: Florin Malita <fmalita@chromium.org>

TBR=mtklein@google.com,bungeman@google.com,fmalita@chromium.org,fmalita@google.com

Change-Id: Ie488318d8da5f568f7869041105e53ceb2bf2ccb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319401
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
This commit is contained in:
Florin Malita 2020-09-24 20:15:13 +00:00 committed by Skia Commit-Bot
parent 5f46a27d7b
commit 1946366ee0

View File

@ -10,11 +10,10 @@
#include "modules/skottie/src/SkottiePriv.h"
#include "include/private/SkTArray.h"
#include "include/private/SkTHash.h"
#include "modules/skottie/src/Layer.h"
#include <vector>
namespace skottie {
namespace internal {
@ -32,16 +31,16 @@ private:
friend class LayerBuilder;
const SkSize fSize;
const SkSize fSize;
std::vector<LayerBuilder> fLayerBuilders;
SkTHashMap<int, size_t> fLayerIndexMap; // Maps layer "ind" to layer builder index.
SkSTArray<64, LayerBuilder> fLayerBuilders;
SkTHashMap<int, size_t> fLayerIndexMap; // Maps layer "ind" to layer builder index.
sk_sp<sksg::Transform> fCameraTransform;
sk_sp<sksg::Transform> fCameraTransform;
size_t fMotionBlurSamples = 1;
float fMotionBlurAngle = 0,
fMotionBlurPhase = 0;
size_t fMotionBlurSamples = 1;
float fMotionBlurAngle = 0,
fMotionBlurPhase = 0;
};
} // namespace internal