diff options
author | 2017-02-07 14:25:11 -0500 | |
---|---|---|
committer | 2017-02-07 20:01:20 +0000 | |
commit | 83e939bcb79790f5ae3b28c398fbcf034675a6e5 (patch) | |
tree | 40b52134dece685757f7a1c1c69aa575a82f5100 /src/core/SkColorShader.cpp | |
parent | 77a7a1b57c16c97f056c1e50c03bdc954947778c (diff) |
Use SkArenaAlloc in the SkAutoBlitterChoose code.
- Added default implementation of onMakeContext to support use in android.
Searches for uses:
"public SkShader" package:^chromium$ -file:^src/third_party/skia
package:^aosp.* "public SkShader" -file:external/skia -file:.*third_party/skia
package:^android$ "public SkShader" -file:external/skia -file:.*third_party/skia
... shows that no subclass overrides onCreateContext.
TBR=reed@google.com
TBR=mtklein@google.com
Change-Id: I8bd5f57a79534574e344b165d31dccee41c31767
Reviewed-on: https://skia-review.googlesource.com/8140
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Diffstat (limited to 'src/core/SkColorShader.cpp')
-rw-r--r-- | src/core/SkColorShader.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/SkColorShader.cpp b/src/core/SkColorShader.cpp index 11a26cdace..5c8bde6ee1 100644 --- a/src/core/SkColorShader.cpp +++ b/src/core/SkColorShader.cpp @@ -31,8 +31,8 @@ uint32_t SkColorShader::ColorShaderContext::getFlags() const { return fFlags; } -SkShader::Context* SkColorShader::onCreateContext(const ContextRec& rec, void* storage) const { - return new (storage) ColorShaderContext(*this, rec); +SkShader::Context* SkColorShader::onMakeContext(const ContextRec& rec, SkArenaAlloc* alloc) const { + return alloc->make<ColorShaderContext>(*this, rec); } SkColorShader::ColorShaderContext::ColorShaderContext(const SkColorShader& shader, @@ -149,8 +149,8 @@ uint32_t SkColor4Shader::Color4Context::getFlags() const { return fFlags; } -SkShader::Context* SkColor4Shader::onCreateContext(const ContextRec& rec, void* storage) const { - return new (storage) Color4Context(*this, rec); +SkShader::Context* SkColor4Shader::onMakeContext(const ContextRec& rec, SkArenaAlloc* alloc) const { + return alloc->make<Color4Context>(*this, rec); } SkColor4Shader::Color4Context::Color4Context(const SkColor4Shader& shader, |