summaryrefslogtreecommitdiffstats
path: root/WebKit/android/nav
diff options
context:
space:
mode:
authorCary Clark <cary@android.com>2010-11-03 10:21:19 -0400
committerCary Clark <cary@android.com>2010-11-03 10:31:12 -0400
commitd17b63fd154fc79d6c6b99a04fe1a2c42ced4a2f (patch)
treea1acadf6d0f878a71011becd680c5b5038b0b55c /WebKit/android/nav
parentcc519b6e7f277a2aa0aa197bdb7163d662749552 (diff)
downloadexternal_webkit-d17b63fd154fc79d6c6b99a04fe1a2c42ced4a2f.zip
external_webkit-d17b63fd154fc79d6c6b99a04fe1a2c42ced4a2f.tar.gz
external_webkit-d17b63fd154fc79d6c6b99a04fe1a2c42ced4a2f.tar.bz2
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
Diffstat (limited to 'WebKit/android/nav')
-rw-r--r--WebKit/android/nav/WebView.cpp11
1 files changed, 10 insertions, 1 deletions
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<LayerAndroid*>(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;