diff options
author | Cary Clark <cary@android.com> | 2010-02-17 17:04:56 -0500 |
---|---|---|
committer | Cary Clark <cary@android.com> | 2010-02-17 17:04:56 -0500 |
commit | 41ca040d7db923a179953baf91f30d539df6b055 (patch) | |
tree | 7bd5f5cc09454747e654a480432ea8262740b599 /WebCore/platform | |
parent | b68fe3b6cc6c889ab4dc79e773592df07b121279 (diff) | |
download | external_webkit-41ca040d7db923a179953baf91f30d539df6b055.zip external_webkit-41ca040d7db923a179953baf91f30d539df6b055.tar.gz external_webkit-41ca040d7db923a179953baf91f30d539df6b055.tar.bz2 |
minor fixes to layer nav
- get rid of the FloatPoint interface in LayerAndroid;
use (x, y) instead
- make CachedFrame a friend of CachedRoot and CacheBuilder
a friend of CachedNode so they alone can access private fields.
- assume the LayerAndroid picture can sometimes be null.
If it is, use the main page's picture instead.
http://b/2369549
Diffstat (limited to 'WebCore/platform')
-rw-r--r-- | WebCore/platform/graphics/android/LayerAndroid.cpp | 6 | ||||
-rw-r--r-- | WebCore/platform/graphics/android/LayerAndroid.h | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/WebCore/platform/graphics/android/LayerAndroid.cpp b/WebCore/platform/graphics/android/LayerAndroid.cpp index 8fb335e..44f19c2 100644 --- a/WebCore/platform/graphics/android/LayerAndroid.cpp +++ b/WebCore/platform/graphics/android/LayerAndroid.cpp @@ -205,16 +205,16 @@ void LayerAndroid::clipInner(SkTDArray<SkRect>* region, getChild(i)->clipInner(region, m_haveClip ? localBounds : local); } -const LayerAndroid* LayerAndroid::find(FloatPoint pos) const +const LayerAndroid* LayerAndroid::find(int x, int y) const { for (int i = 0; i < countChildren(); i++) { - const LayerAndroid* found = getChild(i)->find(pos); + const LayerAndroid* found = getChild(i)->find(x, y); if (found) return found; } SkRect localBounds; bounds(&localBounds); - if (localBounds.contains(pos)) + if (localBounds.contains(x, y)) return this; return 0; } diff --git a/WebCore/platform/graphics/android/LayerAndroid.h b/WebCore/platform/graphics/android/LayerAndroid.h index deb51bc..841eeb8 100644 --- a/WebCore/platform/graphics/android/LayerAndroid.h +++ b/WebCore/platform/graphics/android/LayerAndroid.h @@ -19,7 +19,6 @@ #if USE(ACCELERATED_COMPOSITING) -#include "FloatPoint.h" #include "RefPtr.h" #include "SkColor.h" #include "SkLayer.h" @@ -54,7 +53,6 @@ public: void setIsRootLayer(bool isRootLayer) { m_isRootLayer = isRootLayer; } virtual void draw(SkCanvas*, const SkRect* viewPort); -// GraphicsContext* paintContext(); bool prepareContext(bool force = false); void startRecording(); void stopRecording(); @@ -74,7 +72,7 @@ public: void bounds(SkRect* ) const; bool calcPosition(const SkRect* viewPort, SkMatrix*); void clipArea(SkTDArray<SkRect>* region) const; - const LayerAndroid* find(FloatPoint position) const; + const LayerAndroid* find(int x, int y) const; const LayerAndroid* findById(int uniqueID) const; LayerAndroid* getChild(int index) const { return static_cast<LayerAndroid*>(m_children[index]); } |