From d17b63fd154fc79d6c6b99a04fe1a2c42ced4a2f Mon Sep 17 00:00:00 2001 From: Cary Clark Date: Wed, 3 Nov 2010 10:21:19 -0400 Subject: Unref the picture instead of deleting it This fixes a couple of bugs related to layers and hardware acceleration. The picture used by select text is now accessed asynchronously from the UI thread. The UI thread now unrefs it rather than deleting it outright. The layer position may not be up to date when the cursor rings are drawn, so update them if the cursor ring is in a layer. bug:3112657 bug:3030370 Change-Id: I99d07175ec30dcba895a26cf1d44bc0364430793 --- WebKit/android/nav/WebView.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'WebKit/android') diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp index 8720c44..06b5422 100644 --- a/WebKit/android/nav/WebView.cpp +++ b/WebKit/android/nav/WebView.cpp @@ -376,6 +376,15 @@ bool drawCursorPreamble(CachedRoot* root) m_viewImpl->m_hasCursorBounds = false; return false; } +#if USE(ACCELERATED_COMPOSITING) + if (node->isInLayer()) { + LayerAndroid* layer = const_cast(root->rootLayer()); + SkRect visible; + calcOurContentVisibleRect(&visible); + layer->updateFixedLayersPositions(visible); + layer->updatePositions(); + } +#endif setVisibleRect(root); m_ring.m_root = root; m_ring.m_frame = frame; @@ -632,7 +641,7 @@ CachedRoot* getFrameCache(FrameCachePermission allowNewer) } m_viewImpl->gFrameCacheMutex.lock(); delete m_frameCacheUI; - delete m_navPictureUI; + m_navPictureUI->safeUnref(); m_viewImpl->m_updatedFrameCache = false; m_frameCacheUI = m_viewImpl->m_frameCacheKit; m_navPictureUI = m_viewImpl->m_navPictureKit; -- cgit v1.1