summaryrefslogtreecommitdiffstats
path: root/WebCore
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore')
-rw-r--r--WebCore/platform/graphics/android/FontCustomPlatformData.cpp2
-rw-r--r--WebCore/platform/graphics/android/FontPlatformDataAndroid.cpp4
-rw-r--r--WebCore/platform/graphics/android/GradientAndroid.cpp4
-rw-r--r--WebCore/platform/graphics/android/GraphicsContextAndroid.cpp4
-rw-r--r--WebCore/platform/graphics/android/LayerAndroid.cpp6
-rw-r--r--WebCore/platform/graphics/android/PatternAndroid.cpp2
-rw-r--r--WebCore/platform/graphics/chromium/FontLinux.cpp2
-rw-r--r--WebCore/platform/graphics/chromium/FontPlatformDataLinux.cpp2
-rw-r--r--WebCore/platform/graphics/skia/GradientSkia.cpp2
-rw-r--r--WebCore/platform/graphics/skia/PatternSkia.cpp2
-rw-r--r--WebCore/platform/graphics/skia/PlatformContextSkia.cpp16
-rw-r--r--WebCore/platform/graphics/skia/SkiaFontWin.cpp2
12 files changed, 24 insertions, 24 deletions
diff --git a/WebCore/platform/graphics/android/FontCustomPlatformData.cpp b/WebCore/platform/graphics/android/FontCustomPlatformData.cpp
index d954e70..ba37ce8 100644
--- a/WebCore/platform/graphics/android/FontCustomPlatformData.cpp
+++ b/WebCore/platform/graphics/android/FontCustomPlatformData.cpp
@@ -41,7 +41,7 @@ FontCustomPlatformData::FontCustomPlatformData(SkTypeface* face)
FontCustomPlatformData::~FontCustomPlatformData()
{
- m_typeface->safeUnref();
+ SkSafeUnref(m_typeface);
// the unref is enough to release the font data...
}
diff --git a/WebCore/platform/graphics/android/FontPlatformDataAndroid.cpp b/WebCore/platform/graphics/android/FontPlatformDataAndroid.cpp
index 640940f..795bbe8 100644
--- a/WebCore/platform/graphics/android/FontPlatformDataAndroid.cpp
+++ b/WebCore/platform/graphics/android/FontPlatformDataAndroid.cpp
@@ -123,7 +123,7 @@ FontPlatformData::~FontPlatformData()
#endif
if (hashTableDeletedFontValue() != mTypeface) {
- mTypeface->safeUnref();
+ SkSafeUnref(mTypeface);
}
}
@@ -133,7 +133,7 @@ FontPlatformData& FontPlatformData::operator=(const FontPlatformData& src)
src.mTypeface->safeRef();
}
if (hashTableDeletedFontValue() != mTypeface) {
- mTypeface->safeUnref();
+ SkSafeUnref(mTypeface);
}
mTypeface = src.mTypeface;
diff --git a/WebCore/platform/graphics/android/GradientAndroid.cpp b/WebCore/platform/graphics/android/GradientAndroid.cpp
index 72ae336..b8dc9dd 100644
--- a/WebCore/platform/graphics/android/GradientAndroid.cpp
+++ b/WebCore/platform/graphics/android/GradientAndroid.cpp
@@ -38,7 +38,7 @@
class PlatformGradientRec {
public:
PlatformGradientRec() : m_shader(NULL) {}
- ~PlatformGradientRec() { m_shader->safeUnref(); }
+ ~PlatformGradientRec() { SkSafeUnref(m_shader); }
SkShader* m_shader;
SkShader::TileMode m_tileMode;
@@ -102,7 +102,7 @@ SkShader* Gradient::getShader(SkShader::TileMode mode)
s = new SkColorShader(0);
// zap our previous shader, if present
- m_gradient->m_shader->safeUnref();
+ SkSafeUnref(m_gradient->m_shader);
m_gradient->m_shader = s;
m_gradient->m_tileMode = mode;
SkMatrix matrix = m_gradientSpaceTransformation;
diff --git a/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp b/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp
index 369dce2..6f33b19 100644
--- a/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp
+++ b/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp
@@ -121,7 +121,7 @@ public:
~State() {
delete mPath;
- mPathEffect->safeUnref();
+ SkSafeUnref(mPathEffect);
}
void setShadow(int radius, int dx, int dy, SkColor c) {
@@ -986,7 +986,7 @@ void GraphicsContext::setLineDash(const DashArray& dashes, float dashOffset)
for (unsigned int i = 0; i < count; i++)
intervals[i] = SkFloatToScalar(dashes[i % dashLength]);
SkPathEffect **effectPtr = &m_data->mState->mPathEffect;
- (*effectPtr)->safeUnref();
+ SkSafeUnref((*effectPtr));
*effectPtr = new SkDashPathEffect(intervals, count, SkFloatToScalar(dashOffset));
delete[] intervals;
diff --git a/WebCore/platform/graphics/android/LayerAndroid.cpp b/WebCore/platform/graphics/android/LayerAndroid.cpp
index d6ba0a1..e651139 100644
--- a/WebCore/platform/graphics/android/LayerAndroid.cpp
+++ b/WebCore/platform/graphics/android/LayerAndroid.cpp
@@ -120,7 +120,7 @@ LayerAndroid::LayerAndroid(SkPicture* picture) : SkLayer(),
LayerAndroid::~LayerAndroid()
{
removeChildren();
- m_recordingPicture->safeUnref();
+ SkSafeUnref(m_recordingPicture);
m_animations.clear();
gDebugLayerAndroidInstances--;
}
@@ -375,11 +375,11 @@ bool LayerAndroid::prepareContext(bool force)
|| (m_recordingPicture
&& ((m_recordingPicture->width() != (int) getSize().width())
|| (m_recordingPicture->height() != (int) getSize().height())))) {
- m_recordingPicture->safeUnref();
+ SkSafeUnref(m_recordingPicture);
m_recordingPicture = new SkPicture();
}
} else if (m_recordingPicture) {
- m_recordingPicture->safeUnref();
+ SkSafeUnref(m_recordingPicture);
m_recordingPicture = 0;
}
diff --git a/WebCore/platform/graphics/android/PatternAndroid.cpp b/WebCore/platform/graphics/android/PatternAndroid.cpp
index 5a3fd8f..568036c 100644
--- a/WebCore/platform/graphics/android/PatternAndroid.cpp
+++ b/WebCore/platform/graphics/android/PatternAndroid.cpp
@@ -42,7 +42,7 @@ static SkShader::TileMode toTileMode(bool doRepeat) {
void Pattern::platformDestroy()
{
- m_pattern->safeUnref();
+ SkSafeUnref(m_pattern);
m_pattern = 0;
}
diff --git a/WebCore/platform/graphics/chromium/FontLinux.cpp b/WebCore/platform/graphics/chromium/FontLinux.cpp
index e76eca8..8bb508b 100644
--- a/WebCore/platform/graphics/chromium/FontLinux.cpp
+++ b/WebCore/platform/graphics/chromium/FontLinux.cpp
@@ -128,7 +128,7 @@ void Font::drawGlyphs(GraphicsContext* gc, const SimpleFontData* font,
if (textMode & cTextFill) {
// If we also filled, we don't want to draw shadows twice.
// See comment in FontChromiumWin.cpp::paintSkiaText() for more details.
- paint.setLooper(0)->safeUnref();
+ SkSafeUnref(paint.setLooper(0));
}
canvas->drawPosText(glyphs, numGlyphs << 1, pos, paint);
diff --git a/WebCore/platform/graphics/chromium/FontPlatformDataLinux.cpp b/WebCore/platform/graphics/chromium/FontPlatformDataLinux.cpp
index bf4697f..4626165 100644
--- a/WebCore/platform/graphics/chromium/FontPlatformDataLinux.cpp
+++ b/WebCore/platform/graphics/chromium/FontPlatformDataLinux.cpp
@@ -95,7 +95,7 @@ FontPlatformData::FontPlatformData(const FontPlatformData& src, float textSize)
FontPlatformData::~FontPlatformData()
{
- m_typeface->safeUnref();
+ SkSafeUnref(m_typeface);
}
FontPlatformData& FontPlatformData::operator=(const FontPlatformData& src)
diff --git a/WebCore/platform/graphics/skia/GradientSkia.cpp b/WebCore/platform/graphics/skia/GradientSkia.cpp
index 7370a49..08cdc4a 100644
--- a/WebCore/platform/graphics/skia/GradientSkia.cpp
+++ b/WebCore/platform/graphics/skia/GradientSkia.cpp
@@ -42,7 +42,7 @@ namespace WebCore {
void Gradient::platformDestroy()
{
if (m_gradient)
- m_gradient->safeUnref();
+ SkSafeUnref(m_gradient);
m_gradient = 0;
}
diff --git a/WebCore/platform/graphics/skia/PatternSkia.cpp b/WebCore/platform/graphics/skia/PatternSkia.cpp
index bd27b6a..72fac77 100644
--- a/WebCore/platform/graphics/skia/PatternSkia.cpp
+++ b/WebCore/platform/graphics/skia/PatternSkia.cpp
@@ -42,7 +42,7 @@ namespace WebCore {
void Pattern::platformDestroy()
{
- m_pattern->safeUnref();
+ SkSafeUnref(m_pattern);
m_pattern = 0;
}
diff --git a/WebCore/platform/graphics/skia/PlatformContextSkia.cpp b/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
index 92a1870..209d200 100644
--- a/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
+++ b/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
@@ -157,10 +157,10 @@ PlatformContextSkia::State::State(const State& other)
PlatformContextSkia::State::~State()
{
- m_looper->safeUnref();
- m_dash->safeUnref();
- m_fillShader->safeUnref();
- m_strokeShader->safeUnref();
+ SkSafeUnref(m_looper);
+ SkSafeUnref(m_dash);
+ SkSafeUnref(m_fill);
+ SkSafeUnref(m_stro);
}
SkColor PlatformContextSkia::State::applyAlpha(SkColor c) const
@@ -319,7 +319,7 @@ void PlatformContextSkia::drawRect(SkRect rect)
canvas()->drawRect(rightBorder, paint);
setFillColor(oldFillColor);
setFillShader(oldFillShader);
- oldFillShader->safeUnref();
+ SkSafeUnref(oldFillShader);
}
}
@@ -477,7 +477,7 @@ void PlatformContextSkia::setStrokeThickness(float thickness)
void PlatformContextSkia::setStrokeShader(SkShader* strokeShader)
{
if (strokeShader != m_state->m_strokeShader) {
- m_state->m_strokeShader->safeUnref();
+ SkSafeUnref(m_state->m_strokeShader);
m_state->m_strokeShader = strokeShader;
m_state->m_strokeShader->safeRef();
}
@@ -545,7 +545,7 @@ void PlatformContextSkia::setFillRule(SkPath::FillType fr)
void PlatformContextSkia::setFillShader(SkShader* fillShader)
{
if (fillShader != m_state->m_fillShader) {
- m_state->m_fillShader->safeUnref();
+ SkSafeUnref(m_state->m_fillShader);
m_state->m_fillShader = fillShader;
m_state->m_fillShader->safeRef();
}
@@ -554,7 +554,7 @@ void PlatformContextSkia::setFillShader(SkShader* fillShader)
void PlatformContextSkia::setDashPathEffect(SkDashPathEffect* dash)
{
if (dash != m_state->m_dash) {
- m_state->m_dash->safeUnref();
+ SkSafeUnref(m_state->m_dash);
m_state->m_dash = dash;
}
}
diff --git a/WebCore/platform/graphics/skia/SkiaFontWin.cpp b/WebCore/platform/graphics/skia/SkiaFontWin.cpp
index 58fa7d3..35ceb95 100644
--- a/WebCore/platform/graphics/skia/SkiaFontWin.cpp
+++ b/WebCore/platform/graphics/skia/SkiaFontWin.cpp
@@ -340,7 +340,7 @@ bool paintSkiaText(GraphicsContext* context,
// thing would be to draw to a new layer and then draw that layer
// with a shadow. But this is a lot of extra work for something
// that isn't normally an issue.
- paint.setLooper(0)->safeUnref();
+ SkSafeUnref(paint.setLooper(0));
}
if (!skiaDrawText(hfont, dc, platformContext->canvas(), *origin, &paint,