diff options
Diffstat (limited to 'WebKit/android')
-rw-r--r-- | WebKit/android/jni/PictureSet.cpp | 14 | ||||
-rw-r--r-- | WebKit/android/jni/WebViewCore.cpp | 2 | ||||
-rw-r--r-- | WebKit/android/nav/CachedRoot.cpp | 6 | ||||
-rw-r--r-- | WebKit/android/nav/FindCanvas.cpp | 8 | ||||
-rw-r--r-- | WebKit/android/nav/SelectText.cpp | 16 | ||||
-rw-r--r-- | WebKit/android/nav/WebView.cpp | 6 | ||||
-rw-r--r-- | WebKit/android/plugins/ANPTypefaceInterface.cpp | 4 | ||||
-rw-r--r-- | WebKit/android/plugins/PluginWidgetAndroid.cpp | 4 |
8 files changed, 30 insertions, 30 deletions
diff --git a/WebKit/android/jni/PictureSet.cpp b/WebKit/android/jni/PictureSet.cpp index 98cda23..6dafd26 100644 --- a/WebKit/android/jni/PictureSet.cpp +++ b/WebKit/android/jni/PictureSet.cpp @@ -68,7 +68,7 @@ PictureSet::~PictureSet() void PictureSet::add(const Pictures* temp) { Pictures pictureAndBounds = *temp; - pictureAndBounds.mPicture->safeRef(); + SkSafeRef(pictureAndBounds.mPicture); pictureAndBounds.mWroteElapsed = false; mPictures.append(pictureAndBounds); } @@ -80,7 +80,7 @@ void PictureSet::add(const SkRegion& area, SkPicture* picture, area.getBounds().fLeft, area.getBounds().fTop, area.getBounds().fRight, area.getBounds().fBottom, picture, elapsed, split); - picture->safeRef(); + SkSafeRef(picture); /* if nothing is drawn beneath part of the new picture, mark it as a base */ SkRegion diff = SkRegion(area); Pictures* last = mPictures.end(); @@ -150,7 +150,7 @@ bool PictureSet::build() } } if (tossPicture) { - working->mPicture->safeUnref(); + SkSafeUnref(working->mPicture); working->mPicture = NULL; // mark to redraw } if (working->mPicture == NULL) // may have been set to null elsewhere @@ -211,7 +211,7 @@ void PictureSet::clear() Pictures* last = mPictures.end(); for (Pictures* working = mPictures.begin(); working != last; working++) { working->mArea.setEmpty(); - working->mPicture->safeUnref(); + SkSafeUnref(working->mPicture); } mPictures.clear(); mWidth = mHeight = 0; @@ -362,7 +362,7 @@ public: return true; } - virtual void commonDrawBitmap(const SkBitmap& bitmap, + virtual void commonDrawBitmap(const SkBitmap& bitmap, const SkIRect* rect, const SkMatrix& , const SkPaint& ) { if (bitmap.width() <= 1 || bitmap.height() <= 1) return; @@ -476,7 +476,7 @@ bool PictureSet::reuseSubdivided(const SkRegion& inval) if ((working->mSplit == false || invalBounds != working->mUnsplit) && inval.contains(working->mArea) == false) continue; - working->mPicture->safeUnref(); + SkSafeUnref(working->mPicture); working->mPicture = NULL; } return true; @@ -526,7 +526,7 @@ void PictureSet::setDrawTimes(const PictureSet& src) void PictureSet::setPicture(size_t i, SkPicture* p) { - mPictures[i].mPicture->safeUnref(); + SkSafeUnref(mPictures[i].mPicture); mPictures[i].mPicture = p; mPictures[i].mEmpty = emptyPicture(p); } diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp index 66c78b5..727cce3 100644 --- a/WebKit/android/jni/WebViewCore.cpp +++ b/WebKit/android/jni/WebViewCore.cpp @@ -670,7 +670,7 @@ void WebViewCore::recordPictureSet(PictureSet* content) DBG_SET_LOGD("{%d,%d,w=%d,h=%d}", inval.fLeft, inval.fTop, inval.width(), inval.height()); content->add(m_addInval, picture, 0, false); - picture->safeUnref(); + SkSafeUnref(picture); } // Remove any pictures already in the set that are obscured by the new one, // and check to see if any already split pieces need to be redrawn. diff --git a/WebKit/android/nav/CachedRoot.cpp b/WebKit/android/nav/CachedRoot.cpp index 2662071..33e7b4f 100644 --- a/WebKit/android/nav/CachedRoot.cpp +++ b/WebKit/android/nav/CachedRoot.cpp @@ -160,11 +160,11 @@ public: INHERITED::drawPath(path, paint); } - virtual void commonDrawBitmap(const SkBitmap& bitmap, + virtual void commonDrawBitmap(const SkBitmap& bitmap, const SkIRect* rect, const SkMatrix& matrix, const SkPaint& paint) { mBounder.setType(CommonCheck::kDrawBitmap_Type); mBounder.setIsOpaque(bitmap.isOpaque()); - INHERITED::commonDrawBitmap(bitmap, matrix, paint); + INHERITED::commonDrawBitmap(bitmap, rect, matrix, paint); } virtual void drawSprite(const SkBitmap& bitmap, int left, int top, @@ -508,7 +508,7 @@ protected: // Currently webkit's bitmap draws always seem to be cull'd before this entry // point is called, so we assume that any bitmap that gets here is inside our // tiny clip (may not be true in the future) - virtual void commonDrawBitmap(const SkBitmap& bitmap, + virtual void commonDrawBitmap(const SkBitmap& bitmap, const SkIRect* rect, const SkMatrix& , const SkPaint& ) { SkPixelRef* pixelRef = bitmap.pixelRef(); if (pixelRef != NULL) { diff --git a/WebKit/android/nav/FindCanvas.cpp b/WebKit/android/nav/FindCanvas.cpp index e1bfd82..2d310b3 100644 --- a/WebKit/android/nav/FindCanvas.cpp +++ b/WebKit/android/nav/FindCanvas.cpp @@ -49,18 +49,18 @@ MatchInfo::MatchInfo() { } MatchInfo::~MatchInfo() { - m_picture->safeUnref(); + SkSafeUnref(m_picture); } MatchInfo::MatchInfo(const MatchInfo& src) { m_layerId = src.m_layerId; m_location = src.m_location; m_picture = src.m_picture; - m_picture->safeRef(); + SkSafeRef(m_picture); } void MatchInfo::set(const SkRegion& region, SkPicture* pic, int layerId) { - m_picture->safeUnref(); + SkSafeUnref(m_picture); m_layerId = layerId; m_location = region; m_picture = pic; @@ -161,7 +161,7 @@ FindCanvas::~FindCanvas() { setBounder(NULL); /* Just in case getAndClear was not called. */ delete mMatches; - mWorkingPicture->safeUnref(); + SkSafeUnref(mWorkingPicture); } // Each version of addMatch returns a rectangle for a match. diff --git a/WebKit/android/nav/SelectText.cpp b/WebKit/android/nav/SelectText.cpp index 87d1791..fce05f7 100644 --- a/WebKit/android/nav/SelectText.cpp +++ b/WebKit/android/nav/SelectText.cpp @@ -1208,7 +1208,7 @@ public: virtual void drawPath(const SkPath& path, const SkPaint& paint) { } - virtual void commonDrawBitmap(const SkBitmap& bitmap, + virtual void commonDrawBitmap(const SkBitmap& bitmap, const SkIRect* rect, const SkMatrix& matrix, const SkPaint& paint) { } @@ -1386,13 +1386,13 @@ SelectText::SelectText() paint.setShader(dropGradient); canvas->drawRect(endDropRect, paint); m_endControl.endRecording(); - fillGradient->safeUnref(); - dropGradient->safeUnref(); + SkSafeUnref(fillGradient); + SkSafeUnref(dropGradient); } SelectText::~SelectText() { - m_picture->safeUnref(); + SkSafeUnref(m_picture); } void SelectText::draw(SkCanvas* canvas, LayerAndroid* layer, IntRect* inval) @@ -1400,9 +1400,9 @@ void SelectText::draw(SkCanvas* canvas, LayerAndroid* layer, IntRect* inval) if (m_layerId != layer->uniqueId()) return; // reset m_picture to match m_layerId - m_picture->safeUnref(); + SkSafeUnref(m_picture); m_picture = layer->picture(); - m_picture->safeRef(); + SkSafeRef(m_picture); DBG_NAV_LOGD("m_extendSelection=%d m_drawPointer=%d layer [%d]", m_extendSelection, m_drawPointer, layer->uniqueId()); if (m_extendSelection) @@ -1799,7 +1799,7 @@ void SelectText::reset() m_lastEnd.setEmpty(); m_extendSelection = false; m_startSelection = false; - m_picture->safeUnref(); + SkSafeUnref(m_picture); m_picture = 0; m_layerId = 0; } @@ -1858,7 +1858,7 @@ bool SelectText::startSelection(const CachedRoot* root, const IntRect& vis, m_wordSelection = false; m_startOffset.set(x, y); DBG_NAV_LOGD("x/y=(%d,%d)", x, y); - m_picture->safeUnref(); + SkSafeUnref(m_picture); m_picture = root->pictureAt(&x, &y, &m_layerId); DBG_NAV_LOGD("m_picture=%p m_layerId=%d x/y=(%d,%d)", m_picture, m_layerId, x, y); diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp index edd362c..177a9ce 100644 --- a/WebKit/android/nav/WebView.cpp +++ b/WebKit/android/nav/WebView.cpp @@ -210,7 +210,7 @@ WebView(JNIEnv* env, jobject javaWebView, int viewImpl) : #endif delete m_frameCacheUI; delete m_navPictureUI; - m_baseLayer->safeUnref(); + SkSafeUnref(m_baseLayer); delete m_glDrawFunctor; } @@ -686,7 +686,7 @@ CachedRoot* getFrameCache(FrameCachePermission allowNewer) } m_viewImpl->gFrameCacheMutex.lock(); delete m_frameCacheUI; - m_navPictureUI->safeUnref(); + SkSafeUnref(m_navPictureUI); m_viewImpl->m_updatedFrameCache = false; m_frameCacheUI = m_viewImpl->m_frameCacheKit; m_navPictureUI = m_viewImpl->m_navPictureKit; @@ -1396,7 +1396,7 @@ void setBaseLayer(BaseLayerAndroid* layer, WebCore::IntRect& rect, bool showVisu copyScrollPositionRecursive(compositeRoot(), newCompositeRoot); } #endif - m_baseLayer->safeUnref(); + SkSafeUnref(m_baseLayer); m_baseLayer = layer; CachedRoot* root = getFrameCache(DontAllowNewer); if (!root) diff --git a/WebKit/android/plugins/ANPTypefaceInterface.cpp b/WebKit/android/plugins/ANPTypefaceInterface.cpp index 4b2dda2..99734a7 100644 --- a/WebKit/android/plugins/ANPTypefaceInterface.cpp +++ b/WebKit/android/plugins/ANPTypefaceInterface.cpp @@ -46,11 +46,11 @@ static int32_t anp_getRefCount(const ANPTypeface* tf) { } static void anp_ref(ANPTypeface* tf) { - tf->safeRef(); + SkSafeRef(tf); } static void anp_unref(ANPTypeface* tf) { - tf->safeUnref(); + SkSafeUnref(tf); } static ANPTypefaceStyle anp_getStyle(const ANPTypeface* tf) { diff --git a/WebKit/android/plugins/PluginWidgetAndroid.cpp b/WebKit/android/plugins/PluginWidgetAndroid.cpp index be89a68..d7d4fa7 100644 --- a/WebKit/android/plugins/PluginWidgetAndroid.cpp +++ b/WebKit/android/plugins/PluginWidgetAndroid.cpp @@ -95,7 +95,7 @@ PluginWidgetAndroid::~PluginWidgetAndroid() { env->DeleteGlobalRef(m_embeddedView); } - m_flipPixelRef->safeUnref(); + SkSafeUnref(m_flipPixelRef); if (m_layer) m_layer->unref(); @@ -148,7 +148,7 @@ void PluginWidgetAndroid::setWindow(NPWindow* window, bool isTransparent) { layoutSurface(boundsChanged); if (m_drawingModel != kSurface_ANPDrawingModel) { - m_flipPixelRef->safeUnref(); + SkSafeUnref(m_flipPixelRef); m_flipPixelRef = new SkFlipPixelRef(computeConfig(isTransparent), window->width, window->height); } |