diff options
Diffstat (limited to 'WebKit/android/nav/CachedLayer.cpp')
| -rw-r--r-- | WebKit/android/nav/CachedLayer.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/WebKit/android/nav/CachedLayer.cpp b/WebKit/android/nav/CachedLayer.cpp index c4293a5..f6b1859 100644 --- a/WebKit/android/nav/CachedLayer.cpp +++ b/WebKit/android/nav/CachedLayer.cpp @@ -168,6 +168,18 @@ SkPicture* CachedLayer::picture(const LayerAndroid* root) const return aLayer->picture(); } +void CachedLayer::toLocal(const LayerAndroid* root, int* xPtr, int* yPtr) const +{ + const LayerAndroid* aLayer = layer(root); + if (!aLayer) + return; + DBG_NAV_LOGD("root=%p aLayer=%p [%d]", root, aLayer, aLayer->uniqueId()); + SkRect localBounds; + aLayer->bounds(&localBounds); + *xPtr -= localBounds.fLeft; + *yPtr -= localBounds.fTop; +} + #if DUMP_NAV_CACHE CachedLayer* CachedLayer::Debug::base() const { |
