diff options
author | Robert Phillips <robertphillips@google.com> | 2017-02-07 17:28:15 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-02-07 17:28:21 +0000 |
commit | dd8b72ae7319598cfc1024901e860c52f06e6ae1 (patch) | |
tree | b6e94e11c082c691512f8989ae55794fa2e6b756 /experimental | |
parent | 1f2fff2544a9dc6a0f169a017d374eca9f04c6b5 (diff) |
Revert "Use SkArenaAlloc instead of SkSmallAllocator in the SkAutoBlitterChoose code."
This reverts commit 2b57b7f7a7fc97db57f190b5a8ebcf68e177ee2d.
Reason for revert: Android compile failing
Original change's description:
> Use SkArenaAlloc instead of SkSmallAllocator in the SkAutoBlitterChoose code.
>
>
> TBR=reed@google.com
> Change-Id: Iefb044bf7657fbf982f23aa91a3f4d013ce2c626
> Reviewed-on: https://skia-review.googlesource.com/7786
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
>
TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: Id09c35377dddae0811d998b7d0c34c422325a5bc
Reviewed-on: https://skia-review.googlesource.com/8129
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'experimental')
-rw-r--r-- | experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp | 14 | ||||
-rw-r--r-- | experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.h | 3 |
2 files changed, 10 insertions, 7 deletions
diff --git a/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp b/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp index 06589f287d..401d3c3e2e 100644 --- a/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp +++ b/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp @@ -5,10 +5,8 @@ * found in the LICENSE file. */ -#include "SkPerlinNoiseShader2.h" - -#include "SkArenaAlloc.h" #include "SkDither.h" +#include "SkPerlinNoiseShader2.h" #include "SkColorFilter.h" #include "SkReadBuffer.h" #include "SkWriteBuffer.h" @@ -571,9 +569,13 @@ SkPMColor SkPerlinNoiseShader2::PerlinNoiseShaderContext::shade( return SkPreMultiplyARGB(rgba[3], rgba[0], rgba[1], rgba[2]); } -SkShader::Context* SkPerlinNoiseShader2::onMakeContext(const ContextRec& rec, - SkArenaAlloc* alloc) const { - return alloc->make<PerlinNoiseShaderContext>(*this, rec); +SkShader::Context* SkPerlinNoiseShader2::onCreateContext(const ContextRec& rec, + void* storage) const { + return new (storage) PerlinNoiseShaderContext(*this, rec); +} + +size_t SkPerlinNoiseShader2::onContextSize(const ContextRec&) const { + return sizeof(PerlinNoiseShaderContext); } SkPerlinNoiseShader2::PerlinNoiseShaderContext::PerlinNoiseShaderContext( diff --git a/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.h b/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.h index 1f4839c8b4..f1b94e1c80 100644 --- a/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.h +++ b/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.h @@ -114,7 +114,8 @@ public: protected: void flatten(SkWriteBuffer&) const override; - Context* onMakeContext(const ContextRec&, SkArenaAlloc*) const override; + size_t onContextSize(const ContextRec&) const override; + Context* onCreateContext(const ContextRec&, void* storage) const override; private: SkPerlinNoiseShader2(SkPerlinNoiseShader2::Type type, SkScalar baseFrequencyX, |