diff options
author | 2017-11-28 17:54:23 -0500 | |
---|---|---|
committer | 2017-11-29 02:33:28 +0000 | |
commit | 1ba5bfe59056f7d8c040628508a20ee95cc6b76a (patch) | |
tree | cddc987ccadf6cbf5e4d9082af0c189a19d8a663 /src/core | |
parent | 7b8e30a196928c5907f4b67bf6b71e02a913fdb0 (diff) |
Avoid double-destruction of Sk3DShaderContext-wrapped objects
Sk3DShaderContext creates its nested shader context on a SkArenaAlloc,
which handles destruction when going out of scope.
Hence, the explicit context dtor call in ~Sk3DShaderContext() is
incorrect (likely left over from before SkArenaAlloc).
BUG=chromium:787712
Change-Id: I176222e449151dcce532a839ef9587d06f61d297
Reviewed-on: https://skia-review.googlesource.com/77203
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkBlitter.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/core/SkBlitter.cpp b/src/core/SkBlitter.cpp index 6901511d4e..4bbd80d93f 100644 --- a/src/core/SkBlitter.cpp +++ b/src/core/SkBlitter.cpp @@ -715,11 +715,7 @@ public: } } - ~Sk3DShaderContext() override { - if (fProxyContext) { - fProxyContext->~Context(); - } - } + ~Sk3DShaderContext() override = default; void set3DMask(const SkMask* mask) override { fMask = mask; } @@ -790,7 +786,7 @@ public: private: // Unowned. const SkMask* fMask; - // Memory is unowned, but we need to call the destructor. + // Memory is unowned. Context* fProxyContext; SkPMColor fPMColor; |