diff options
author | Mike Reed <reed@google.com> | 2010-02-25 13:27:38 -0500 |
---|---|---|
committer | Mike Reed <reed@google.com> | 2010-02-25 13:28:27 -0500 |
commit | 24f7fb9130250d850bf040efd1021c97e179a299 (patch) | |
tree | 598a9312e85b0cb616a9b0adfeec11e248f1000b /WebCore | |
parent | 770495626b08b5d06162c31be5eed944aea127cb (diff) | |
download | external_webkit-24f7fb9130250d850bf040efd1021c97e179a299.zip external_webkit-24f7fb9130250d850bf040efd1021c97e179a299.tar.gz external_webkit-24f7fb9130250d850bf040efd1021c97e179a299.tar.bz2 |
remove unused methods
Diffstat (limited to 'WebCore')
-rw-r--r-- | WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp | 12 | ||||
-rw-r--r-- | WebCore/platform/graphics/android/LayerAndroid.cpp | 33 | ||||
-rw-r--r-- | WebCore/platform/graphics/android/LayerAndroid.h | 12 |
3 files changed, 4 insertions, 53 deletions
diff --git a/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp b/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp index a72d31b..fd1c91a 100644 --- a/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp +++ b/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp @@ -325,11 +325,9 @@ void GraphicsLayerAndroid::setMasksToBounds(bool masksToBounds) void GraphicsLayerAndroid::setDrawsContent(bool drawsContent) { GraphicsLayer::setDrawsContent(drawsContent); - m_contentLayer->setDrawsContent(m_drawsContent); if (m_drawsContent) { m_haveContents = true; - m_contentLayer->setHaveContents(true); setNeedsDisplay(); } askForSync(); @@ -357,8 +355,6 @@ void GraphicsLayerAndroid::setContentsOpaque(bool opaque) LOG("(%x) setContentsOpaque (%d)", this, opaque); GraphicsLayer::setContentsOpaque(opaque); m_haveContents = true; - m_contentLayer->setHaveContents(true); - m_contentLayer->setDrawsContent(true); askForSync(); } @@ -437,8 +433,6 @@ bool GraphicsLayerAndroid::repaint(const FloatRect& rect) this, rect.x(), rect.y(), rect.width(), rect.height(), gPaused, m_needsRepaint, m_haveContents); - m_contentLayer->setDrawsContent(true); - if (!gPaused && m_haveContents && m_needsRepaint) { SkAutoPictureRecord arp(m_contentLayer->recordContext(), m_size.width(), m_size.height()); SkCanvas* recordingCanvas = arp.getRecordingCanvas(); @@ -802,16 +796,12 @@ void GraphicsLayerAndroid::setContentsToImage(Image* image) TLOG("(%x) setContentsToImage", this, image); if (image) { m_haveContents = true; - m_contentLayer->setHaveContents(true); - m_contentLayer->setDrawsContent(true); - m_contentLayer->setHaveImage(true); if (!m_haveImage) { m_haveImage = true; setNeedsDisplay(); askForSync(); } - } else - m_contentLayer->setHaveImage(false); + } } PlatformLayer* GraphicsLayerAndroid::platformLayer() const diff --git a/WebCore/platform/graphics/android/LayerAndroid.cpp b/WebCore/platform/graphics/android/LayerAndroid.cpp index c21c9b3..0dedd64 100644 --- a/WebCore/platform/graphics/android/LayerAndroid.cpp +++ b/WebCore/platform/graphics/android/LayerAndroid.cpp @@ -46,9 +46,6 @@ class OpacityDrawFilter : public SkDrawFilter { LayerAndroid::LayerAndroid(bool isRootLayer) : SkLayer(), m_isRootLayer(isRootLayer), - m_haveContents(false), - m_drawsContent(true), - m_haveImage(false), m_haveClip(false), m_doRotation(false), m_isFixed(false), @@ -66,9 +63,6 @@ LayerAndroid::LayerAndroid(bool isRootLayer) : SkLayer(), LayerAndroid::LayerAndroid(const LayerAndroid& layer) : SkLayer(layer), m_isRootLayer(layer.m_isRootLayer), - m_haveContents(layer.m_haveContents), - m_drawsContent(layer.m_drawsContent), - m_haveImage(layer.m_haveImage), m_haveClip(layer.m_haveClip), m_extra(0), // deliberately not copied m_uniqueId(layer.m_uniqueId) @@ -103,9 +97,6 @@ LayerAndroid::LayerAndroid(const LayerAndroid& layer) : SkLayer(layer), LayerAndroid::LayerAndroid(SkPicture* picture) : SkLayer(), m_isRootLayer(true), - m_haveContents(false), - m_drawsContent(true), - m_haveImage(false), m_haveClip(false), m_doRotation(false), m_isFixed(false), @@ -176,13 +167,6 @@ void LayerAndroid::removeAnimation(const String& name) m_animations.remove(name); } -void LayerAndroid::setDrawsContent(bool drawsContent) -{ - m_drawsContent = drawsContent; - for (int i = 0; i < countChildren(); i++) - getChild(i)->setDrawsContent(drawsContent); -} - // We only use the bounding rect of the layer as mask... // TODO: use a real mask? void LayerAndroid::setMaskLayer(LayerAndroid* layer) @@ -199,8 +183,6 @@ void LayerAndroid::setMasksToBounds(bool masksToBounds) void LayerAndroid::setBackgroundColor(SkColor color) { m_backgroundColor = color; - setHaveContents(true); - setDrawsContent(true); } static int gDebugChildLevel; @@ -261,13 +243,6 @@ const LayerAndroid* LayerAndroid::find(int x, int y) const return 0; } -void LayerAndroid::setClip(SkCanvas* canvas) -{ - SkRect clip; - bounds(&clip); - canvas->clipRect(clip); -} - /////////////////////////////////////////////////////////////////////////////// void LayerAndroid::updatePositions(const SkRect& viewport) { @@ -320,7 +295,7 @@ void LayerAndroid::onDraw(SkCanvas* canvas, SkScalar opacity) { canvas->clipRect(r); } - if (!m_haveImage && !m_drawsContent && !m_isRootLayer) + if (!m_isRootLayer) return; if (!prepareContext()) @@ -361,9 +336,6 @@ SkPicture* LayerAndroid::recordContext() bool LayerAndroid::prepareContext(bool force) { - if (!m_haveContents) - return false; - if (!m_isRootLayer) { if (force || !m_recordingPicture || (m_recordingPicture @@ -465,9 +437,6 @@ void LayerAndroid::dumpLayers(FILE* file, int indentLevel) const writeln(file, indentLevel, "{"); writeHexVal(file, indentLevel + 1, "layer", (int)this); - writeIntVal(file, indentLevel + 1, "haveContents", m_haveContents); - writeIntVal(file, indentLevel + 1, "drawsContent", m_drawsContent); - writeIntVal(file, indentLevel + 1, "haveImage", m_haveImage); writeIntVal(file, indentLevel + 1, "clipRect", m_haveClip); writeFloatVal(file, indentLevel + 1, "opacity", getOpacity()); diff --git a/WebCore/platform/graphics/android/LayerAndroid.h b/WebCore/platform/graphics/android/LayerAndroid.h index 83d728f..4f8a5fe 100644 --- a/WebCore/platform/graphics/android/LayerAndroid.h +++ b/WebCore/platform/graphics/android/LayerAndroid.h @@ -104,18 +104,12 @@ public: } void setBackgroundColor(SkColor color); - void setHaveContents(bool haveContents) { m_haveContents = haveContents; } - void setHaveImage(bool haveImage) { m_haveImage = haveImage; } - void setDrawsContent(bool drawsContent); void setMaskLayer(LayerAndroid*); void setMasksToBounds(bool); + void setIsRootLayer(bool isRootLayer) { m_isRootLayer = isRootLayer; } - bool prepareContext(bool force = false); - void startRecording(); - void stopRecording(); SkPicture* recordContext(); - void setClip(SkCanvas* clip); void addAnimation(PassRefPtr<AndroidAnimation> anim); void removeAnimation(const String& name); @@ -143,7 +137,6 @@ public: LayerAndroid* getChild(int index) const { return static_cast<LayerAndroid*>(this->INHERITED::getChild(index)); } - bool haveClip() const { return m_haveClip; } void setExtra(DrawExtra* extra); // does not assign ownership int uniqueId() const { return m_uniqueId; } @@ -151,13 +144,12 @@ protected: virtual void onDraw(SkCanvas*, SkScalar opacity); private: + bool prepareContext(bool force = false); bool boundsIsUnique(SkTDArray<SkRect>* region, const SkRect& local) const; void clipInner(SkTDArray<SkRect>* region, const SkRect& local) const; bool m_isRootLayer; - bool m_haveContents; bool m_drawsContent; - bool m_haveImage; bool m_haveClip; bool m_doRotation; bool m_isFixed; |