Changeset 107787 in webkit


Ignore:
Timestamp:
Feb 15, 2012 12:26:30 AM (12 years ago)
Author:
noam.rosenthal@nokia.com
Message:

[Texmap] Divide TextureMapperNode.cpp to 3 files.
https://bugs.webkit.org/show_bug.cgi?id=76660

Source/WebCore:

Rename TextureMapperNode to TextureMapperLayer.

Reviewed by Kenneth Rohde Christiansen.

No new tests.

  • GNUmakefile.list.am:
  • Target.pri:
  • WebCore.gypi:
  • platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:

(WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
(WebCore::GraphicsLayerTextureMapper::notifyChange):
(WebCore::GraphicsLayerTextureMapper::setNeedsDisplay):
(WebCore::GraphicsLayerTextureMapper::setContentsNeedsDisplay):
(WebCore::GraphicsLayerTextureMapper::setNeedsDisplayInRect):
(WebCore::GraphicsLayerTextureMapper::setParent):
(WebCore::GraphicsLayerTextureMapper::setChildren):
(WebCore::GraphicsLayerTextureMapper::addChild):
(WebCore::GraphicsLayerTextureMapper::addChildAtIndex):
(WebCore::GraphicsLayerTextureMapper::addChildAbove):
(WebCore::GraphicsLayerTextureMapper::addChildBelow):
(WebCore::GraphicsLayerTextureMapper::replaceChild):
(WebCore::GraphicsLayerTextureMapper::removeFromParent):
(WebCore::GraphicsLayerTextureMapper::setMaskLayer):
(WebCore::GraphicsLayerTextureMapper::setReplicatedByLayer):
(WebCore::GraphicsLayerTextureMapper::setPosition):
(WebCore::GraphicsLayerTextureMapper::setAnchorPoint):
(WebCore::GraphicsLayerTextureMapper::setSize):
(WebCore::GraphicsLayerTextureMapper::setTransform):
(WebCore::GraphicsLayerTextureMapper::setChildrenTransform):
(WebCore::GraphicsLayerTextureMapper::setPreserves3D):
(WebCore::GraphicsLayerTextureMapper::setMasksToBounds):
(WebCore::GraphicsLayerTextureMapper::setDrawsContent):
(WebCore::GraphicsLayerTextureMapper::setContentsOpaque):
(WebCore::GraphicsLayerTextureMapper::setBackfaceVisibility):
(WebCore::GraphicsLayerTextureMapper::setOpacity):
(WebCore::GraphicsLayerTextureMapper::setContentsRect):
(WebCore::GraphicsLayerTextureMapper::setContentsToImage):
(WebCore::GraphicsLayerTextureMapper::setContentsToMedia):
(WebCore::GraphicsLayerTextureMapper::syncCompositingStateForThisLayerOnly):
(WebCore::GraphicsLayerTextureMapper::syncCompositingState):
(WebCore::GraphicsLayerTextureMapper::addAnimation):

  • platform/graphics/texmap/GraphicsLayerTextureMapper.h:

(WebCore):
(GraphicsLayerTextureMapper):
(WebCore::GraphicsLayerTextureMapper::layer):

  • platform/graphics/texmap/TextureMapperLayer.cpp: Renamed from Source/WebCore/platform/graphics/texmap/TextureMapperNode.cpp.

(WebCore):
(WebCore::toTextureMapperLayer):
(WebCore::TextureMapperLayer::rootLayer):
(WebCore::TextureMapperLayer::setTransform):
(WebCore::TextureMapperLayer::clearBackingStoresRecursive):
(WebCore::TextureMapperLayer::computeTransformsRecursive):
(WebCore::TextureMapperLayer::updateBackingStore):
(WebCore::TextureMapperLayer::paint):
(WebCore::TextureMapperLayer::paintSelf):
(WebCore::TextureMapperLayer::compareGraphicsLayersZValue):
(WebCore::TextureMapperLayer::sortByZOrder):
(WebCore::TextureMapperLayer::paintSelfAndChildren):
(WebCore::TextureMapperLayer::intermediateSurfaceRect):
(WebCore::TextureMapperLayer::shouldPaintToIntermediateSurface):
(WebCore::TextureMapperLayer::isVisible):
(WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica):
(WebCore::TextureMapperLayer::paintRecursive):
(WebCore::TextureMapperLayer::~TextureMapperLayer):
(WebCore::TextureMapperLayer::syncCompositingState):
(WebCore::TextureMapperLayer::syncCompositingStateSelf):
(WebCore::TextureMapperLayer::descendantsOrSelfHaveRunningAnimations):
(WebCore::TextureMapperLayer::syncAnimations):
(WebCore::TextureMapperLayer::syncAnimationsRecursively):

  • platform/graphics/texmap/TextureMapperLayer.h: Renamed from Source/WebCore/platform/graphics/texmap/TextureMapperNode.h.

(WebCore):
(TextureMapperPaintOptions):
(WebCore::TextureMapperPaintOptions::TextureMapperPaintOptions):
(TextureMapperLayer):
(WebCore::TextureMapperLayer::TextureMapperLayer):
(WebCore::TextureMapperLayer::size):
(WebCore::TextureMapperLayer::setOpacity):
(WebCore::TextureMapperLayer::setTextureMapper):
(WebCore::TextureMapperLayer::setShouldUpdateBackingStoreFromLayer):
(WebCore::TextureMapperLayer::setBackingStore):
(WebCore::TextureMapperLayer::backingStore):
(WebCore::TextureMapperLayer::texture):
(WebCore::TextureMapperLayer::layerRect):
(State):
(WebCore::TextureMapperLayer::State::State):

Source/WebKit/gtk:

Rename TextureMapperNode to TextureMapperLayer.

Reviewed by Kenneth Rohde Christiansen.

  • WebCoreSupport/AcceleratedCompositingContext.h:

(AcceleratedCompositingContext):

  • WebCoreSupport/AcceleratedCompositingContextGL.cpp:

(WebKit::AcceleratedCompositingContext::AcceleratedCompositingContext):
(WebKit::AcceleratedCompositingContext::enabled):
(WebKit::AcceleratedCompositingContext::renderLayersToWindow):
(WebKit::AcceleratedCompositingContext::attachRootGraphicsLayer):
(WebKit::AcceleratedCompositingContext::syncLayersTimeout):

Source/WebKit/qt:

Rename TextureMapperNode to TextureMapperLayer.

Reviewed by Kenneth Rohde Christiansen.

  • Api/qwebframe.cpp:

(QWebFramePrivate::renderCompositedLayers):

  • Api/qwebframe.h:

(WebCore):

  • Api/qwebframe_p.h:

(WebCore):
(QWebFramePrivate::QWebFramePrivate):
(QWebFramePrivate):

  • WebCoreSupport/PageClientQt.cpp:

(WebCore::TextureMapperLayerClientQt::TextureMapperLayerClientQt):
(WebCore::TextureMapperLayerClientQt::setTextureMapper):
(WebCore::TextureMapperLayerClientQt::~TextureMapperLayerClientQt):
(WebCore::TextureMapperLayerClientQt::syncRootLayer):
(WebCore::TextureMapperLayerClientQt::rootLayer):
(WebCore::PageClientQWidget::setRootGraphicsLayer):
(WebCore::PageClientQWidget::syncLayers):
(WebCore::PageClientQGraphicsWidget::syncLayers):
(WebCore::PageClientQGraphicsWidget::setRootGraphicsLayer):

  • WebCoreSupport/PageClientQt.h:

(TextureMapperLayerClientQt):
(PageClientQWidget):
(PageClientQGraphicsWidget):

Source/WebKit2:

Rename TextureMapperNode to TextureMapperLayer.

Reviewed by Kenneth Rohde Christiansen.

  • UIProcess/qt/LayerTreeHostProxyQt.cpp:

(WebKit::LayerTreeHostProxy::createLayer):
(WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
(WebKit::LayerTreeHostProxy::paintToGraphicsContext):
(WebKit::LayerTreeHostProxy::getBackingStore):
(WebKit::LayerTreeHostProxy::ensureRootLayer):
(WebKit::LayerTreeHostProxy::purgeGLResources):

Location:
trunk/Source
Files:
17 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r107786 r107787  
     12012-02-15  No'am Rosenthal  <noam.rosenthal@nokia.com>
     2
     3        [Texmap] Divide TextureMapperNode.cpp to 3 files.
     4        https://bugs.webkit.org/show_bug.cgi?id=76660
     5
     6        Rename TextureMapperNode to TextureMapperLayer.
     7
     8        Reviewed by Kenneth Rohde Christiansen.
     9
     10        No new tests.
     11
     12        * GNUmakefile.list.am:
     13        * Target.pri:
     14        * WebCore.gypi:
     15        * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
     16        (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
     17        (WebCore::GraphicsLayerTextureMapper::notifyChange):
     18        (WebCore::GraphicsLayerTextureMapper::setNeedsDisplay):
     19        (WebCore::GraphicsLayerTextureMapper::setContentsNeedsDisplay):
     20        (WebCore::GraphicsLayerTextureMapper::setNeedsDisplayInRect):
     21        (WebCore::GraphicsLayerTextureMapper::setParent):
     22        (WebCore::GraphicsLayerTextureMapper::setChildren):
     23        (WebCore::GraphicsLayerTextureMapper::addChild):
     24        (WebCore::GraphicsLayerTextureMapper::addChildAtIndex):
     25        (WebCore::GraphicsLayerTextureMapper::addChildAbove):
     26        (WebCore::GraphicsLayerTextureMapper::addChildBelow):
     27        (WebCore::GraphicsLayerTextureMapper::replaceChild):
     28        (WebCore::GraphicsLayerTextureMapper::removeFromParent):
     29        (WebCore::GraphicsLayerTextureMapper::setMaskLayer):
     30        (WebCore::GraphicsLayerTextureMapper::setReplicatedByLayer):
     31        (WebCore::GraphicsLayerTextureMapper::setPosition):
     32        (WebCore::GraphicsLayerTextureMapper::setAnchorPoint):
     33        (WebCore::GraphicsLayerTextureMapper::setSize):
     34        (WebCore::GraphicsLayerTextureMapper::setTransform):
     35        (WebCore::GraphicsLayerTextureMapper::setChildrenTransform):
     36        (WebCore::GraphicsLayerTextureMapper::setPreserves3D):
     37        (WebCore::GraphicsLayerTextureMapper::setMasksToBounds):
     38        (WebCore::GraphicsLayerTextureMapper::setDrawsContent):
     39        (WebCore::GraphicsLayerTextureMapper::setContentsOpaque):
     40        (WebCore::GraphicsLayerTextureMapper::setBackfaceVisibility):
     41        (WebCore::GraphicsLayerTextureMapper::setOpacity):
     42        (WebCore::GraphicsLayerTextureMapper::setContentsRect):
     43        (WebCore::GraphicsLayerTextureMapper::setContentsToImage):
     44        (WebCore::GraphicsLayerTextureMapper::setContentsToMedia):
     45        (WebCore::GraphicsLayerTextureMapper::syncCompositingStateForThisLayerOnly):
     46        (WebCore::GraphicsLayerTextureMapper::syncCompositingState):
     47        (WebCore::GraphicsLayerTextureMapper::addAnimation):
     48        * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
     49        (WebCore):
     50        (GraphicsLayerTextureMapper):
     51        (WebCore::GraphicsLayerTextureMapper::layer):
     52        * platform/graphics/texmap/TextureMapperLayer.cpp: Renamed from Source/WebCore/platform/graphics/texmap/TextureMapperNode.cpp.
     53        (WebCore):
     54        (WebCore::toTextureMapperLayer):
     55        (WebCore::TextureMapperLayer::rootLayer):
     56        (WebCore::TextureMapperLayer::setTransform):
     57        (WebCore::TextureMapperLayer::clearBackingStoresRecursive):
     58        (WebCore::TextureMapperLayer::computeTransformsRecursive):
     59        (WebCore::TextureMapperLayer::updateBackingStore):
     60        (WebCore::TextureMapperLayer::paint):
     61        (WebCore::TextureMapperLayer::paintSelf):
     62        (WebCore::TextureMapperLayer::compareGraphicsLayersZValue):
     63        (WebCore::TextureMapperLayer::sortByZOrder):
     64        (WebCore::TextureMapperLayer::paintSelfAndChildren):
     65        (WebCore::TextureMapperLayer::intermediateSurfaceRect):
     66        (WebCore::TextureMapperLayer::shouldPaintToIntermediateSurface):
     67        (WebCore::TextureMapperLayer::isVisible):
     68        (WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica):
     69        (WebCore::TextureMapperLayer::paintRecursive):
     70        (WebCore::TextureMapperLayer::~TextureMapperLayer):
     71        (WebCore::TextureMapperLayer::syncCompositingState):
     72        (WebCore::TextureMapperLayer::syncCompositingStateSelf):
     73        (WebCore::TextureMapperLayer::descendantsOrSelfHaveRunningAnimations):
     74        (WebCore::TextureMapperLayer::syncAnimations):
     75        (WebCore::TextureMapperLayer::syncAnimationsRecursively):
     76        * platform/graphics/texmap/TextureMapperLayer.h: Renamed from Source/WebCore/platform/graphics/texmap/TextureMapperNode.h.
     77        (WebCore):
     78        (TextureMapperPaintOptions):
     79        (WebCore::TextureMapperPaintOptions::TextureMapperPaintOptions):
     80        (TextureMapperLayer):
     81        (WebCore::TextureMapperLayer::TextureMapperLayer):
     82        (WebCore::TextureMapperLayer::size):
     83        (WebCore::TextureMapperLayer::setOpacity):
     84        (WebCore::TextureMapperLayer::setTextureMapper):
     85        (WebCore::TextureMapperLayer::setShouldUpdateBackingStoreFromLayer):
     86        (WebCore::TextureMapperLayer::setBackingStore):
     87        (WebCore::TextureMapperLayer::backingStore):
     88        (WebCore::TextureMapperLayer::texture):
     89        (WebCore::TextureMapperLayer::layerRect):
     90        (State):
     91        (WebCore::TextureMapperLayer::State::State):
     92
    1932012-02-15  Hayato Ito  <hayato@chromium.org>
    294
  • trunk/Source/WebCore/GNUmakefile.list.am

    r107778 r107787  
    57545754        Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp \
    57555755        Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.h \
    5756         Source/WebCore/platform/graphics/texmap/TextureMapperNode.cpp \
    5757         Source/WebCore/platform/graphics/texmap/TextureMapperNode.h \
     5756        Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp \
     5757        Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h \
    57585758        Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayer.h
    57595759webcoregtk_sources += \
  • trunk/Source/WebCore/Target.pri

    r107707 r107787  
    39583958        platform/graphics/texmap/TextureMapperBackingStore.h \
    39593959        platform/graphics/texmap/TextureMapperImageBuffer.h \
    3960         platform/graphics/texmap/TextureMapperNode.h \
     3960        platform/graphics/texmap/TextureMapperLayer.h \
    39613961        platform/graphics/texmap/TextureMapperPlatformLayer.h
    39623962
     
    39673967        platform/graphics/texmap/TextureMapperBackingStore.cpp \
    39683968        platform/graphics/texmap/TextureMapperImageBuffer.cpp \
    3969         platform/graphics/texmap/TextureMapperNode.cpp \
     3969        platform/graphics/texmap/TextureMapperLayer.cpp \
    39703970        platform/graphics/texmap/GraphicsLayerTextureMapper.cpp
    39713971
  • trunk/Source/WebCore/WebCore.gypi

    r107778 r107787  
    35913591            'platform/graphics/texmap/TextureMapperImageBuffer.cpp',
    35923592            'platform/graphics/texmap/TextureMapperImageBuffer.h',
    3593             'platform/graphics/texmap/TextureMapperNode.cpp',
    3594             'platform/graphics/texmap/TextureMapperNode.h',
     3593            'platform/graphics/texmap/TextureMapperLayer.cpp',
     3594            'platform/graphics/texmap/TextureMapperLayer.h',
    35953595            'platform/graphics/texmap/TextureMapperPlatformLayer.h',
    35963596            'platform/graphics/transforms/AffineTransform.cpp',
  • trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp

    r107707 r107787  
    2121#include "GraphicsLayerTextureMapper.h"
    2222
    23 #include "TextureMapperNode.h"
     23#include "TextureMapperLayer.h"
    2424
    2525namespace WebCore {
     
    2727GraphicsLayerTextureMapper::GraphicsLayerTextureMapper(GraphicsLayerClient* client)
    2828    : GraphicsLayer(client)
    29     , m_node(adoptPtr(new TextureMapperNode()))
     29    , m_layer(adoptPtr(new TextureMapperLayer()))
    3030    , m_changeMask(0)
    3131    , m_needsDisplay(false)
     
    3535}
    3636
    37 void GraphicsLayerTextureMapper::notifyChange(TextureMapperNode::ChangeMask changeMask)
     37void GraphicsLayerTextureMapper::notifyChange(TextureMapperLayer::ChangeMask changeMask)
    3838{
    3939    m_changeMask |= changeMask;
     
    6565{
    6666    m_needsDisplay = true;
    67     notifyChange(TextureMapperNode::DisplayChange);
     67    notifyChange(TextureMapperLayer::DisplayChange);
    6868}
    6969
     
    7474    if (m_image)
    7575        setContentsToImage(m_image.get());
    76     notifyChange(TextureMapperNode::DisplayChange);
     76    notifyChange(TextureMapperLayer::DisplayChange);
    7777}
    7878
     
    8484        return;
    8585    m_needsDisplayRect.unite(rect);
    86     notifyChange(TextureMapperNode::DisplayChange);
     86    notifyChange(TextureMapperLayer::DisplayChange);
    8787}
    8888
     
    9191void GraphicsLayerTextureMapper::setParent(GraphicsLayer* layer)
    9292{
    93     notifyChange(TextureMapperNode::ParentChange);
     93    notifyChange(TextureMapperLayer::ParentChange);
    9494    GraphicsLayer::setParent(layer);
    9595}
     
    9999bool GraphicsLayerTextureMapper::setChildren(const Vector<GraphicsLayer*>& children)
    100100{
    101     notifyChange(TextureMapperNode::ChildrenChange);
     101    notifyChange(TextureMapperLayer::ChildrenChange);
    102102    return GraphicsLayer::setChildren(children);
    103103}
     
    107107void GraphicsLayerTextureMapper::addChild(GraphicsLayer* layer)
    108108{
    109     notifyChange(TextureMapperNode::ChildrenChange);
     109    notifyChange(TextureMapperLayer::ChildrenChange);
    110110    GraphicsLayer::addChild(layer);
    111111}
     
    116116{
    117117    GraphicsLayer::addChildAtIndex(layer, index);
    118     notifyChange(TextureMapperNode::ChildrenChange);
     118    notifyChange(TextureMapperLayer::ChildrenChange);
    119119}
    120120
     
    124124{
    125125     GraphicsLayer::addChildAbove(layer, sibling);
    126      notifyChange(TextureMapperNode::ChildrenChange);
     126     notifyChange(TextureMapperLayer::ChildrenChange);
    127127}
    128128
     
    132132{
    133133    GraphicsLayer::addChildBelow(layer, sibling);
    134     notifyChange(TextureMapperNode::ChildrenChange);
     134    notifyChange(TextureMapperLayer::ChildrenChange);
    135135}
    136136
     
    140140{
    141141    if (GraphicsLayer::replaceChild(oldChild, newChild)) {
    142         notifyChange(TextureMapperNode::ChildrenChange);
     142        notifyChange(TextureMapperLayer::ChildrenChange);
    143143        return true;
    144144    }
     
    152152    if (!parent())
    153153        return;
    154     notifyChange(TextureMapperNode::ParentChange);
     154    notifyChange(TextureMapperLayer::ParentChange);
    155155    GraphicsLayer::removeFromParent();
    156156}
     
    163163        return;
    164164    GraphicsLayer::setMaskLayer(value);
    165     notifyChange(TextureMapperNode::MaskLayerChange);
     165    notifyChange(TextureMapperLayer::MaskLayerChange);
    166166}
    167167
     
    174174        return;
    175175    GraphicsLayer::setReplicatedByLayer(value);
    176     notifyChange(TextureMapperNode::ReplicaLayerChange);
     176    notifyChange(TextureMapperLayer::ReplicaLayerChange);
    177177}
    178178
     
    184184        return;
    185185    GraphicsLayer::setPosition(value);
    186     notifyChange(TextureMapperNode::PositionChange);
     186    notifyChange(TextureMapperLayer::PositionChange);
    187187}
    188188
     
    194194        return;
    195195    GraphicsLayer::setAnchorPoint(value);
    196     notifyChange(TextureMapperNode::AnchorPointChange);
     196    notifyChange(TextureMapperLayer::AnchorPointChange);
    197197}
    198198
     
    205205
    206206    GraphicsLayer::setSize(value);
    207     notifyChange(TextureMapperNode::SizeChange);
     207    notifyChange(TextureMapperLayer::SizeChange);
    208208}
    209209
     
    216216
    217217    GraphicsLayer::setTransform(value);
    218     notifyChange(TextureMapperNode::TransformChange);
     218    notifyChange(TextureMapperLayer::TransformChange);
    219219}
    220220
     
    226226        return;
    227227    GraphicsLayer::setChildrenTransform(value);
    228     notifyChange(TextureMapperNode::ChildrenTransformChange);
     228    notifyChange(TextureMapperLayer::ChildrenTransformChange);
    229229}
    230230
     
    236236        return;
    237237    GraphicsLayer::setPreserves3D(value);
    238     notifyChange(TextureMapperNode::Preserves3DChange);
     238    notifyChange(TextureMapperLayer::Preserves3DChange);
    239239}
    240240
     
    246246        return;
    247247    GraphicsLayer::setMasksToBounds(value);
    248     notifyChange(TextureMapperNode::MasksToBoundsChange);
     248    notifyChange(TextureMapperLayer::MasksToBoundsChange);
    249249}
    250250
     
    255255    if (value == drawsContent())
    256256        return;
    257     notifyChange(TextureMapperNode::DrawsContentChange);
     257    notifyChange(TextureMapperLayer::DrawsContentChange);
    258258    GraphicsLayer::setDrawsContent(value);
    259259}
     
    265265    if (value == contentsOpaque())
    266266        return;
    267     notifyChange(TextureMapperNode::ContentsOpaqueChange);
     267    notifyChange(TextureMapperLayer::ContentsOpaqueChange);
    268268    GraphicsLayer::setContentsOpaque(value);
    269269}
     
    276276        return;
    277277    GraphicsLayer::setBackfaceVisibility(value);
    278     notifyChange(TextureMapperNode::BackfaceVisibilityChange);
     278    notifyChange(TextureMapperLayer::BackfaceVisibilityChange);
    279279}
    280280
     
    286286        return;
    287287    GraphicsLayer::setOpacity(value);
    288     notifyChange(TextureMapperNode::OpacityChange);
     288    notifyChange(TextureMapperLayer::OpacityChange);
    289289}
    290290
     
    296296        return;
    297297    GraphicsLayer::setContentsRect(value);
    298     notifyChange(TextureMapperNode::ContentsRectChange);
     298    notifyChange(TextureMapperLayer::ContentsRectChange);
    299299}
    300300
     
    315315
    316316    setContentsToMedia(m_compositedImage.get());
    317     notifyChange(TextureMapperNode::ContentChange);
     317    notifyChange(TextureMapperLayer::ContentChange);
    318318    GraphicsLayer::setContentsToImage(image);
    319319}
     
    325325
    326326    GraphicsLayer::setContentsToMedia(media);
    327     notifyChange(TextureMapperNode::ContentChange);
     327    notifyChange(TextureMapperLayer::ContentChange);
    328328    m_contentsLayer = media;
    329329}
     
    333333void GraphicsLayerTextureMapper::syncCompositingStateForThisLayerOnly()
    334334{
    335     m_node->syncCompositingState(this);
     335    m_layer->syncCompositingState(this);
    336336}
    337337
     
    340340void GraphicsLayerTextureMapper::syncCompositingState(const FloatRect&)
    341341{
    342     m_node->syncCompositingState(this, TextureMapperNode::TraverseDescendants);
     342    m_layer->syncCompositingState(this, TextureMapperLayer::TraverseDescendants);
    343343}
    344344
     
    357357
    358358    m_animations.add(keyframesName, TextureMapperAnimation(valueList, boxSize, anim, timeOffset, listsMatch));
    359     notifyChange(TextureMapperNode::AnimationChange);
     359    notifyChange(TextureMapperLayer::AnimationChange);
    360360    m_animationStartedTimer.startOneShot(0);
    361361    return true;
  • trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h

    r107707 r107787  
    2525#include "GraphicsLayerClient.h"
    2626#include "Image.h"
    27 #include "TextureMapperNode.h"
     27#include "TextureMapperLayer.h"
    2828
    2929#if ENABLE(WEBGL)
     
    3333namespace WebCore {
    3434
    35 class TextureMapperNode;
     35class TextureMapperLayer;
    3636class BitmapTexture;
    3737class TextureMapper;
    3838
    3939class GraphicsLayerTextureMapper : public GraphicsLayer {
    40     friend class TextureMapperNode;
     40    friend class TextureMapperLayer;
    4141
    4242public:
     
    7878    virtual PlatformLayer* platformLayer() const { return 0; }
    7979
    80     void notifyChange(TextureMapperNode::ChangeMask changeMask);
     80    void notifyChange(TextureMapperLayer::ChangeMask);
    8181    inline int changeMask() const { return m_changeMask; }
    8282    void didSynchronize();
     
    8686    virtual void removeAnimation(const String&);
    8787
    88     TextureMapperNode* node() const { return m_node.get(); }
     88    TextureMapperLayer* layer() const { return m_layer.get(); }
    8989    TextureMapperPlatformLayer* contentsLayer() const { return m_contentsLayer; }
    9090    bool needsDisplay() const { return m_needsDisplay; }
     
    9292
    9393private:
    94     OwnPtr<TextureMapperNode> m_node;
     94    OwnPtr<TextureMapperLayer> m_layer;
    9595    RefPtr<TextureMapperBackingStore> m_compositedImage;
    9696    RefPtr<Image> m_image;
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp

    r107786 r107787  
    1919
    2020#include "config.h"
    21 #include "TextureMapperNode.h"
     21#include "TextureMapperLayer.h"
    2222
    2323#include "stdio.h"
     
    3131namespace WebCore {
    3232
    33 TextureMapperNode* toTextureMapperNode(GraphicsLayer* layer)
    34 {
    35     return layer ? toGraphicsLayerTextureMapper(layer)->node() : 0;
    36 }
    37 
    38 TextureMapperNode* TextureMapperNode::rootLayer()
     33TextureMapperLayer* toTextureMapperLayer(GraphicsLayer* layer)
     34{
     35    return layer ? toGraphicsLayerTextureMapper(layer)->layer() : 0;
     36}
     37
     38TextureMapperLayer* TextureMapperLayer::rootLayer()
    3939{
    4040    if (m_effectTarget)
     
    4545}
    4646
    47 void TextureMapperNode::setTransform(const TransformationMatrix& matrix)
     47void TextureMapperLayer::setTransform(const TransformationMatrix& matrix)
    4848{
    4949    m_transform.setLocalTransform(matrix);
    5050}
    5151
    52 void TextureMapperNode::clearBackingStoresRecursive()
     52void TextureMapperLayer::clearBackingStoresRecursive()
    5353{
    5454    m_backingStore.clear();
     
    6060}
    6161
    62 void TextureMapperNode::computeTransformsRecursive()
     62void TextureMapperLayer::computeTransformsRecursive()
    6363{
    6464    if (m_size.isEmpty() && m_state.masksToBounds)
     
    9090}
    9191
    92 void TextureMapperNode::updateBackingStore(TextureMapper* textureMapper, GraphicsLayer* layer)
     92void TextureMapperLayer::updateBackingStore(TextureMapper* textureMapper, GraphicsLayer* layer)
    9393{
    9494    if (!layer || !textureMapper)
     
    132132}
    133133
    134 void TextureMapperNode::paint()
     134void TextureMapperLayer::paint()
    135135{
    136136    computeTransformsRecursive();
     
    142142}
    143143
    144 void TextureMapperNode::paintSelf(const TextureMapperPaintOptions& options)
     144void TextureMapperLayer::paintSelf(const TextureMapperPaintOptions& options)
    145145{
    146146    // We apply the following transform to compensate for painting into a surface, and then apply the offset so that the painting fits in the target rect.
     
    160160}
    161161
    162 int TextureMapperNode::compareGraphicsLayersZValue(const void* a, const void* b)
    163 {
    164     TextureMapperNode* const* nodeA = static_cast<TextureMapperNode* const*>(a);
    165     TextureMapperNode* const* nodeB = static_cast<TextureMapperNode* const*>(b);
    166     return int(((*nodeA)->m_centerZ - (*nodeB)->m_centerZ) * 1000);
    167 }
    168 
    169 void TextureMapperNode::sortByZOrder(Vector<TextureMapperNode* >& array, int first, int last)
    170 {
    171     qsort(array.data(), array.size(), sizeof(TextureMapperNode*), compareGraphicsLayersZValue);
    172 }
    173 
    174 void TextureMapperNode::paintSelfAndChildren(const TextureMapperPaintOptions& options)
     162int TextureMapperLayer::compareGraphicsLayersZValue(const void* a, const void* b)
     163{
     164    TextureMapperLayer* const* layerA = static_cast<TextureMapperLayer* const*>(a);
     165    TextureMapperLayer* const* layerB = static_cast<TextureMapperLayer* const*>(b);
     166    return int(((*layerA)->m_centerZ - (*layerB)->m_centerZ) * 1000);
     167}
     168
     169void TextureMapperLayer::sortByZOrder(Vector<TextureMapperLayer* >& array, int first, int last)
     170{
     171    qsort(array.data(), array.size(), sizeof(TextureMapperLayer*), compareGraphicsLayersZValue);
     172}
     173
     174void TextureMapperLayer::paintSelfAndChildren(const TextureMapperPaintOptions& options)
    175175{
    176176    bool hasClip = m_state.masksToBounds && !m_children.isEmpty();
     
    187187}
    188188
    189 IntRect TextureMapperNode::intermediateSurfaceRect()
     189IntRect TextureMapperLayer::intermediateSurfaceRect()
    190190{
    191191    // FIXME: Add an inverse transform to LayerTransform.
     
    193193}
    194194
    195 IntRect TextureMapperNode::intermediateSurfaceRect(const TransformationMatrix& matrix)
     195IntRect TextureMapperLayer::intermediateSurfaceRect(const TransformationMatrix& matrix)
    196196{
    197197    IntRect rect;
     
    209209}
    210210
    211 bool TextureMapperNode::shouldPaintToIntermediateSurface() const
     211bool TextureMapperLayer::shouldPaintToIntermediateSurface() const
    212212{
    213213    bool hasOpacity = m_opacity < 0.99;
     
    234234}
    235235
    236 bool TextureMapperNode::isVisible() const
     236bool TextureMapperLayer::isVisible() const
    237237{
    238238    if (m_size.isEmpty() && (m_state.masksToBounds || m_state.maskLayer || m_children.isEmpty()))
     
    243243}
    244244
    245 void TextureMapperNode::paintSelfAndChildrenWithReplica(const TextureMapperPaintOptions& options)
     245void TextureMapperLayer::paintSelfAndChildrenWithReplica(const TextureMapperPaintOptions& options)
    246246{
    247247    if (m_state.replicaLayer) {
     
    261261}
    262262
    263 void TextureMapperNode::paintRecursive(const TextureMapperPaintOptions& options)
     263void TextureMapperLayer::paintRecursive(const TextureMapperPaintOptions& options)
    264264{
    265265    if (!isVisible())
     
    306306}
    307307
    308 TextureMapperNode::~TextureMapperNode()
     308TextureMapperLayer::~TextureMapperLayer()
    309309{
    310310    for (int i = m_children.size() - 1; i >= 0; --i)
     
    315315}
    316316
    317 void TextureMapperNode::syncCompositingState(GraphicsLayerTextureMapper* graphicsLayer, int options)
     317void TextureMapperLayer::syncCompositingState(GraphicsLayerTextureMapper* graphicsLayer, int options)
    318318{
    319319    syncCompositingState(graphicsLayer, rootLayer()->m_textureMapper, options);
    320320}
    321321
    322 void TextureMapperNode::syncCompositingStateSelf(GraphicsLayerTextureMapper* graphicsLayer, TextureMapper* textureMapper)
     322void TextureMapperLayer::syncCompositingStateSelf(GraphicsLayerTextureMapper* graphicsLayer, TextureMapper* textureMapper)
    323323{
    324324    int changeMask = graphicsLayer->changeMask();
     
    328328
    329329    if (changeMask & ParentChange) {
    330         TextureMapperNode* newParent = toTextureMapperNode(graphicsLayer->parent());
     330        TextureMapperLayer* newParent = toTextureMapperLayer(graphicsLayer->parent());
    331331        if (newParent != m_parent) {
    332             // Remove node from current from child list first.
     332            // Remove layer from current from child list first.
    333333            if (m_parent) {
    334334                size_t index = m_parent->m_children.find(this);
     
    336336                m_parent = 0;
    337337            }
    338             // Set new node parent and add node to the parents child list.
     338            // Set new layer parent and add layer to the parents child list.
    339339            if (newParent) {
    340340                m_parent = newParent;
     
    345345
    346346    if (changeMask & ChildrenChange) {
    347         // Clear children parent pointer to avoid unsync and crash on node delete.
     347        // Clear children parent pointer to avoid unsync and crash on layer delete.
    348348        for (size_t i = 0; i < m_children.size(); i++)
    349349            m_children[i]->m_parent = 0;
     
    351351        m_children.clear();
    352352        for (size_t i = 0; i < graphicsLayer->children().size(); ++i) {
    353             TextureMapperNode* child = toTextureMapperNode(graphicsLayer->children()[i]);
     353            TextureMapperLayer* child = toTextureMapperLayer(graphicsLayer->children()[i]);
    354354            if (!child)
    355355                continue;
     
    362362
    363363    if (changeMask & MaskLayerChange) {
    364        if (TextureMapperNode* layer = toTextureMapperNode(graphicsLayer->maskLayer()))
     364       if (TextureMapperLayer* layer = toTextureMapperLayer(graphicsLayer->maskLayer()))
    365365           layer->m_effectTarget = this;
    366366    }
    367367
    368368    if (changeMask & ReplicaLayerChange) {
    369        if (TextureMapperNode* layer = toTextureMapperNode(graphicsLayer->replicaLayer()))
     369       if (TextureMapperLayer* layer = toTextureMapperLayer(graphicsLayer->replicaLayer()))
    370370           layer->m_effectTarget = this;
    371371    }
     
    374374        m_animations = graphicsLayer->m_animations;
    375375
    376     m_state.maskLayer = toTextureMapperNode(graphicsLayer->maskLayer());
    377     m_state.replicaLayer = toTextureMapperNode(graphicsLayer->replicaLayer());
     376    m_state.maskLayer = toTextureMapperLayer(graphicsLayer->maskLayer());
     377    m_state.replicaLayer = toTextureMapperLayer(graphicsLayer->replicaLayer());
    378378    m_state.pos = graphicsLayer->position();
    379379    m_state.anchorPoint = graphicsLayer->anchorPoint();
     
    401401}
    402402
    403 bool TextureMapperNode::descendantsOrSelfHaveRunningAnimations() const
     403bool TextureMapperLayer::descendantsOrSelfHaveRunningAnimations() const
    404404{
    405405    if (m_animations.hasRunningAnimations())
     
    414414}
    415415
    416 void TextureMapperNode::syncAnimations()
     416void TextureMapperLayer::syncAnimations()
    417417{
    418418    m_animations.apply(this);
     
    423423}
    424424
    425 void TextureMapperNode::syncAnimationsRecursively()
     425void TextureMapperLayer::syncAnimationsRecursively()
    426426{
    427427    syncAnimations();
     
    431431}
    432432
    433 void TextureMapperNode::syncCompositingState(GraphicsLayerTextureMapper* graphicsLayer, TextureMapper* textureMapper, int options)
     433void TextureMapperLayer::syncCompositingState(GraphicsLayerTextureMapper* graphicsLayer, TextureMapper* textureMapper, int options)
    434434{
    435435    if (!textureMapper)
     
    461461        Vector<GraphicsLayer*> children = graphicsLayer->children();
    462462        for (int i = children.size() - 1; i >= 0; --i) {
    463             TextureMapperNode* node = toTextureMapperNode(children[i]);
    464             if (!node)
     463            TextureMapperLayer* layer = toTextureMapperLayer(children[i]);
     464            if (!layer)
    465465                continue;
    466             node->syncCompositingState(toGraphicsLayerTextureMapper(children[i]), textureMapper, options);
     466            layer->syncCompositingState(toGraphicsLayerTextureMapper(children[i]), textureMapper, options);
    467467        }
    468468    } else {
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h

    r107786 r107787  
    1818 */
    1919
    20 #ifndef TextureMapperNode_h
    21 #define TextureMapperNode_h
     20#ifndef TextureMapperLayer_h
     21#define TextureMapperLayer_h
    2222
    2323#include "FloatRect.h"
     
    3939
    4040class TextureMapperPlatformLayer;
    41 class TextureMapperNode;
     41class TextureMapperLayer;
    4242class GraphicsLayerTextureMapper;
    4343
     
    5656};
    5757
    58 class TextureMapperNode : public TextureMapperAnimationClient {
     58class TextureMapperLayer : public TextureMapperAnimationClient {
    5959
    6060public:
     
    9797    };
    9898
    99     TextureMapperNode()
     99    TextureMapperLayer()
    100100        : m_parent(0)
    101101        , m_effectTarget(0)
     
    107107    { }
    108108
    109     virtual ~TextureMapperNode();
     109    virtual ~TextureMapperLayer();
    110110
    111111    void syncCompositingState(GraphicsLayerTextureMapper*, int syncOptions = 0);
     
    126126
    127127private:
    128     TextureMapperNode* rootLayer();
     128    TextureMapperLayer* rootLayer();
    129129    void computeTransformsRecursive();
    130130    void computeOverlapsIfNeeded();
     
    136136    void invalidateViewport(const FloatRect&);
    137137    void notifyChange(ChangeMask);
    138     void syncCompositingStateSelf(GraphicsLayerTextureMapper* graphicsLayer, TextureMapper* textureMapper);
     138    void syncCompositingStateSelf(GraphicsLayerTextureMapper*, TextureMapper*);
    139139
    140140    static int compareGraphicsLayersZValue(const void* a, const void* b);
    141     static void sortByZOrder(Vector<TextureMapperNode* >& array, int first, int last);
     141    static void sortByZOrder(Vector<TextureMapperLayer* >& array, int first, int last);
    142142
    143143    PassRefPtr<BitmapTexture> texture() { return m_backingStore ? m_backingStore->texture() : 0; }
     
    160160    }
    161161
    162     Vector<TextureMapperNode*> m_children;
    163     TextureMapperNode* m_parent;
    164     TextureMapperNode* m_effectTarget;
     162    Vector<TextureMapperLayer*> m_children;
     163    TextureMapperLayer* m_parent;
     164    TextureMapperLayer* m_effectTarget;
    165165    RefPtr<TextureMapperBackingStore> m_backingStore;
    166166    TextureMapperPlatformLayer* m_contentsLayer;
     
    181181        FloatRect needsDisplayRect;
    182182        int descendantsWithContent;
    183         TextureMapperNode* maskLayer;
    184         TextureMapperNode* replicaLayer;
     183        TextureMapperLayer* maskLayer;
     184        TextureMapperLayer* replicaLayer;
    185185        bool preserves3D : 1;
    186186        bool masksToBounds : 1;
     
    215215
    216216
    217 TextureMapperNode* toTextureMapperNode(GraphicsLayer*);
     217TextureMapperLayer* toTextureMapperLayer(GraphicsLayer*);
    218218
    219219}
    220 #endif // TextureMapperNode_h
     220#endif // TextureMapperLayer_h
  • trunk/Source/WebKit/gtk/ChangeLog

    r107682 r107787  
     12012-02-15  No'am Rosenthal  <noam.rosenthal@nokia.com>
     2
     3        [Texmap] Divide TextureMapperNode.cpp to 3 files.
     4        https://bugs.webkit.org/show_bug.cgi?id=76660
     5
     6        Rename TextureMapperNode to TextureMapperLayer.       
     7
     8        Reviewed by Kenneth Rohde Christiansen.
     9
     10        * WebCoreSupport/AcceleratedCompositingContext.h:
     11        (AcceleratedCompositingContext):
     12        * WebCoreSupport/AcceleratedCompositingContextGL.cpp:
     13        (WebKit::AcceleratedCompositingContext::AcceleratedCompositingContext):
     14        (WebKit::AcceleratedCompositingContext::enabled):
     15        (WebKit::AcceleratedCompositingContext::renderLayersToWindow):
     16        (WebKit::AcceleratedCompositingContext::attachRootGraphicsLayer):
     17        (WebKit::AcceleratedCompositingContext::syncLayersTimeout):
     18
    1192012-02-11  Nikolas Zimmermann  <nzimmermann@rim.com>
    220
  • trunk/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContext.h

    r106901 r107787  
    2929
    3030#if USE(TEXTURE_MAPPER_GL)
    31 #include "TextureMapperNode.h"
     31#include "TextureMapperLayer.h"
    3232#include "WindowGLContext.h"
    3333#endif
     
    7373
    7474    bool m_initialized;
    75     WebCore::TextureMapperNode* m_rootTextureMapperNode;
     75    WebCore::TextureMapperLayer* m_rootTextureMapperLayer;
    7676    OwnPtr<WebCore::WindowGLContext> m_context;
    7777    OwnPtr<WebCore::TextureMapper> m_textureMapper;
  • trunk/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp

    r106901 r107787  
    2929#include "PlatformContextCairo.h"
    3030#include "TextureMapperGL.h"
    31 #include "TextureMapperNode.h"
     31#include "TextureMapperLayer.h"
    3232#include "webkitwebviewprivate.h"
    3333#include <GL/gl.h>
     
    4444    , m_syncTimer(this, &AcceleratedCompositingContext::syncLayersTimeout)
    4545    , m_initialized(false)
    46     , m_rootTextureMapperNode(0)
     46    , m_rootTextureMapperLayer(0)
    4747{
    4848}
     
    7070bool AcceleratedCompositingContext::enabled()
    7171{
    72     return m_rootTextureMapperNode && m_textureMapper;
     72    return m_rootTextureMapperLayer && m_textureMapper;
    7373}
    7474
     
    9191
    9292    m_textureMapper->beginPainting();
    93     m_rootTextureMapperNode->paint();
     93    m_rootTextureMapperLayer->paint();
    9494    m_textureMapper->endPainting();
    9595
     
    102102    if (!graphicsLayer) {
    103103        m_rootGraphicsLayer.clear();
    104         m_rootTextureMapperNode = 0;
     104        m_rootTextureMapperLayer = 0;
    105105        return;
    106106    }
    107107
    108108    m_rootGraphicsLayer = GraphicsLayer::create(this);
    109     m_rootTextureMapperNode = toTextureMapperNode(m_rootGraphicsLayer.get());
     109    m_rootTextureMapperLayer = toTextureMapperLayer(m_rootGraphicsLayer.get());
    110110    m_rootGraphicsLayer->addChild(graphicsLayer);
    111111    m_rootGraphicsLayer->setDrawsContent(true);
     
    128128
    129129    m_textureMapper = TextureMapperGL::create();
    130     m_rootTextureMapperNode->setTextureMapper(m_textureMapper.get());
     130    m_rootTextureMapperLayer->setTextureMapper(m_textureMapper.get());
    131131    m_rootGraphicsLayer->syncCompositingStateForThisLayerOnly();
    132132}
     
    174174    renderLayersToWindow(IntRect());
    175175
    176     if (toTextureMapperNode(m_rootGraphicsLayer.get())->descendantsOrSelfHaveRunningAnimations())
     176    if (toTextureMapperLayer(m_rootGraphicsLayer.get())->descendantsOrSelfHaveRunningAnimations())
    177177        m_syncTimer.startOneShot(1.0 / 60.0);
    178178}
  • trunk/Source/WebKit/qt/Api/qwebframe.cpp

    r106783 r107787  
    105105#if USE(TEXTURE_MAPPER)
    106106#include "texmap/TextureMapper.h"
    107 #include "texmap/TextureMapperNode.h"
     107#include "texmap/TextureMapperLayer.h"
    108108#endif
    109109#include "wtf/HashMap.h"
     
    332332void QWebFramePrivate::renderCompositedLayers(GraphicsContext* context, const IntRect& clip)
    333333{
    334     if (!rootTextureMapperNode || !textureMapper)
     334    if (!rootTextureMapperLayer || !textureMapper)
    335335        return;
    336336
     
    346346                transform.m31(), transform.m32(), 0, transform.m33()
    347347                );
    348     rootTextureMapperNode->setTransform(matrix);
    349     rootTextureMapperNode->setOpacity(painter->opacity());
     348    rootTextureMapperLayer->setTransform(matrix);
     349    rootTextureMapperLayer->setOpacity(painter->opacity());
    350350    textureMapper->beginPainting();
    351351    textureMapper->beginClip(matrix, clip);
    352     rootTextureMapperNode->paint();
     352    rootTextureMapperLayer->paint();
    353353    textureMapper->endClip();
    354354    textureMapper->endPainting();
  • trunk/Source/WebKit/qt/Api/qwebframe.h

    r96345 r107787  
    6161    class FrameLoaderClientQt;
    6262    class ChromeClientQt;
    63     class TextureMapperNodeClientQt;
     63    class TextureMapperLayerClientQt;
    6464}
    6565class QWebFrameData;
     
    235235    friend class WebCore::FrameLoaderClientQt;
    236236    friend class WebCore::ChromeClientQt;
    237     friend class WebCore::TextureMapperNodeClientQt;
     237    friend class WebCore::TextureMapperLayerClientQt;
    238238    QWebFramePrivate *d;
    239239    Q_PRIVATE_SLOT(d, void _q_orientationChanged())
  • trunk/Source/WebKit/qt/Api/qwebframe_p.h

    r103232 r107787  
    5050    class HTMLFrameOwnerElement;
    5151    class Scrollbar;
    52     class TextureMapperNode;
     52    class TextureMapperLayer;
    5353}
    5454class QWebPage;
     
    8686        , marginHeight(-1)
    8787#if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)
    88         , rootTextureMapperNode(0)
     88        , rootTextureMapperLayer(0)
    8989#endif
    9090        {}
     
    126126    int marginHeight;
    127127#if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)
    128     WebCore::TextureMapperNode* rootTextureMapperNode;
     128    WebCore::TextureMapperLayer* rootTextureMapperLayer;
    129129    OwnPtr<WebCore::TextureMapper> textureMapper;
    130130#endif
  • trunk/Source/WebKit/qt/ChangeLog

    r107682 r107787  
     12012-02-15  No'am Rosenthal  <noam.rosenthal@nokia.com>
     2
     3        [Texmap] Divide TextureMapperNode.cpp to 3 files.
     4        https://bugs.webkit.org/show_bug.cgi?id=76660
     5
     6        Rename TextureMapperNode to TextureMapperLayer.
     7
     8        Reviewed by Kenneth Rohde Christiansen.
     9
     10        * Api/qwebframe.cpp:
     11        (QWebFramePrivate::renderCompositedLayers):
     12        * Api/qwebframe.h:
     13        (WebCore):
     14        * Api/qwebframe_p.h:
     15        (WebCore):
     16        (QWebFramePrivate::QWebFramePrivate):
     17        (QWebFramePrivate):
     18        * WebCoreSupport/PageClientQt.cpp:
     19        (WebCore::TextureMapperLayerClientQt::TextureMapperLayerClientQt):
     20        (WebCore::TextureMapperLayerClientQt::setTextureMapper):
     21        (WebCore::TextureMapperLayerClientQt::~TextureMapperLayerClientQt):
     22        (WebCore::TextureMapperLayerClientQt::syncRootLayer):
     23        (WebCore::TextureMapperLayerClientQt::rootLayer):
     24        (WebCore::PageClientQWidget::setRootGraphicsLayer):
     25        (WebCore::PageClientQWidget::syncLayers):
     26        (WebCore::PageClientQGraphicsWidget::syncLayers):
     27        (WebCore::PageClientQGraphicsWidget::setRootGraphicsLayer):
     28        * WebCoreSupport/PageClientQt.h:
     29        (TextureMapperLayerClientQt):
     30        (PageClientQWidget):
     31        (PageClientQGraphicsWidget):
     32
    1332012-02-11  Nikolas Zimmermann  <nzimmermann@rim.com>
    234
  • trunk/Source/WebKit/qt/WebCoreSupport/PageClientQt.cpp

    r106659 r107787  
    3030#if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)
    3131#include "TextureMapper.h"
    32 #include "texmap/TextureMapperNode.h"
     32#include "texmap/TextureMapperLayer.h"
    3333#endif
    3434
     
    3636
    3737#if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)
    38 TextureMapperNodeClientQt::TextureMapperNodeClientQt(QWebFrame* frame, GraphicsLayer* layer)
     38TextureMapperLayerClientQt::TextureMapperLayerClientQt(QWebFrame* frame, GraphicsLayer* layer)
    3939    : m_frame(frame)
    4040    , m_rootGraphicsLayer(GraphicsLayer::create(0))
    4141{
    42     m_frame->d->rootTextureMapperNode = rootNode();
     42    m_frame->d->rootTextureMapperLayer = rootLayer();
    4343    m_rootGraphicsLayer->addChild(layer);
    4444    m_rootGraphicsLayer->setDrawsContent(false);
     
    4747}
    4848
    49 void TextureMapperNodeClientQt::setTextureMapper(const PassOwnPtr<TextureMapper>& textureMapper)
     49void TextureMapperLayerClientQt::setTextureMapper(const PassOwnPtr<TextureMapper>& textureMapper)
    5050{
    5151    m_frame->d->textureMapper = textureMapper;
    52     m_frame->d->rootTextureMapperNode->setTextureMapper(m_frame->d->textureMapper.get());
    53 }
    54 
    55 TextureMapperNodeClientQt::~TextureMapperNodeClientQt()
    56 {
    57     m_frame->d->rootTextureMapperNode = 0;
    58 }
    59 
    60 void TextureMapperNodeClientQt::syncRootLayer()
     52    m_frame->d->rootTextureMapperLayer->setTextureMapper(m_frame->d->textureMapper.get());
     53}
     54
     55TextureMapperLayerClientQt::~TextureMapperLayerClientQt()
     56{
     57    m_frame->d->rootTextureMapperLayer = 0;
     58}
     59
     60void TextureMapperLayerClientQt::syncRootLayer()
    6161{
    6262    m_rootGraphicsLayer->syncCompositingStateForThisLayerOnly();
    6363}
    6464
    65 TextureMapperNode* TextureMapperNodeClientQt::rootNode()
    66 {
    67     return toTextureMapperNode(m_rootGraphicsLayer.get());
     65TextureMapperLayer* TextureMapperLayerClientQt::rootLayer()
     66{
     67    return toTextureMapperLayer(m_rootGraphicsLayer.get());
    6868}
    6969
     
    7272{
    7373    if (layer) {
    74         textureMapperNodeClient = adoptPtr(new TextureMapperNodeClientQt(page->mainFrame(), layer));
    75         textureMapperNodeClient->setTextureMapper(TextureMapper::create());
    76         textureMapperNodeClient->syncRootLayer();
    77         return;
    78     }
    79     textureMapperNodeClient.clear();
     74        TextureMapperLayerClient = adoptPtr(new TextureMapperLayerClientQt(page->mainFrame(), layer));
     75        TextureMapperLayerClient->setTextureMapper(TextureMapper::create());
     76        TextureMapperLayerClient->syncRootLayer();
     77        return;
     78    }
     79    TextureMapperLayerClient.clear();
    8080}
    8181
     
    8989void PageClientQWidget::syncLayers(Timer<PageClientQWidget>*)
    9090{
    91     if (textureMapperNodeClient)
    92         textureMapperNodeClient->syncRootLayer();
     91    if (TextureMapperLayerClient)
     92        TextureMapperLayerClient->syncRootLayer();
    9393    QWebFramePrivate::core(page->mainFrame())->view()->syncCompositingStateIncludingSubframes();
    94     if (!textureMapperNodeClient)
    95         return;
    96     if (textureMapperNodeClient->rootNode()->descendantsOrSelfHaveRunningAnimations() && !syncTimer.isActive())
     94    if (!TextureMapperLayerClient)
     95        return;
     96    if (TextureMapperLayerClient->rootLayer()->descendantsOrSelfHaveRunningAnimations() && !syncTimer.isActive())
    9797        syncTimer.startOneShot(1.0 / 60.0);
    9898    update(view->rect());
     
    240240{
    241241#if USE(TEXTURE_MAPPER)
    242     if (textureMapperNodeClient)
    243         textureMapperNodeClient->syncRootLayer();
     242    if (TextureMapperLayerClient)
     243        TextureMapperLayerClient->syncRootLayer();
    244244#endif
    245245
     
    247247
    248248#if USE(TEXTURE_MAPPER)
    249     if (!textureMapperNodeClient)
    250         return;
    251 
    252     if (textureMapperNodeClient->rootNode()->descendantsOrSelfHaveRunningAnimations() && !syncTimer.isActive())
     249    if (!TextureMapperLayerClient)
     250        return;
     251
     252    if (TextureMapperLayerClient->rootLayer()->descendantsOrSelfHaveRunningAnimations() && !syncTimer.isActive())
    253253        syncTimer.startOneShot(1.0 / 60.0);
    254254    update(view->boundingRect().toAlignedRect());
     
    260260{
    261261    if (layer) {
    262         textureMapperNodeClient = adoptPtr(new TextureMapperNodeClientQt(page->mainFrame(), layer));
     262        TextureMapperLayerClient = adoptPtr(new TextureMapperLayerClientQt(page->mainFrame(), layer));
    263263#if USE(TEXTURE_MAPPER_GL)
    264264        QGraphicsView* graphicsView = view->scene()->views()[0];
    265265        if (graphicsView && graphicsView->viewport() && graphicsView->viewport()->inherits("QGLWidget")) {
    266             textureMapperNodeClient->setTextureMapper(TextureMapper::create(TextureMapper::OpenGLMode));
     266            TextureMapperLayerClient->setTextureMapper(TextureMapper::create(TextureMapper::OpenGLMode));
    267267            return;
    268268        }
    269269#endif
    270         textureMapperNodeClient->setTextureMapper(TextureMapper::create());
    271         return;
    272     }
    273     textureMapperNodeClient.clear();
     270        TextureMapperLayerClient->setTextureMapper(TextureMapper::create());
     271        return;
     272    }
     273    TextureMapperLayerClient.clear();
    274274}
    275275#else
  • trunk/Source/WebKit/qt/WebCoreSupport/PageClientQt.h

    r100410 r107787  
    4545
    4646#if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)
    47 class TextureMapperNodeClientQt {
     47class TextureMapperLayerClientQt {
    4848public:
    49     TextureMapperNodeClientQt(QWebFrame*, GraphicsLayer*);
    50     virtual ~TextureMapperNodeClientQt();
     49    TextureMapperLayerClientQt(QWebFrame*, GraphicsLayer*);
     50    virtual ~TextureMapperLayerClientQt();
    5151    void setTextureMapper(const PassOwnPtr<TextureMapper>&);
    5252    void syncRootLayer();
    53     TextureMapperNode* rootNode();
     53    TextureMapperLayer* rootLayer();
    5454
    5555private:
     
    115115#if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)
    116116    Timer<PageClientQWidget> syncTimer;
    117     OwnPtr<TextureMapperNodeClientQt> textureMapperNodeClient;
     117    OwnPtr<TextureMapperLayerClientQt> TextureMapperLayerClient;
    118118#endif
    119119};
     
    224224#if USE(ACCELERATED_COMPOSITING)
    225225#if USE(TEXTURE_MAPPER)
    226     OwnPtr<TextureMapperNodeClientQt> textureMapperNodeClient;
     226    OwnPtr<TextureMapperLayerClientQt> TextureMapperLayerClient;
    227227#else
    228228    QWeakPointer<QGraphicsObject> rootGraphicsLayer;
  • trunk/Source/WebKit2/ChangeLog

    r107758 r107787  
     12012-02-15  No'am Rosenthal  <noam.rosenthal@nokia.com>
     2
     3        [Texmap] Divide TextureMapperNode.cpp to 3 files.
     4        https://bugs.webkit.org/show_bug.cgi?id=76660
     5
     6        Rename TextureMapperNode to TextureMapperLayer.
     7
     8        Reviewed by Kenneth Rohde Christiansen.
     9
     10        * UIProcess/qt/LayerTreeHostProxyQt.cpp:
     11        (WebKit::LayerTreeHostProxy::createLayer):
     12        (WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
     13        (WebKit::LayerTreeHostProxy::paintToGraphicsContext):
     14        (WebKit::LayerTreeHostProxy::getBackingStore):
     15        (WebKit::LayerTreeHostProxy::ensureRootLayer):
     16        (WebKit::LayerTreeHostProxy::purgeGLResources):
     17
    1182012-02-14  Anders Carlsson  <andersca@apple.com>
    219
  • trunk/Source/WebKit2/UIProcess/qt/LayerTreeHostProxyQt.cpp

    r107707 r107787  
    3131#include "TextureMapper.h"
    3232#include "TextureMapperBackingStore.h"
    33 #include "TextureMapperNode.h"
     33#include "TextureMapperLayer.h"
    3434#include "UpdateInfo.h"
    3535#include "WebCoreArgumentCoders.h"
     
    150150{
    151151    GraphicsLayer* newLayer = new GraphicsLayerTextureMapper(this);
    152     TextureMapperNode* node = toTextureMapperNode(newLayer);
    153     node->setShouldUpdateBackingStoreFromLayer(false);
     152    TextureMapperLayer* layer = toTextureMapperLayer(newLayer);
     153    layer->setShouldUpdateBackingStoreFromLayer(false);
    154154    return adoptPtr(newLayer);
    155155}
     
    179179        return;
    180180
    181     TextureMapperNode* node = toTextureMapperNode(currentRootLayer);
    182 
    183     if (!node)
    184         return;
    185 
    186     node->setTextureMapper(m_textureMapper.get());
     181    TextureMapperLayer* layer = toTextureMapperLayer(currentRootLayer);
     182
     183    if (!layer)
     184        return;
     185
     186    layer->setTextureMapper(m_textureMapper.get());
    187187    m_textureMapper->beginPainting();
    188188    m_textureMapper->bindSurface(0);
     
    195195    }
    196196
    197     node->paint();
     197    layer->paint();
    198198    m_textureMapper->endClip();
    199199    m_textureMapper->endPainting();
    200200
    201     if (node->descendantsOrSelfHaveRunningAnimations()) {
    202         node->syncAnimationsRecursively();
     201    if (layer->descendantsOrSelfHaveRunningAnimations()) {
     202        layer->syncAnimationsRecursively();
    203203        m_viewportUpdateTimer.startOneShot(0);
    204204    }
     
    211211    ASSERT(m_textureMapper->accelerationMode() == TextureMapper::SoftwareMode);
    212212    syncRemoteContent();
    213     TextureMapperNode* node = toTextureMapperNode(rootLayer());
    214 
    215     if (!node)
     213    TextureMapperLayer* layer = toTextureMapperLayer(rootLayer());
     214
     215    if (!layer)
    216216        return;
    217217
     
    220220    m_textureMapper->beginPainting();
    221221    m_textureMapper->bindSurface(0);
    222     node->paint();
     222    layer->paint();
    223223    m_textureMapper->endPainting();
    224224    m_textureMapper->setGraphicsContext(0);
     
    344344{
    345345    ensureLayer(id);
    346     TextureMapperNode* node = toTextureMapperNode(layerByID(id));
    347     RefPtr<LayerBackingStore> backingStore = static_cast<LayerBackingStore*>(node->backingStore().get());
     346    TextureMapperLayer* layer = toTextureMapperLayer(layerByID(id));
     347    RefPtr<LayerBackingStore> backingStore = static_cast<LayerBackingStore*>(layer->backingStore().get());
    348348    if (!backingStore) {
    349349        backingStore = LayerBackingStore::create();
    350         node->setBackingStore(backingStore.get());
     350        layer->setBackingStore(backingStore.get());
    351351    }
    352352    ASSERT(backingStore);
     
    421421    if (!m_textureMapper)
    422422        m_textureMapper = TextureMapper::create(TextureMapper::OpenGLMode);
    423     toTextureMapperNode(m_rootLayer.get())->setTextureMapper(m_textureMapper.get());
     423    toTextureMapperLayer(m_rootLayer.get())->setTextureMapper(m_textureMapper.get());
    424424}
    425425
     
    578578void LayerTreeHostProxy::purgeGLResources()
    579579{
    580     TextureMapperNode* node = toTextureMapperNode(rootLayer());
    581 
    582     if (node)
    583         node->clearBackingStoresRecursive();
     580    TextureMapperLayer* layer = toTextureMapperLayer(rootLayer());
     581
     582    if (layer)
     583        layer->clearBackingStoresRecursive();
    584584
    585585    m_directlyCompositedImages.clear();
Note: See TracChangeset for help on using the changeset viewer.