diff options
| author | John Reck <jreck@google.com> | 2012-03-09 16:19:07 -0800 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-03-09 16:19:07 -0800 |
| commit | 296d05c7bd54360261dedc8d387a7bf9f52ca41b (patch) | |
| tree | 97dd9769169f55bd5ff1ea66bd6d729376344633 /Source/WebCore/platform | |
| parent | 1b54fe32a2615bc9df11de78e35f5adb730d0824 (diff) | |
| parent | df1b448056d65c28220fe303d82847094a215838 (diff) | |
| download | external_webkit-296d05c7bd54360261dedc8d387a7bf9f52ca41b.zip external_webkit-296d05c7bd54360261dedc8d387a7bf9f52ca41b.tar.gz external_webkit-296d05c7bd54360261dedc8d387a7bf9f52ca41b.tar.bz2 | |
Merge "Delete nativeSubtractLayers"
Diffstat (limited to 'Source/WebCore/platform')
| -rw-r--r-- | Source/WebCore/platform/graphics/android/LayerAndroid.cpp | 37 | ||||
| -rw-r--r-- | Source/WebCore/platform/graphics/android/LayerAndroid.h | 5 |
2 files changed, 0 insertions, 42 deletions
diff --git a/Source/WebCore/platform/graphics/android/LayerAndroid.cpp b/Source/WebCore/platform/graphics/android/LayerAndroid.cpp index 3549618..cef3d1c 100644 --- a/Source/WebCore/platform/graphics/android/LayerAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/LayerAndroid.cpp @@ -985,43 +985,6 @@ void LayerAndroid::setFixedPosition(FixedPositioning* position) { m_fixedPosition = position; } -SkRect LayerAndroid::subtractLayers(const SkRect& visibleRect) const -{ - SkRect result; - if (m_recordingPicture) { - // FIXME: This seems wrong. localToGlobal() applies the full local transform, - // se surely we should operate globalMatrix on size(), not bounds() with - // the position removed? Perhaps we never noticed the bug because most - // layers don't use a local transform? - // See http://b/5338388 - SkRect globalRect = bounds(); - globalRect.offset(-getPosition()); // localToGlobal adds in position - SkMatrix globalMatrix; - localToGlobal(&globalMatrix); - globalMatrix.mapRect(&globalRect); - SkIRect roundedGlobal; - globalRect.round(&roundedGlobal); - SkIRect iVisibleRect; - visibleRect.round(&iVisibleRect); - SkRegion visRegion(iVisibleRect); - visRegion.op(roundedGlobal, SkRegion::kDifference_Op); - result.set(visRegion.getBounds()); -#if DEBUG_NAV_UI - SkDebugf("%s visibleRect=(%g,%g,r=%g,b=%g) globalRect=(%g,%g,r=%g,b=%g)" - "result=(%g,%g,r=%g,b=%g)", __FUNCTION__, - visibleRect.fLeft, visibleRect.fTop, - visibleRect.fRight, visibleRect.fBottom, - globalRect.fLeft, globalRect.fTop, - globalRect.fRight, globalRect.fBottom, - result.fLeft, result.fTop, result.fRight, result.fBottom); -#endif - } else - result = visibleRect; - for (int i = 0; i < countChildren(); i++) - result = getChild(i)->subtractLayers(result); - return result; -} - void LayerAndroid::dumpLayer(FILE* file, int indentLevel) const { writeHexVal(file, indentLevel + 1, "layer", (int)this); diff --git a/Source/WebCore/platform/graphics/android/LayerAndroid.h b/Source/WebCore/platform/graphics/android/LayerAndroid.h index 2174ba4..2b8ad5d 100644 --- a/Source/WebCore/platform/graphics/android/LayerAndroid.h +++ b/Source/WebCore/platform/graphics/android/LayerAndroid.h @@ -183,11 +183,6 @@ public: SkPicture* picture() const { return m_recordingPicture; } - // Given a rect in global space, subtracts from it the bounds of this layer - // and of all of its children. Returns the bounding rectangle of the result, - // in global space. - SkRect subtractLayers(const SkRect&) const; - virtual void dumpLayer(FILE*, int indentLevel) const; void dumpLayers(FILE*, int indentLevel) const; void dumpToLog() const; |
