aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkComposeShader.cpp
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-11-18 16:03:59 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-11-18 16:03:59 +0000
commite61a86cfa00ea393ecc4a71fca94e1d476a37ecc (patch)
treef6ec6c793f279f8226ea40283e707cf3c716e12b /src/core/SkComposeShader.cpp
parent8bf4c0ab7b4acd25566459fc464027c5760d0e5e (diff)
Guard against most unintentionally ephemeral SkAutoFoo instantiations.
I think I applied the trick everywhere possible. Limitations: - can't be used with templated classes - all constructors and destructors must be defined inline A couple of the SkAutoFoo were unused in Skia, Chromium, and Android, so I deleted them. This change caught the same bugs Cary found in SkPath, plus one more in SampleApp. BUG= R=reed@google.com, caryclark@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/72603005 git-svn-id: http://skia.googlecode.com/svn/trunk@12301 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkComposeShader.cpp')
-rw-r--r--src/core/SkComposeShader.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/SkComposeShader.cpp b/src/core/SkComposeShader.cpp
index 206608a4e0..0d2d68717f 100644
--- a/src/core/SkComposeShader.cpp
+++ b/src/core/SkComposeShader.cpp
@@ -59,6 +59,7 @@ private:
SkPaint* fPaint;
uint8_t fAlpha;
};
+#define SkAutoAlphaRestore(...) SK_REQUIRE_LOCAL_VAR(SkAutoAlphaRestore)
void SkComposeShader::flatten(SkFlattenableWriteBuffer& buffer) const {
this->INHERITED::flatten(buffer);