aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/SkBlitter.cpp1
-rw-r--r--src/core/SkCanvas.cpp1
-rw-r--r--src/core/SkComposeShader.cpp1
-rw-r--r--src/core/SkDescriptor.h1
-rw-r--r--src/core/SkDraw.cpp18
-rw-r--r--src/core/SkGlyphCache.h1
-rw-r--r--src/core/SkPath.cpp3
-rw-r--r--src/core/SkRasterClip.h1
-rw-r--r--src/core/SkString.cpp21
9 files changed, 18 insertions, 30 deletions
diff --git a/src/core/SkBlitter.cpp b/src/core/SkBlitter.cpp
index 7012cf3141..dc7946a4bd 100644
--- a/src/core/SkBlitter.cpp
+++ b/src/core/SkBlitter.cpp
@@ -780,6 +780,7 @@ private:
void* fObj;
Proc fProc;
};
+#define SkAutoCallProc(...) SK_REQUIRE_LOCAL_VAR(SkAutoCallProc)
static void destroy_blitter(void* blitter) {
((SkBlitter*)blitter)->~SkBlitter();
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 2efea724da..0d5fccb91f 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -459,6 +459,7 @@ public:
private:
SkBounder* fBounder;
};
+#define SkAutoBounderCommit(...) SK_REQUIRE_LOCAL_VAR(SkAutoBounderCommit)
#include "SkColorPriv.h"
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);
diff --git a/src/core/SkDescriptor.h b/src/core/SkDescriptor.h
index 79b086f614..e71ff41b5c 100644
--- a/src/core/SkDescriptor.h
+++ b/src/core/SkDescriptor.h
@@ -159,6 +159,7 @@ private:
SkDescriptor* fDesc;
uint32_t fStorage[(kStorageSize + 3) >> 2];
};
+#define SkAutoDescriptor(...) SK_REQUIRE_LOCAL_VAR(SkAutoDescriptor)
#endif
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
index 112451920f..aa91df3df5 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -65,7 +65,13 @@ public:
fStorage, sizeof(fStorage), drawCoverage);
}
- ~SkAutoBlitterChoose();
+ ~SkAutoBlitterChoose() {
+ if ((void*)fBlitter == (void*)fStorage) {
+ fBlitter->~SkBlitter();
+ } else {
+ SkDELETE(fBlitter);
+ }
+ }
SkBlitter* operator->() { return fBlitter; }
SkBlitter* get() const { return fBlitter; }
@@ -81,14 +87,7 @@ private:
SkBlitter* fBlitter;
uint32_t fStorage[kBlitterStorageLongCount];
};
-
-SkAutoBlitterChoose::~SkAutoBlitterChoose() {
- if ((void*)fBlitter == (void*)fStorage) {
- fBlitter->~SkBlitter();
- } else {
- SkDELETE(fBlitter);
- }
-}
+#define SkAutoBlitterChoose(...) SK_REQUIRE_LOCAL_VAR(SkAutoBlitterChoose)
/**
* Since we are providing the storage for the shader (to avoid the perf cost
@@ -128,6 +127,7 @@ private:
SkPaint fPaint; // copy of caller's paint (which we then modify)
uint32_t fStorage[kBlitterStorageLongCount];
};
+#define SkAutoBitmapShaderInstall(...) SK_REQUIRE_LOCAL_VAR(SkAutoBitmapShaderInstall)
///////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/SkGlyphCache.h b/src/core/SkGlyphCache.h
index 8447337374..52a8132f72 100644
--- a/src/core/SkGlyphCache.h
+++ b/src/core/SkGlyphCache.h
@@ -273,5 +273,6 @@ private:
static bool DetachProc(const SkGlyphCache*, void*);
};
+#define SkAutoGlyphCache(...) SK_REQUIRE_LOCAL_VAR(SkAutoGlyphCache)
#endif
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index 5f53ce8915..d25ec3c1df 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -56,6 +56,7 @@ private:
SkPath* fPath;
bool fSaved;
};
+#define SkAutoDisableOvalCheck(...) SK_REQUIRE_LOCAL_VAR(SkAutoDisableOvalCheck)
class SkAutoDisableDirectionCheck {
public:
@@ -71,6 +72,7 @@ private:
SkPath* fPath;
SkPath::Direction fSaved;
};
+#define SkAutoDisableDirectionCheck(...) SK_REQUIRE_LOCAL_VAR(SkAutoDisableDirectionCheck)
/* This guy's constructor/destructor bracket a path editing operation. It is
used when we know the bounds of the amount we are going to add to the path
@@ -125,6 +127,7 @@ private:
fDegenerate = is_degenerate(*path);
}
};
+#define SkAutoPathBoundsUpdate(...) SK_REQUIRE_LOCAL_VAR(SkAutoPathBoundsUpdate)
////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/SkRasterClip.h b/src/core/SkRasterClip.h
index e58a23b38b..0c2723314c 100644
--- a/src/core/SkRasterClip.h
+++ b/src/core/SkRasterClip.h
@@ -112,6 +112,7 @@ public:
private:
const SkRasterClip& fRC;
};
+#define SkAutoRasterClipValidate(...) SK_REQUIRE_LOCAL_VAR(SkAutoRasterClipValidate)
#ifdef SK_DEBUG
#define AUTO_RASTERCLIP_VALIDATE(rc) SkAutoRasterClipValidate arcv(rc)
diff --git a/src/core/SkString.cpp b/src/core/SkString.cpp
index 4e5e204e8c..7b3c265314 100644
--- a/src/core/SkString.cpp
+++ b/src/core/SkString.cpp
@@ -626,27 +626,6 @@ void SkString::swap(SkString& other) {
///////////////////////////////////////////////////////////////////////////////
-SkAutoUCS2::SkAutoUCS2(const char utf8[]) {
- size_t len = strlen(utf8);
- fUCS2 = (uint16_t*)sk_malloc_throw((len + 1) * sizeof(uint16_t));
-
- uint16_t* dst = fUCS2;
- for (;;) {
- SkUnichar uni = SkUTF8_NextUnichar(&utf8);
- *dst++ = SkToU16(uni);
- if (uni == 0) {
- break;
- }
- }
- fCount = (int)(dst - fUCS2);
-}
-
-SkAutoUCS2::~SkAutoUCS2() {
- sk_free(fUCS2);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-
SkString SkStringPrintf(const char* format, ...) {
SkString formattedOutput;
char buffer[kBufferSize];