summaryrefslogtreecommitdiffstats
path: root/WebCore
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2011-05-12 12:23:22 -0700
committerAndroid Code Review <code-review@android.com>2011-05-12 12:23:22 -0700
commitd45deba0c666cf706366b04ae4e529c91ff23e79 (patch)
tree022bf886c16aa9b9bd6f9f97b87c1584373f7c36 /WebCore
parent555569c59ced09743507966f73d2d500c6deccec (diff)
parent6128cfebcb8c4332a5335f97fb600a195222f62a (diff)
downloadexternal_webkit-d45deba0c666cf706366b04ae4e529c91ff23e79.zip
external_webkit-d45deba0c666cf706366b04ae4e529c91ff23e79.tar.gz
external_webkit-d45deba0c666cf706366b04ae4e529c91ff23e79.tar.bz2
Merge "Switch to SkSafeRef"
Diffstat (limited to 'WebCore')
-rw-r--r--WebCore/platform/graphics/android/FontCustomPlatformData.cpp2
-rw-r--r--WebCore/platform/graphics/android/FontPlatformDataAndroid.cpp8
-rw-r--r--WebCore/platform/graphics/android/GraphicsContextAndroid.cpp2
-rw-r--r--WebCore/platform/graphics/chromium/FontPlatformDataLinux.cpp6
-rw-r--r--WebCore/platform/graphics/skia/PlatformContextSkia.cpp14
5 files changed, 16 insertions, 16 deletions
diff --git a/WebCore/platform/graphics/android/FontCustomPlatformData.cpp b/WebCore/platform/graphics/android/FontCustomPlatformData.cpp
index ba37ce8..a4a741c 100644
--- a/WebCore/platform/graphics/android/FontCustomPlatformData.cpp
+++ b/WebCore/platform/graphics/android/FontCustomPlatformData.cpp
@@ -35,7 +35,7 @@ namespace WebCore {
FontCustomPlatformData::FontCustomPlatformData(SkTypeface* face)
{
- face->safeRef();
+ SkSafeRef(face);
m_typeface = face;
}
diff --git a/WebCore/platform/graphics/android/FontPlatformDataAndroid.cpp b/WebCore/platform/graphics/android/FontPlatformDataAndroid.cpp
index 795bbe8..a0a76bc 100644
--- a/WebCore/platform/graphics/android/FontPlatformDataAndroid.cpp
+++ b/WebCore/platform/graphics/android/FontPlatformDataAndroid.cpp
@@ -73,7 +73,7 @@ FontPlatformData::FontPlatformData()
FontPlatformData::FontPlatformData(const FontPlatformData& src)
{
if (hashTableDeletedFontValue() != src.mTypeface) {
- src.mTypeface->safeRef();
+ SkSafeRef(src.mTypeface);
}
mTypeface = src.mTypeface;
@@ -90,7 +90,7 @@ FontPlatformData::FontPlatformData(SkTypeface* tf, float textSize, bool fakeBold
: mTypeface(tf), mTextSize(textSize), mFakeBold(fakeBold), mFakeItalic(fakeItalic)
{
if (hashTableDeletedFontValue() != mTypeface) {
- mTypeface->safeRef();
+ SkSafeRef(mTypeface);
}
inc_count();
@@ -101,7 +101,7 @@ FontPlatformData::FontPlatformData(const FontPlatformData& src, float textSize)
: mTypeface(src.mTypeface), mTextSize(textSize), mFakeBold(src.mFakeBold), mFakeItalic(src.mFakeItalic)
{
if (hashTableDeletedFontValue() != mTypeface) {
- mTypeface->safeRef();
+ SkSafeRef(mTypeface);
}
inc_count();
@@ -130,7 +130,7 @@ FontPlatformData::~FontPlatformData()
FontPlatformData& FontPlatformData::operator=(const FontPlatformData& src)
{
if (hashTableDeletedFontValue() != src.mTypeface) {
- src.mTypeface->safeRef();
+ SkSafeRef(src.mTypeface);
}
if (hashTableDeletedFontValue() != mTypeface) {
SkSafeUnref(mTypeface);
diff --git a/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp b/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp
index 6f33b19..71f0a73 100644
--- a/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp
+++ b/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp
@@ -116,7 +116,7 @@ public:
State(const State& other) {
memcpy(this, &other, sizeof(State));
mPath = deepCopyPtr<SkPath>(other.mPath);
- mPathEffect->safeRef();
+ SkSafeRef(mPathEffect);
}
~State() {
diff --git a/WebCore/platform/graphics/chromium/FontPlatformDataLinux.cpp b/WebCore/platform/graphics/chromium/FontPlatformDataLinux.cpp
index 4626165..7e2fb52 100644
--- a/WebCore/platform/graphics/chromium/FontPlatformDataLinux.cpp
+++ b/WebCore/platform/graphics/chromium/FontPlatformDataLinux.cpp
@@ -71,7 +71,7 @@ FontPlatformData::FontPlatformData(const FontPlatformData& src)
, m_fakeItalic(src.m_fakeItalic)
, m_harfbuzzFace(src.m_harfbuzzFace)
{
- m_typeface->safeRef();
+ SkSafeRef(m_typeface);
}
FontPlatformData::FontPlatformData(SkTypeface* tf, float textSize, bool fakeBold, bool fakeItalic)
@@ -80,7 +80,7 @@ FontPlatformData::FontPlatformData(SkTypeface* tf, float textSize, bool fakeBold
, m_fakeBold(fakeBold)
, m_fakeItalic(fakeItalic)
{
- m_typeface->safeRef();
+ SkSafeRef(m_typeface);
}
FontPlatformData::FontPlatformData(const FontPlatformData& src, float textSize)
@@ -90,7 +90,7 @@ FontPlatformData::FontPlatformData(const FontPlatformData& src, float textSize)
, m_fakeItalic(src.m_fakeItalic)
, m_harfbuzzFace(src.m_harfbuzzFace)
{
- m_typeface->safeRef();
+ SkSafeRef(m_typeface);
}
FontPlatformData::~FontPlatformData()
diff --git a/WebCore/platform/graphics/skia/PlatformContextSkia.cpp b/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
index 209d200..1adcb59 100644
--- a/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
+++ b/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
@@ -149,10 +149,10 @@ PlatformContextSkia::State::State(const State& other)
#endif
{
// Up the ref count of these. saveRef does nothing if 'this' is NULL.
- m_looper->safeRef();
- m_dash->safeRef();
- m_fillShader->safeRef();
- m_strokeShader->safeRef();
+ SkSafeRef(m_looper);
+ SkSafeRef(m_dash);
+ SkSafeRef(m_fillShader);
+ SkSafeRef(m_strokeShader);
}
PlatformContextSkia::State::~State()
@@ -305,7 +305,7 @@ void PlatformContextSkia::drawRect(SkRect rect)
// setFillColor() will set the shader to NULL, so save a ref to it now.
SkShader* oldFillShader = m_state->m_fillShader;
- oldFillShader->safeRef();
+ SkSafeRef(oldFillShader);
setFillColor(m_state->m_strokeColor);
paint.reset();
setupPaintForFilling(&paint);
@@ -479,7 +479,7 @@ void PlatformContextSkia::setStrokeShader(SkShader* strokeShader)
if (strokeShader != m_state->m_strokeShader) {
SkSafeUnref(m_state->m_strokeShader);
m_state->m_strokeShader = strokeShader;
- m_state->m_strokeShader->safeRef();
+ SkSafeRef(m_state->m_strokeShader);
}
}
@@ -547,7 +547,7 @@ void PlatformContextSkia::setFillShader(SkShader* fillShader)
if (fillShader != m_state->m_fillShader) {
SkSafeUnref(m_state->m_fillShader);
m_state->m_fillShader = fillShader;
- m_state->m_fillShader->safeRef();
+ SkSafeRef(m_state->m_fillShader);
}
}