diff options
Diffstat (limited to 'Source/WebCore/platform/graphics/android/layers')
7 files changed, 12 insertions, 12 deletions
diff --git a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp index 84ce910..a652d3e 100644 --- a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp @@ -211,9 +211,9 @@ LayerAndroid::~LayerAndroid() #endif } -bool LayerAndroid::hasText() +float LayerAndroid::maxZoomScale() const { - return m_content && m_content->hasText(); + return m_content ? m_content->maxZoomScale() : 1.0f; } static int gDebugNbAnims = 0; diff --git a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.h b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.h index 5a1ef57..6c2e43d 100644 --- a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.h +++ b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.h @@ -262,7 +262,7 @@ public: LayerType type() { return m_type; } virtual SubclassType subclassType() const { return LayerAndroid::StandardLayer; } - bool hasText(); + float maxZoomScale() const; void copyAnimationStartTimesRecursive(LayerAndroid* oldTree); diff --git a/Source/WebCore/platform/graphics/android/layers/LayerContent.h b/Source/WebCore/platform/graphics/android/layers/LayerContent.h index a18e4c8..b6714ba 100644 --- a/Source/WebCore/platform/graphics/android/layers/LayerContent.h +++ b/Source/WebCore/platform/graphics/android/layers/LayerContent.h @@ -45,7 +45,7 @@ public: bool isEmpty() { return !width() || !height(); } virtual void setCheckForOptimisations(bool check) = 0; virtual void checkForOptimisations() = 0; - virtual bool hasText() = 0; + virtual float maxZoomScale() = 0; virtual void draw(SkCanvas* canvas) = 0; virtual PrerenderedInval* prerenderForRect(const IntRect& dirty) { return 0; } virtual void clearPrerenders() { }; diff --git a/Source/WebCore/platform/graphics/android/layers/PictureLayerContent.cpp b/Source/WebCore/platform/graphics/android/layers/PictureLayerContent.cpp index e40c9b6..bfd477e 100644 --- a/Source/WebCore/platform/graphics/android/layers/PictureLayerContent.cpp +++ b/Source/WebCore/platform/graphics/android/layers/PictureLayerContent.cpp @@ -48,13 +48,13 @@ int PictureLayerContent::height() void PictureLayerContent::checkForOptimisations() { if (!m_checkedContent) - hasText(); // for now only check the presence of text + maxZoomScale(); // for now only check the maximum scale for painting } -bool PictureLayerContent::hasText() +float PictureLayerContent::maxZoomScale() { if (m_checkedContent) - return m_hasText; + return m_hasText ? 1e6 : 1.0; // Let's check if we have text or not. If we don't, we can limit // ourselves to scale 1! @@ -76,7 +76,7 @@ bool PictureLayerContent::hasText() m_checkedContent = true; - return m_hasText; + return m_hasText ? 1e6 : 1.0; } void PictureLayerContent::draw(SkCanvas* canvas) diff --git a/Source/WebCore/platform/graphics/android/layers/PictureLayerContent.h b/Source/WebCore/platform/graphics/android/layers/PictureLayerContent.h index cf633cb..e5181a5 100644 --- a/Source/WebCore/platform/graphics/android/layers/PictureLayerContent.h +++ b/Source/WebCore/platform/graphics/android/layers/PictureLayerContent.h @@ -40,7 +40,7 @@ public: virtual int height(); virtual void setCheckForOptimisations(bool check) { m_checkedContent = !check; } virtual void checkForOptimisations(); - virtual bool hasText(); + virtual float maxZoomScale(); virtual void draw(SkCanvas* canvas); virtual void serialize(SkWStream* stream); diff --git a/Source/WebCore/platform/graphics/android/layers/PicturePileLayerContent.cpp b/Source/WebCore/platform/graphics/android/layers/PicturePileLayerContent.cpp index 1167bda..e48751d 100644 --- a/Source/WebCore/platform/graphics/android/layers/PicturePileLayerContent.cpp +++ b/Source/WebCore/platform/graphics/android/layers/PicturePileLayerContent.cpp @@ -12,7 +12,7 @@ namespace WebCore { PicturePileLayerContent::PicturePileLayerContent(const PicturePile& picturePile) : m_picturePile(picturePile) - , m_hasText(picturePile.hasText()) + , m_maxZoomScale(picturePile.maxZoomScale()) , m_hasContent(!picturePile.isEmpty()) { } diff --git a/Source/WebCore/platform/graphics/android/layers/PicturePileLayerContent.h b/Source/WebCore/platform/graphics/android/layers/PicturePileLayerContent.h index 9f3a263..cbaebed 100644 --- a/Source/WebCore/platform/graphics/android/layers/PicturePileLayerContent.h +++ b/Source/WebCore/platform/graphics/android/layers/PicturePileLayerContent.h @@ -41,7 +41,7 @@ public: virtual void setCheckForOptimisations(bool check) {} virtual void checkForOptimisations() {} // already performed, stored in m_hasText/m_hasContent - virtual bool hasText() { return m_hasText; } + virtual float maxZoomScale() { return m_maxZoomScale; } virtual void draw(SkCanvas* canvas); virtual void serialize(SkWStream* stream); virtual PrerenderedInval* prerenderForRect(const IntRect& dirty); @@ -50,7 +50,7 @@ public: private: PicturePile m_picturePile; - bool m_hasText; + float m_maxZoomScale; bool m_hasContent; }; |