[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

jhawkins at chromium.org jhawkins at chromium.org
Wed Dec 22 13:41:48 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 10ea591c68aa03d4776364dfa4665668cabda007
Author: jhawkins at chromium.org <jhawkins at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Sep 23 17:56:21 2010 +0000

    2010-09-23  Steve VanDeBogart  <vandebo at chromium.org>
    
            Reviewed by David Levin.
    
            https://bugs.webkit.org/show_bug.cgi?id=46312
    
            Use Skia's SkSafeRef/SkSafeUnref functions instead of safeRef/safeUnref.
    
            * platform/graphics/chromium/FontLinux.cpp:
            (WebCore::Font::drawGlyphs):
            * platform/graphics/chromium/FontPlatformDataLinux.cpp:
            (WebCore::FontPlatformData::FontPlatformData):
            (WebCore::FontPlatformData::~FontPlatformData):
            * platform/graphics/skia/GradientSkia.cpp:
            (WebCore::Gradient::platformDestroy):
            * platform/graphics/skia/PatternSkia.cpp:
            (WebCore::Pattern::platformDestroy):
            * platform/graphics/skia/PlatformContextSkia.cpp:
            (WebCore::PlatformContextSkia::State::State):
            (WebCore::PlatformContextSkia::State::~State):
            (WebCore::PlatformContextSkia::drawRect):
            (WebCore::PlatformContextSkia::setStrokeShader):
            (WebCore::PlatformContextSkia::setFillShader):
            (WebCore::PlatformContextSkia::setDashPathEffect):
            * platform/graphics/skia/SkiaFontWin.cpp:
            (WebCore::paintSkiaText):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68165 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 8d3ba28..e52ca81 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,30 @@
+2010-09-23  Steve VanDeBogart  <vandebo at chromium.org>
+
+        Reviewed by David Levin.
+
+        https://bugs.webkit.org/show_bug.cgi?id=46312
+
+        Use Skia's SkSafeRef/SkSafeUnref functions instead of safeRef/safeUnref.
+
+        * platform/graphics/chromium/FontLinux.cpp:
+        (WebCore::Font::drawGlyphs):
+        * platform/graphics/chromium/FontPlatformDataLinux.cpp:
+        (WebCore::FontPlatformData::FontPlatformData):
+        (WebCore::FontPlatformData::~FontPlatformData):
+        * platform/graphics/skia/GradientSkia.cpp:
+        (WebCore::Gradient::platformDestroy):
+        * platform/graphics/skia/PatternSkia.cpp:
+        (WebCore::Pattern::platformDestroy):
+        * platform/graphics/skia/PlatformContextSkia.cpp:
+        (WebCore::PlatformContextSkia::State::State):
+        (WebCore::PlatformContextSkia::State::~State):
+        (WebCore::PlatformContextSkia::drawRect):
+        (WebCore::PlatformContextSkia::setStrokeShader):
+        (WebCore::PlatformContextSkia::setFillShader):
+        (WebCore::PlatformContextSkia::setDashPathEffect):
+        * platform/graphics/skia/SkiaFontWin.cpp:
+        (WebCore::paintSkiaText):
+
 2010-09-23  Lucas De Marchi  <lucas.demarchi at profusion.mobi>
 
         Reviewed by Csaba Osztrogonác.
diff --git a/WebCore/platform/graphics/chromium/FontLinux.cpp b/WebCore/platform/graphics/chromium/FontLinux.cpp
index 696cd9c..3d2fed3 100644
--- a/WebCore/platform/graphics/chromium/FontLinux.cpp
+++ b/WebCore/platform/graphics/chromium/FontLinux.cpp
@@ -130,7 +130,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 b51eb8c..0da873b 100644
--- a/WebCore/platform/graphics/chromium/FontPlatformDataLinux.cpp
+++ b/WebCore/platform/graphics/chromium/FontPlatformDataLinux.cpp
@@ -76,7 +76,7 @@ FontPlatformData::FontPlatformData(const FontPlatformData& src)
     , m_style(src.m_style)
     , m_harfbuzzFace(src.m_harfbuzzFace)
 {
-    m_typeface->safeRef();
+    SkSafeRef(m_typeface);
 }
 
 FontPlatformData::FontPlatformData(SkTypeface* tf, const char* family, float textSize, bool fakeBold, bool fakeItalic)
@@ -86,7 +86,7 @@ FontPlatformData::FontPlatformData(SkTypeface* tf, const char* family, float tex
     , m_fakeBold(fakeBold)
     , m_fakeItalic(fakeItalic)
 {
-    m_typeface->safeRef();
+    SkSafeRef(m_typeface);
     querySystemForRenderStyle();
 }
 
@@ -98,13 +98,13 @@ FontPlatformData::FontPlatformData(const FontPlatformData& src, float textSize)
     , m_fakeItalic(src.m_fakeItalic)
     , m_harfbuzzFace(src.m_harfbuzzFace)
 {
-    m_typeface->safeRef();
+    SkSafeRef(m_typeface);
     querySystemForRenderStyle();
 }
 
 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 66a8976..a636d10 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 88fbcdd..e08c465 100644
--- a/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
+++ b/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
@@ -162,19 +162,19 @@ PlatformContextSkia::State::State(const State& other)
     , m_interpolationQuality(other.m_interpolationQuality)
     , m_canvasClipApplied(other.m_canvasClipApplied)
 {
-    // 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();
+    // Up the ref count of these. SkSafeRef does nothing if its argument is 0.
+    SkSafeRef(m_looper);
+    SkSafeRef(m_dash);
+    SkSafeRef(m_fillShader);
+    SkSafeRef(m_strokeShader);
 }
 
 PlatformContextSkia::State::~State()
 {
-    m_looper->safeUnref();
-    m_dash->safeUnref();
-    m_fillShader->safeUnref();
-    m_strokeShader->safeUnref();
+    SkSafeUnref(m_looper);
+    SkSafeUnref(m_dash);
+    SkSafeUnref(m_fillShader);
+    SkSafeUnref(m_strokeShader);
 }
 
 // Returns a new State with all of this object's inherited properties copied.
@@ -327,7 +327,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);
@@ -341,7 +341,7 @@ void PlatformContextSkia::drawRect(SkRect rect)
         canvas()->drawRect(rightBorder, paint);
         setFillColor(oldFillColor);
         setFillShader(oldFillShader);
-        oldFillShader->safeUnref();
+        SkSafeUnref(oldFillShader);
     }
 }
 
@@ -487,9 +487,9 @@ 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();
+        SkSafeRef(m_state->m_strokeShader);
     }
 }
 
@@ -561,9 +561,9 @@ 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();
+        SkSafeRef(m_state->m_fillShader);
     }
 }
 
@@ -580,7 +580,7 @@ void PlatformContextSkia::setInterpolationQuality(InterpolationQuality interpola
 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 9edb775..6acfd35 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,

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list