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):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107787
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-02-15 No'am Rosenthal <noam.rosenthal@nokia.com>
+
+ [Texmap] Divide TextureMapperNode.cpp to 3 files.
+ https://bugs.webkit.org/show_bug.cgi?id=76660
+
+ 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):
+
2012-02-15 Hayato Ito <hayato@chromium.org>
ShadowRoot: Remove a public static factory function which doesn't have any callers.
Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.h \
Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp \
Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.h \
- Source/WebCore/platform/graphics/texmap/TextureMapperNode.cpp \
- Source/WebCore/platform/graphics/texmap/TextureMapperNode.h \
+ Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp \
+ Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h \
Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayer.h
webcoregtk_sources += \
Source/WebCore/platform/graphics/cairo/TextureMapperCairo.cpp \
platform/graphics/texmap/TextureMapperAnimation.h \
platform/graphics/texmap/TextureMapperBackingStore.h \
platform/graphics/texmap/TextureMapperImageBuffer.h \
- platform/graphics/texmap/TextureMapperNode.h \
+ platform/graphics/texmap/TextureMapperLayer.h \
platform/graphics/texmap/TextureMapperPlatformLayer.h
SOURCES += \
platform/graphics/texmap/TextureMapperAnimation.cpp \
platform/graphics/texmap/TextureMapperBackingStore.cpp \
platform/graphics/texmap/TextureMapperImageBuffer.cpp \
- platform/graphics/texmap/TextureMapperNode.cpp \
+ platform/graphics/texmap/TextureMapperLayer.cpp \
platform/graphics/texmap/GraphicsLayerTextureMapper.cpp
!win32-*:contains(QT_CONFIG, opengl) {
'platform/graphics/texmap/TextureMapperBackingStore.h',
'platform/graphics/texmap/TextureMapperImageBuffer.cpp',
'platform/graphics/texmap/TextureMapperImageBuffer.h',
- 'platform/graphics/texmap/TextureMapperNode.cpp',
- 'platform/graphics/texmap/TextureMapperNode.h',
+ 'platform/graphics/texmap/TextureMapperLayer.cpp',
+ 'platform/graphics/texmap/TextureMapperLayer.h',
'platform/graphics/texmap/TextureMapperPlatformLayer.h',
'platform/graphics/transforms/AffineTransform.cpp',
'platform/graphics/transforms/IdentityTransformOperation.h',
#include "config.h"
#include "GraphicsLayerTextureMapper.h"
-#include "TextureMapperNode.h"
+#include "TextureMapperLayer.h"
namespace WebCore {
GraphicsLayerTextureMapper::GraphicsLayerTextureMapper(GraphicsLayerClient* client)
: GraphicsLayer(client)
- , m_node(adoptPtr(new TextureMapperNode()))
+ , m_layer(adoptPtr(new TextureMapperLayer()))
, m_changeMask(0)
, m_needsDisplay(false)
, m_contentsLayer(0)
{
}
-void GraphicsLayerTextureMapper::notifyChange(TextureMapperNode::ChangeMask changeMask)
+void GraphicsLayerTextureMapper::notifyChange(TextureMapperLayer::ChangeMask changeMask)
{
m_changeMask |= changeMask;
if (!client())
void GraphicsLayerTextureMapper::setNeedsDisplay()
{
m_needsDisplay = true;
- notifyChange(TextureMapperNode::DisplayChange);
+ notifyChange(TextureMapperLayer::DisplayChange);
}
/* \reimp (GraphicsLayer.h)
{
if (m_image)
setContentsToImage(m_image.get());
- notifyChange(TextureMapperNode::DisplayChange);
+ notifyChange(TextureMapperLayer::DisplayChange);
}
/* \reimp (GraphicsLayer.h)
if (m_needsDisplay)
return;
m_needsDisplayRect.unite(rect);
- notifyChange(TextureMapperNode::DisplayChange);
+ notifyChange(TextureMapperLayer::DisplayChange);
}
/* \reimp (GraphicsLayer.h)
*/
void GraphicsLayerTextureMapper::setParent(GraphicsLayer* layer)
{
- notifyChange(TextureMapperNode::ParentChange);
+ notifyChange(TextureMapperLayer::ParentChange);
GraphicsLayer::setParent(layer);
}
*/
bool GraphicsLayerTextureMapper::setChildren(const Vector<GraphicsLayer*>& children)
{
- notifyChange(TextureMapperNode::ChildrenChange);
+ notifyChange(TextureMapperLayer::ChildrenChange);
return GraphicsLayer::setChildren(children);
}
*/
void GraphicsLayerTextureMapper::addChild(GraphicsLayer* layer)
{
- notifyChange(TextureMapperNode::ChildrenChange);
+ notifyChange(TextureMapperLayer::ChildrenChange);
GraphicsLayer::addChild(layer);
}
void GraphicsLayerTextureMapper::addChildAtIndex(GraphicsLayer* layer, int index)
{
GraphicsLayer::addChildAtIndex(layer, index);
- notifyChange(TextureMapperNode::ChildrenChange);
+ notifyChange(TextureMapperLayer::ChildrenChange);
}
/* \reimp (GraphicsLayer.h)
void GraphicsLayerTextureMapper::addChildAbove(GraphicsLayer* layer, GraphicsLayer* sibling)
{
GraphicsLayer::addChildAbove(layer, sibling);
- notifyChange(TextureMapperNode::ChildrenChange);
+ notifyChange(TextureMapperLayer::ChildrenChange);
}
/* \reimp (GraphicsLayer.h)
void GraphicsLayerTextureMapper::addChildBelow(GraphicsLayer* layer, GraphicsLayer* sibling)
{
GraphicsLayer::addChildBelow(layer, sibling);
- notifyChange(TextureMapperNode::ChildrenChange);
+ notifyChange(TextureMapperLayer::ChildrenChange);
}
/* \reimp (GraphicsLayer.h)
bool GraphicsLayerTextureMapper::replaceChild(GraphicsLayer* oldChild, GraphicsLayer* newChild)
{
if (GraphicsLayer::replaceChild(oldChild, newChild)) {
- notifyChange(TextureMapperNode::ChildrenChange);
+ notifyChange(TextureMapperLayer::ChildrenChange);
return true;
}
return false;
{
if (!parent())
return;
- notifyChange(TextureMapperNode::ParentChange);
+ notifyChange(TextureMapperLayer::ParentChange);
GraphicsLayer::removeFromParent();
}
if (value == maskLayer())
return;
GraphicsLayer::setMaskLayer(value);
- notifyChange(TextureMapperNode::MaskLayerChange);
+ notifyChange(TextureMapperLayer::MaskLayerChange);
}
if (value == replicaLayer())
return;
GraphicsLayer::setReplicatedByLayer(value);
- notifyChange(TextureMapperNode::ReplicaLayerChange);
+ notifyChange(TextureMapperLayer::ReplicaLayerChange);
}
/* \reimp (GraphicsLayer.h)
if (value == position())
return;
GraphicsLayer::setPosition(value);
- notifyChange(TextureMapperNode::PositionChange);
+ notifyChange(TextureMapperLayer::PositionChange);
}
/* \reimp (GraphicsLayer.h)
if (value == anchorPoint())
return;
GraphicsLayer::setAnchorPoint(value);
- notifyChange(TextureMapperNode::AnchorPointChange);
+ notifyChange(TextureMapperLayer::AnchorPointChange);
}
/* \reimp (GraphicsLayer.h)
return;
GraphicsLayer::setSize(value);
- notifyChange(TextureMapperNode::SizeChange);
+ notifyChange(TextureMapperLayer::SizeChange);
}
/* \reimp (GraphicsLayer.h)
return;
GraphicsLayer::setTransform(value);
- notifyChange(TextureMapperNode::TransformChange);
+ notifyChange(TextureMapperLayer::TransformChange);
}
/* \reimp (GraphicsLayer.h)
if (value == childrenTransform())
return;
GraphicsLayer::setChildrenTransform(value);
- notifyChange(TextureMapperNode::ChildrenTransformChange);
+ notifyChange(TextureMapperLayer::ChildrenTransformChange);
}
/* \reimp (GraphicsLayer.h)
if (value == preserves3D())
return;
GraphicsLayer::setPreserves3D(value);
- notifyChange(TextureMapperNode::Preserves3DChange);
+ notifyChange(TextureMapperLayer::Preserves3DChange);
}
/* \reimp (GraphicsLayer.h)
if (value == masksToBounds())
return;
GraphicsLayer::setMasksToBounds(value);
- notifyChange(TextureMapperNode::MasksToBoundsChange);
+ notifyChange(TextureMapperLayer::MasksToBoundsChange);
}
/* \reimp (GraphicsLayer.h)
{
if (value == drawsContent())
return;
- notifyChange(TextureMapperNode::DrawsContentChange);
+ notifyChange(TextureMapperLayer::DrawsContentChange);
GraphicsLayer::setDrawsContent(value);
}
{
if (value == contentsOpaque())
return;
- notifyChange(TextureMapperNode::ContentsOpaqueChange);
+ notifyChange(TextureMapperLayer::ContentsOpaqueChange);
GraphicsLayer::setContentsOpaque(value);
}
if (value == backfaceVisibility())
return;
GraphicsLayer::setBackfaceVisibility(value);
- notifyChange(TextureMapperNode::BackfaceVisibilityChange);
+ notifyChange(TextureMapperLayer::BackfaceVisibilityChange);
}
/* \reimp (GraphicsLayer.h)
if (value == opacity())
return;
GraphicsLayer::setOpacity(value);
- notifyChange(TextureMapperNode::OpacityChange);
+ notifyChange(TextureMapperLayer::OpacityChange);
}
/* \reimp (GraphicsLayer.h)
if (value == contentsRect())
return;
GraphicsLayer::setContentsRect(value);
- notifyChange(TextureMapperNode::ContentsRectChange);
+ notifyChange(TextureMapperLayer::ContentsRectChange);
}
/* \reimp (GraphicsLayer.h)
m_compositedImage = 0;
setContentsToMedia(m_compositedImage.get());
- notifyChange(TextureMapperNode::ContentChange);
+ notifyChange(TextureMapperLayer::ContentChange);
GraphicsLayer::setContentsToImage(image);
}
return;
GraphicsLayer::setContentsToMedia(media);
- notifyChange(TextureMapperNode::ContentChange);
+ notifyChange(TextureMapperLayer::ContentChange);
m_contentsLayer = media;
}
*/
void GraphicsLayerTextureMapper::syncCompositingStateForThisLayerOnly()
{
- m_node->syncCompositingState(this);
+ m_layer->syncCompositingState(this);
}
/* \reimp (GraphicsLayer.h)
*/
void GraphicsLayerTextureMapper::syncCompositingState(const FloatRect&)
{
- m_node->syncCompositingState(this, TextureMapperNode::TraverseDescendants);
+ m_layer->syncCompositingState(this, TextureMapperLayer::TraverseDescendants);
}
bool GraphicsLayerTextureMapper::addAnimation(const KeyframeValueList& valueList, const IntSize& boxSize, const Animation* anim, const String& keyframesName, double timeOffset)
listsMatch = validateTransformOperations(valueList, hasBigRotation) >= 0;
m_animations.add(keyframesName, TextureMapperAnimation(valueList, boxSize, anim, timeOffset, listsMatch));
- notifyChange(TextureMapperNode::AnimationChange);
+ notifyChange(TextureMapperLayer::AnimationChange);
m_animationStartedTimer.startOneShot(0);
return true;
}
#include "GraphicsLayer.h"
#include "GraphicsLayerClient.h"
#include "Image.h"
-#include "TextureMapperNode.h"
+#include "TextureMapperLayer.h"
#if ENABLE(WEBGL)
#include "GraphicsContext3D.h"
namespace WebCore {
-class TextureMapperNode;
+class TextureMapperLayer;
class BitmapTexture;
class TextureMapper;
class GraphicsLayerTextureMapper : public GraphicsLayer {
- friend class TextureMapperNode;
+ friend class TextureMapperLayer;
public:
GraphicsLayerTextureMapper(GraphicsLayerClient*);
virtual void setName(const String& name);
virtual PlatformLayer* platformLayer() const { return 0; }
- void notifyChange(TextureMapperNode::ChangeMask changeMask);
+ void notifyChange(TextureMapperLayer::ChangeMask);
inline int changeMask() const { return m_changeMask; }
void didSynchronize();
virtual void pauseAnimation(const String&, double);
virtual void removeAnimation(const String&);
- TextureMapperNode* node() const { return m_node.get(); }
+ TextureMapperLayer* layer() const { return m_layer.get(); }
TextureMapperPlatformLayer* contentsLayer() const { return m_contentsLayer; }
bool needsDisplay() const { return m_needsDisplay; }
IntRect needsDisplayRect() const { return enclosingIntRect(m_needsDisplayRect); }
private:
- OwnPtr<TextureMapperNode> m_node;
+ OwnPtr<TextureMapperLayer> m_layer;
RefPtr<TextureMapperBackingStore> m_compositedImage;
RefPtr<Image> m_image;
bool m_syncQueued;
*/
#include "config.h"
-#include "TextureMapperNode.h"
+#include "TextureMapperLayer.h"
#include "stdio.h"
namespace WebCore {
-TextureMapperNode* toTextureMapperNode(GraphicsLayer* layer)
+TextureMapperLayer* toTextureMapperLayer(GraphicsLayer* layer)
{
- return layer ? toGraphicsLayerTextureMapper(layer)->node() : 0;
+ return layer ? toGraphicsLayerTextureMapper(layer)->layer() : 0;
}
-TextureMapperNode* TextureMapperNode::rootLayer()
+TextureMapperLayer* TextureMapperLayer::rootLayer()
{
if (m_effectTarget)
return m_effectTarget->rootLayer();
return this;
}
-void TextureMapperNode::setTransform(const TransformationMatrix& matrix)
+void TextureMapperLayer::setTransform(const TransformationMatrix& matrix)
{
m_transform.setLocalTransform(matrix);
}
-void TextureMapperNode::clearBackingStoresRecursive()
+void TextureMapperLayer::clearBackingStoresRecursive()
{
m_backingStore.clear();
m_contentsLayer = 0;
m_state.maskLayer->clearBackingStoresRecursive();
}
-void TextureMapperNode::computeTransformsRecursive()
+void TextureMapperLayer::computeTransformsRecursive()
{
if (m_size.isEmpty() && m_state.masksToBounds)
return;
sortByZOrder(m_children, 0, m_children.size());
}
-void TextureMapperNode::updateBackingStore(TextureMapper* textureMapper, GraphicsLayer* layer)
+void TextureMapperLayer::updateBackingStore(TextureMapper* textureMapper, GraphicsLayer* layer)
{
if (!layer || !textureMapper)
return;
static_cast<TextureMapperTiledBackingStore*>(m_backingStore.get())->updateContents(textureMapper, image.get(), m_size, dirtyRect);
}
-void TextureMapperNode::paint()
+void TextureMapperLayer::paint()
{
computeTransformsRecursive();
paintRecursive(options);
}
-void TextureMapperNode::paintSelf(const TextureMapperPaintOptions& options)
+void TextureMapperLayer::paintSelf(const TextureMapperPaintOptions& options)
{
// 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.
TransformationMatrix transform =
m_contentsLayer->paintToTextureMapper(options.textureMapper, m_state.contentsRect, transform, opacity, mask.get());
}
-int TextureMapperNode::compareGraphicsLayersZValue(const void* a, const void* b)
+int TextureMapperLayer::compareGraphicsLayersZValue(const void* a, const void* b)
{
- TextureMapperNode* const* nodeA = static_cast<TextureMapperNode* const*>(a);
- TextureMapperNode* const* nodeB = static_cast<TextureMapperNode* const*>(b);
- return int(((*nodeA)->m_centerZ - (*nodeB)->m_centerZ) * 1000);
+ TextureMapperLayer* const* layerA = static_cast<TextureMapperLayer* const*>(a);
+ TextureMapperLayer* const* layerB = static_cast<TextureMapperLayer* const*>(b);
+ return int(((*layerA)->m_centerZ - (*layerB)->m_centerZ) * 1000);
}
-void TextureMapperNode::sortByZOrder(Vector<TextureMapperNode* >& array, int first, int last)
+void TextureMapperLayer::sortByZOrder(Vector<TextureMapperLayer* >& array, int first, int last)
{
- qsort(array.data(), array.size(), sizeof(TextureMapperNode*), compareGraphicsLayersZValue);
+ qsort(array.data(), array.size(), sizeof(TextureMapperLayer*), compareGraphicsLayersZValue);
}
-void TextureMapperNode::paintSelfAndChildren(const TextureMapperPaintOptions& options)
+void TextureMapperLayer::paintSelfAndChildren(const TextureMapperPaintOptions& options)
{
bool hasClip = m_state.masksToBounds && !m_children.isEmpty();
if (hasClip)
options.textureMapper->endClip();
}
-IntRect TextureMapperNode::intermediateSurfaceRect()
+IntRect TextureMapperLayer::intermediateSurfaceRect()
{
// FIXME: Add an inverse transform to LayerTransform.
return intermediateSurfaceRect(m_transform.combined().inverse());
}
-IntRect TextureMapperNode::intermediateSurfaceRect(const TransformationMatrix& matrix)
+IntRect TextureMapperLayer::intermediateSurfaceRect(const TransformationMatrix& matrix)
{
IntRect rect;
TransformationMatrix localTransform = TransformationMatrix(matrix).multiply(m_transform.combined());
return rect;
}
-bool TextureMapperNode::shouldPaintToIntermediateSurface() const
+bool TextureMapperLayer::shouldPaintToIntermediateSurface() const
{
bool hasOpacity = m_opacity < 0.99;
bool hasChildren = !m_children.isEmpty();
return false;
}
-bool TextureMapperNode::isVisible() const
+bool TextureMapperLayer::isVisible() const
{
if (m_size.isEmpty() && (m_state.masksToBounds || m_state.maskLayer || m_children.isEmpty()))
return false;
return true;
}
-void TextureMapperNode::paintSelfAndChildrenWithReplica(const TextureMapperPaintOptions& options)
+void TextureMapperLayer::paintSelfAndChildrenWithReplica(const TextureMapperPaintOptions& options)
{
if (m_state.replicaLayer) {
TextureMapperPaintOptions replicaOptions(options);
paintSelfAndChildren(options);
}
-void TextureMapperNode::paintRecursive(const TextureMapperPaintOptions& options)
+void TextureMapperLayer::paintRecursive(const TextureMapperPaintOptions& options)
{
if (!isVisible())
return;
options.textureMapper->drawTexture(*surface.get(), surfaceRect, targetTransform, opacity, maskTexture.get());
}
-TextureMapperNode::~TextureMapperNode()
+TextureMapperLayer::~TextureMapperLayer()
{
for (int i = m_children.size() - 1; i >= 0; --i)
m_children[i]->m_parent = 0;
m_parent->m_children.remove(m_parent->m_children.find(this));
}
-void TextureMapperNode::syncCompositingState(GraphicsLayerTextureMapper* graphicsLayer, int options)
+void TextureMapperLayer::syncCompositingState(GraphicsLayerTextureMapper* graphicsLayer, int options)
{
syncCompositingState(graphicsLayer, rootLayer()->m_textureMapper, options);
}
-void TextureMapperNode::syncCompositingStateSelf(GraphicsLayerTextureMapper* graphicsLayer, TextureMapper* textureMapper)
+void TextureMapperLayer::syncCompositingStateSelf(GraphicsLayerTextureMapper* graphicsLayer, TextureMapper* textureMapper)
{
int changeMask = graphicsLayer->changeMask();
return;
if (changeMask & ParentChange) {
- TextureMapperNode* newParent = toTextureMapperNode(graphicsLayer->parent());
+ TextureMapperLayer* newParent = toTextureMapperLayer(graphicsLayer->parent());
if (newParent != m_parent) {
- // Remove node from current from child list first.
+ // Remove layer from current from child list first.
if (m_parent) {
size_t index = m_parent->m_children.find(this);
m_parent->m_children.remove(index);
m_parent = 0;
}
- // Set new node parent and add node to the parents child list.
+ // Set new layer parent and add layer to the parents child list.
if (newParent) {
m_parent = newParent;
m_parent->m_children.append(this);
}
if (changeMask & ChildrenChange) {
- // Clear children parent pointer to avoid unsync and crash on node delete.
+ // Clear children parent pointer to avoid unsync and crash on layer delete.
for (size_t i = 0; i < m_children.size(); i++)
m_children[i]->m_parent = 0;
m_children.clear();
for (size_t i = 0; i < graphicsLayer->children().size(); ++i) {
- TextureMapperNode* child = toTextureMapperNode(graphicsLayer->children()[i]);
+ TextureMapperLayer* child = toTextureMapperLayer(graphicsLayer->children()[i]);
if (!child)
continue;
m_children.append(child);
m_size = graphicsLayer->size();
if (changeMask & MaskLayerChange) {
- if (TextureMapperNode* layer = toTextureMapperNode(graphicsLayer->maskLayer()))
+ if (TextureMapperLayer* layer = toTextureMapperLayer(graphicsLayer->maskLayer()))
layer->m_effectTarget = this;
}
if (changeMask & ReplicaLayerChange) {
- if (TextureMapperNode* layer = toTextureMapperNode(graphicsLayer->replicaLayer()))
+ if (TextureMapperLayer* layer = toTextureMapperLayer(graphicsLayer->replicaLayer()))
layer->m_effectTarget = this;
}
if (changeMask & AnimationChange)
m_animations = graphicsLayer->m_animations;
- m_state.maskLayer = toTextureMapperNode(graphicsLayer->maskLayer());
- m_state.replicaLayer = toTextureMapperNode(graphicsLayer->replicaLayer());
+ m_state.maskLayer = toTextureMapperLayer(graphicsLayer->maskLayer());
+ m_state.replicaLayer = toTextureMapperLayer(graphicsLayer->replicaLayer());
m_state.pos = graphicsLayer->position();
m_state.anchorPoint = graphicsLayer->anchorPoint();
m_state.size = graphicsLayer->size();
m_transform.setChildrenTransform(m_state.childrenTransform);
}
-bool TextureMapperNode::descendantsOrSelfHaveRunningAnimations() const
+bool TextureMapperLayer::descendantsOrSelfHaveRunningAnimations() const
{
if (m_animations.hasRunningAnimations())
return true;
return false;
}
-void TextureMapperNode::syncAnimations()
+void TextureMapperLayer::syncAnimations()
{
m_animations.apply(this);
if (!m_animations.hasActiveAnimationsOfType(AnimatedPropertyWebkitTransform))
setOpacity(m_state.opacity);
}
-void TextureMapperNode::syncAnimationsRecursively()
+void TextureMapperLayer::syncAnimationsRecursively()
{
syncAnimations();
m_children[i]->syncAnimationsRecursively();
}
-void TextureMapperNode::syncCompositingState(GraphicsLayerTextureMapper* graphicsLayer, TextureMapper* textureMapper, int options)
+void TextureMapperLayer::syncCompositingState(GraphicsLayerTextureMapper* graphicsLayer, TextureMapper* textureMapper, int options)
{
if (!textureMapper)
return;
if (graphicsLayer) {
Vector<GraphicsLayer*> children = graphicsLayer->children();
for (int i = children.size() - 1; i >= 0; --i) {
- TextureMapperNode* node = toTextureMapperNode(children[i]);
- if (!node)
+ TextureMapperLayer* layer = toTextureMapperLayer(children[i]);
+ if (!layer)
continue;
- node->syncCompositingState(toGraphicsLayerTextureMapper(children[i]), textureMapper, options);
+ layer->syncCompositingState(toGraphicsLayerTextureMapper(children[i]), textureMapper, options);
}
} else {
for (int i = m_children.size() - 1; i >= 0; --i)
Boston, MA 02110-1301, USA.
*/
-#ifndef TextureMapperNode_h
-#define TextureMapperNode_h
+#ifndef TextureMapperLayer_h
+#define TextureMapperLayer_h
#include "FloatRect.h"
#include "GraphicsContext.h"
namespace WebCore {
class TextureMapperPlatformLayer;
-class TextureMapperNode;
+class TextureMapperLayer;
class GraphicsLayerTextureMapper;
class TextureMapperPaintOptions {
{ }
};
-class TextureMapperNode : public TextureMapperAnimationClient {
+class TextureMapperLayer : public TextureMapperAnimationClient {
public:
// This set of flags help us defer which properties of the layer have been
ComputationsOnly = 2
};
- TextureMapperNode()
+ TextureMapperLayer()
: m_parent(0)
, m_effectTarget(0)
, m_contentsLayer(0)
, m_textureMapper(0)
{ }
- virtual ~TextureMapperNode();
+ virtual ~TextureMapperLayer();
void syncCompositingState(GraphicsLayerTextureMapper*, int syncOptions = 0);
void syncCompositingState(GraphicsLayerTextureMapper*, TextureMapper*, int syncOptions = 0);
void clearBackingStoresRecursive();
private:
- TextureMapperNode* rootLayer();
+ TextureMapperLayer* rootLayer();
void computeTransformsRecursive();
void computeOverlapsIfNeeded();
void computeTiles();
FloatRect targetRectForTileRect(const FloatRect& totalTargetRect, const FloatRect& tileRect) const;
void invalidateViewport(const FloatRect&);
void notifyChange(ChangeMask);
- void syncCompositingStateSelf(GraphicsLayerTextureMapper* graphicsLayer, TextureMapper* textureMapper);
+ void syncCompositingStateSelf(GraphicsLayerTextureMapper*, TextureMapper*);
static int compareGraphicsLayersZValue(const void* a, const void* b);
- static void sortByZOrder(Vector<TextureMapperNode* >& array, int first, int last);
+ static void sortByZOrder(Vector<TextureMapperLayer* >& array, int first, int last);
PassRefPtr<BitmapTexture> texture() { return m_backingStore ? m_backingStore->texture() : 0; }
return FloatRect(FloatPoint::zero(), m_size);
}
- Vector<TextureMapperNode*> m_children;
- TextureMapperNode* m_parent;
- TextureMapperNode* m_effectTarget;
+ Vector<TextureMapperLayer*> m_children;
+ TextureMapperLayer* m_parent;
+ TextureMapperLayer* m_effectTarget;
RefPtr<TextureMapperBackingStore> m_backingStore;
TextureMapperPlatformLayer* m_contentsLayer;
FloatSize m_size;
FloatRect contentsRect;
FloatRect needsDisplayRect;
int descendantsWithContent;
- TextureMapperNode* maskLayer;
- TextureMapperNode* replicaLayer;
+ TextureMapperLayer* maskLayer;
+ TextureMapperLayer* replicaLayer;
bool preserves3D : 1;
bool masksToBounds : 1;
bool drawsContent : 1;
};
-TextureMapperNode* toTextureMapperNode(GraphicsLayer*);
+TextureMapperLayer* toTextureMapperLayer(GraphicsLayer*);
}
-#endif // TextureMapperNode_h
+#endif // TextureMapperLayer_h
+2012-02-15 No'am Rosenthal <noam.rosenthal@nokia.com>
+
+ [Texmap] Divide TextureMapperNode.cpp to 3 files.
+ https://bugs.webkit.org/show_bug.cgi?id=76660
+
+ 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):
+
2012-02-11 Nikolas Zimmermann <nzimmermann@rim.com>
Convert svg/animations to use SMIL methods for driving the timeline
#include <wtf/PassOwnPtr.h>
#if USE(TEXTURE_MAPPER_GL)
-#include "TextureMapperNode.h"
+#include "TextureMapperLayer.h"
#include "WindowGLContext.h"
#endif
void initializeIfNecessary();
bool m_initialized;
- WebCore::TextureMapperNode* m_rootTextureMapperNode;
+ WebCore::TextureMapperLayer* m_rootTextureMapperLayer;
OwnPtr<WebCore::WindowGLContext> m_context;
OwnPtr<WebCore::TextureMapper> m_textureMapper;
#endif
#include "FrameView.h"
#include "PlatformContextCairo.h"
#include "TextureMapperGL.h"
-#include "TextureMapperNode.h"
+#include "TextureMapperLayer.h"
#include "webkitwebviewprivate.h"
#include <GL/gl.h>
#include <cairo.h>
: m_webView(webView)
, m_syncTimer(this, &AcceleratedCompositingContext::syncLayersTimeout)
, m_initialized(false)
- , m_rootTextureMapperNode(0)
+ , m_rootTextureMapperLayer(0)
{
}
bool AcceleratedCompositingContext::enabled()
{
- return m_rootTextureMapperNode && m_textureMapper;
+ return m_rootTextureMapperLayer && m_textureMapper;
}
glViewport(0, 0, allocation.width, allocation.height);
m_textureMapper->beginPainting();
- m_rootTextureMapperNode->paint();
+ m_rootTextureMapperLayer->paint();
m_textureMapper->endPainting();
m_context->finishDrawing();
{
if (!graphicsLayer) {
m_rootGraphicsLayer.clear();
- m_rootTextureMapperNode = 0;
+ m_rootTextureMapperLayer = 0;
return;
}
m_rootGraphicsLayer = GraphicsLayer::create(this);
- m_rootTextureMapperNode = toTextureMapperNode(m_rootGraphicsLayer.get());
+ m_rootTextureMapperLayer = toTextureMapperLayer(m_rootGraphicsLayer.get());
m_rootGraphicsLayer->addChild(graphicsLayer);
m_rootGraphicsLayer->setDrawsContent(true);
m_rootGraphicsLayer->setMasksToBounds(false);
glViewport(0, 0, allocation.width, allocation.height);
m_textureMapper = TextureMapperGL::create();
- m_rootTextureMapperNode->setTextureMapper(m_textureMapper.get());
+ m_rootTextureMapperLayer->setTextureMapper(m_textureMapper.get());
m_rootGraphicsLayer->syncCompositingStateForThisLayerOnly();
}
renderLayersToWindow(IntRect());
- if (toTextureMapperNode(m_rootGraphicsLayer.get())->descendantsOrSelfHaveRunningAnimations())
+ if (toTextureMapperLayer(m_rootGraphicsLayer.get())->descendantsOrSelfHaveRunningAnimations())
m_syncTimer.startOneShot(1.0 / 60.0);
}
#endif
#if USE(TEXTURE_MAPPER)
#include "texmap/TextureMapper.h"
-#include "texmap/TextureMapperNode.h"
+#include "texmap/TextureMapperLayer.h"
#endif
#include "wtf/HashMap.h"
#include <QMultiMap>
#if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)
void QWebFramePrivate::renderCompositedLayers(GraphicsContext* context, const IntRect& clip)
{
- if (!rootTextureMapperNode || !textureMapper)
+ if (!rootTextureMapperLayer || !textureMapper)
return;
textureMapper->setGraphicsContext(context);
0, 0, 1, 0,
transform.m31(), transform.m32(), 0, transform.m33()
);
- rootTextureMapperNode->setTransform(matrix);
- rootTextureMapperNode->setOpacity(painter->opacity());
+ rootTextureMapperLayer->setTransform(matrix);
+ rootTextureMapperLayer->setOpacity(painter->opacity());
textureMapper->beginPainting();
textureMapper->beginClip(matrix, clip);
- rootTextureMapperNode->paint();
+ rootTextureMapperLayer->paint();
textureMapper->endClip();
textureMapper->endPainting();
}
class WidgetPrivate;
class FrameLoaderClientQt;
class ChromeClientQt;
- class TextureMapperNodeClientQt;
+ class TextureMapperLayerClientQt;
}
class QWebFrameData;
class QWebHitTestResultPrivate;
friend class WebCore::WidgetPrivate;
friend class WebCore::FrameLoaderClientQt;
friend class WebCore::ChromeClientQt;
- friend class WebCore::TextureMapperNodeClientQt;
+ friend class WebCore::TextureMapperLayerClientQt;
QWebFramePrivate *d;
Q_PRIVATE_SLOT(d, void _q_orientationChanged())
};
class FrameView;
class HTMLFrameOwnerElement;
class Scrollbar;
- class TextureMapperNode;
+ class TextureMapperLayer;
}
class QWebPage;
, marginWidth(-1)
, marginHeight(-1)
#if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)
- , rootTextureMapperNode(0)
+ , rootTextureMapperLayer(0)
#endif
{}
void init(QWebFrame* qframe, QWebFrameData* frameData);
int marginWidth;
int marginHeight;
#if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)
- WebCore::TextureMapperNode* rootTextureMapperNode;
+ WebCore::TextureMapperLayer* rootTextureMapperLayer;
OwnPtr<WebCore::TextureMapper> textureMapper;
#endif
+2012-02-15 No'am Rosenthal <noam.rosenthal@nokia.com>
+
+ [Texmap] Divide TextureMapperNode.cpp to 3 files.
+ https://bugs.webkit.org/show_bug.cgi?id=76660
+
+ 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):
+
2012-02-11 Nikolas Zimmermann <nzimmermann@rim.com>
Convert svg/animations to use SMIL methods for driving the timeline
#if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)
#include "TextureMapper.h"
-#include "texmap/TextureMapperNode.h"
+#include "texmap/TextureMapperLayer.h"
#endif
namespace WebCore {
#if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)
-TextureMapperNodeClientQt::TextureMapperNodeClientQt(QWebFrame* frame, GraphicsLayer* layer)
+TextureMapperLayerClientQt::TextureMapperLayerClientQt(QWebFrame* frame, GraphicsLayer* layer)
: m_frame(frame)
, m_rootGraphicsLayer(GraphicsLayer::create(0))
{
- m_frame->d->rootTextureMapperNode = rootNode();
+ m_frame->d->rootTextureMapperLayer = rootLayer();
m_rootGraphicsLayer->addChild(layer);
m_rootGraphicsLayer->setDrawsContent(false);
m_rootGraphicsLayer->setMasksToBounds(false);
m_rootGraphicsLayer->setSize(IntSize(1, 1));
}
-void TextureMapperNodeClientQt::setTextureMapper(const PassOwnPtr<TextureMapper>& textureMapper)
+void TextureMapperLayerClientQt::setTextureMapper(const PassOwnPtr<TextureMapper>& textureMapper)
{
m_frame->d->textureMapper = textureMapper;
- m_frame->d->rootTextureMapperNode->setTextureMapper(m_frame->d->textureMapper.get());
+ m_frame->d->rootTextureMapperLayer->setTextureMapper(m_frame->d->textureMapper.get());
}
-TextureMapperNodeClientQt::~TextureMapperNodeClientQt()
+TextureMapperLayerClientQt::~TextureMapperLayerClientQt()
{
- m_frame->d->rootTextureMapperNode = 0;
+ m_frame->d->rootTextureMapperLayer = 0;
}
-void TextureMapperNodeClientQt::syncRootLayer()
+void TextureMapperLayerClientQt::syncRootLayer()
{
m_rootGraphicsLayer->syncCompositingStateForThisLayerOnly();
}
-TextureMapperNode* TextureMapperNodeClientQt::rootNode()
+TextureMapperLayer* TextureMapperLayerClientQt::rootLayer()
{
- return toTextureMapperNode(m_rootGraphicsLayer.get());
+ return toTextureMapperLayer(m_rootGraphicsLayer.get());
}
void PageClientQWidget::setRootGraphicsLayer(GraphicsLayer* layer)
{
if (layer) {
- textureMapperNodeClient = adoptPtr(new TextureMapperNodeClientQt(page->mainFrame(), layer));
- textureMapperNodeClient->setTextureMapper(TextureMapper::create());
- textureMapperNodeClient->syncRootLayer();
+ TextureMapperLayerClient = adoptPtr(new TextureMapperLayerClientQt(page->mainFrame(), layer));
+ TextureMapperLayerClient->setTextureMapper(TextureMapper::create());
+ TextureMapperLayerClient->syncRootLayer();
return;
}
- textureMapperNodeClient.clear();
+ TextureMapperLayerClient.clear();
}
void PageClientQWidget::markForSync(bool scheduleSync)
void PageClientQWidget::syncLayers(Timer<PageClientQWidget>*)
{
- if (textureMapperNodeClient)
- textureMapperNodeClient->syncRootLayer();
+ if (TextureMapperLayerClient)
+ TextureMapperLayerClient->syncRootLayer();
QWebFramePrivate::core(page->mainFrame())->view()->syncCompositingStateIncludingSubframes();
- if (!textureMapperNodeClient)
+ if (!TextureMapperLayerClient)
return;
- if (textureMapperNodeClient->rootNode()->descendantsOrSelfHaveRunningAnimations() && !syncTimer.isActive())
+ if (TextureMapperLayerClient->rootLayer()->descendantsOrSelfHaveRunningAnimations() && !syncTimer.isActive())
syncTimer.startOneShot(1.0 / 60.0);
update(view->rect());
}
void PageClientQGraphicsWidget::syncLayers()
{
#if USE(TEXTURE_MAPPER)
- if (textureMapperNodeClient)
- textureMapperNodeClient->syncRootLayer();
+ if (TextureMapperLayerClient)
+ TextureMapperLayerClient->syncRootLayer();
#endif
QWebFramePrivate::core(page->mainFrame())->view()->syncCompositingStateIncludingSubframes();
#if USE(TEXTURE_MAPPER)
- if (!textureMapperNodeClient)
+ if (!TextureMapperLayerClient)
return;
- if (textureMapperNodeClient->rootNode()->descendantsOrSelfHaveRunningAnimations() && !syncTimer.isActive())
+ if (TextureMapperLayerClient->rootLayer()->descendantsOrSelfHaveRunningAnimations() && !syncTimer.isActive())
syncTimer.startOneShot(1.0 / 60.0);
update(view->boundingRect().toAlignedRect());
#endif
void PageClientQGraphicsWidget::setRootGraphicsLayer(GraphicsLayer* layer)
{
if (layer) {
- textureMapperNodeClient = adoptPtr(new TextureMapperNodeClientQt(page->mainFrame(), layer));
+ TextureMapperLayerClient = adoptPtr(new TextureMapperLayerClientQt(page->mainFrame(), layer));
#if USE(TEXTURE_MAPPER_GL)
QGraphicsView* graphicsView = view->scene()->views()[0];
if (graphicsView && graphicsView->viewport() && graphicsView->viewport()->inherits("QGLWidget")) {
- textureMapperNodeClient->setTextureMapper(TextureMapper::create(TextureMapper::OpenGLMode));
+ TextureMapperLayerClient->setTextureMapper(TextureMapper::create(TextureMapper::OpenGLMode));
return;
}
#endif
- textureMapperNodeClient->setTextureMapper(TextureMapper::create());
+ TextureMapperLayerClient->setTextureMapper(TextureMapper::create());
return;
}
- textureMapperNodeClient.clear();
+ TextureMapperLayerClient.clear();
}
#else
void PageClientQGraphicsWidget::setRootGraphicsLayer(GraphicsLayer* layer)
namespace WebCore {
#if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)
-class TextureMapperNodeClientQt {
+class TextureMapperLayerClientQt {
public:
- TextureMapperNodeClientQt(QWebFrame*, GraphicsLayer*);
- virtual ~TextureMapperNodeClientQt();
+ TextureMapperLayerClientQt(QWebFrame*, GraphicsLayer*);
+ virtual ~TextureMapperLayerClientQt();
void setTextureMapper(const PassOwnPtr<TextureMapper>&);
void syncRootLayer();
- TextureMapperNode* rootNode();
+ TextureMapperLayer* rootLayer();
private:
QWebFrame* m_frame;
#if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)
Timer<PageClientQWidget> syncTimer;
- OwnPtr<TextureMapperNodeClientQt> textureMapperNodeClient;
+ OwnPtr<TextureMapperLayerClientQt> TextureMapperLayerClient;
#endif
};
#if USE(ACCELERATED_COMPOSITING)
#if USE(TEXTURE_MAPPER)
- OwnPtr<TextureMapperNodeClientQt> textureMapperNodeClient;
+ OwnPtr<TextureMapperLayerClientQt> TextureMapperLayerClient;
#else
QWeakPointer<QGraphicsObject> rootGraphicsLayer;
#endif
+2012-02-15 No'am Rosenthal <noam.rosenthal@nokia.com>
+
+ [Texmap] Divide TextureMapperNode.cpp to 3 files.
+ https://bugs.webkit.org/show_bug.cgi?id=76660
+
+ 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):
+
2012-02-14 Anders Carlsson <andersca@apple.com>
Swipe gestures don't work if main frame has a horizontal scrollbar
#include "ShareableBitmap.h"
#include "TextureMapper.h"
#include "TextureMapperBackingStore.h"
-#include "TextureMapperNode.h"
+#include "TextureMapperLayer.h"
#include "UpdateInfo.h"
#include "WebCoreArgumentCoders.h"
#include "WebLayerTreeInfo.h"
PassOwnPtr<GraphicsLayer> LayerTreeHostProxy::createLayer(WebLayerID layerID)
{
GraphicsLayer* newLayer = new GraphicsLayerTextureMapper(this);
- TextureMapperNode* node = toTextureMapperNode(newLayer);
- node->setShouldUpdateBackingStoreFromLayer(false);
+ TextureMapperLayer* layer = toTextureMapperLayer(newLayer);
+ layer->setShouldUpdateBackingStoreFromLayer(false);
return adoptPtr(newLayer);
}
if (!currentRootLayer)
return;
- TextureMapperNode* node = toTextureMapperNode(currentRootLayer);
+ TextureMapperLayer* layer = toTextureMapperLayer(currentRootLayer);
- if (!node)
+ if (!layer)
return;
- node->setTextureMapper(m_textureMapper.get());
+ layer->setTextureMapper(m_textureMapper.get());
m_textureMapper->beginPainting();
m_textureMapper->bindSurface(0);
m_textureMapper->beginClip(TransformationMatrix(), clipRect);
currentRootLayer->syncCompositingStateForThisLayerOnly();
}
- node->paint();
+ layer->paint();
m_textureMapper->endClip();
m_textureMapper->endPainting();
- if (node->descendantsOrSelfHaveRunningAnimations()) {
- node->syncAnimationsRecursively();
+ if (layer->descendantsOrSelfHaveRunningAnimations()) {
+ layer->syncAnimationsRecursively();
m_viewportUpdateTimer.startOneShot(0);
}
}
m_textureMapper = TextureMapper::create();
ASSERT(m_textureMapper->accelerationMode() == TextureMapper::SoftwareMode);
syncRemoteContent();
- TextureMapperNode* node = toTextureMapperNode(rootLayer());
+ TextureMapperLayer* layer = toTextureMapperLayer(rootLayer());
- if (!node)
+ if (!layer)
return;
GraphicsContext graphicsContext(painter);
m_textureMapper->setGraphicsContext(&graphicsContext);
m_textureMapper->beginPainting();
m_textureMapper->bindSurface(0);
- node->paint();
+ layer->paint();
m_textureMapper->endPainting();
m_textureMapper->setGraphicsContext(0);
}
PassRefPtr<LayerBackingStore> LayerTreeHostProxy::getBackingStore(WebLayerID id)
{
ensureLayer(id);
- TextureMapperNode* node = toTextureMapperNode(layerByID(id));
- RefPtr<LayerBackingStore> backingStore = static_cast<LayerBackingStore*>(node->backingStore().get());
+ TextureMapperLayer* layer = toTextureMapperLayer(layerByID(id));
+ RefPtr<LayerBackingStore> backingStore = static_cast<LayerBackingStore*>(layer->backingStore().get());
if (!backingStore) {
backingStore = LayerBackingStore::create();
- node->setBackingStore(backingStore.get());
+ layer->setBackingStore(backingStore.get());
}
ASSERT(backingStore);
return backingStore;
m_rootLayer->setSize(FloatSize(1.0, 1.0));
if (!m_textureMapper)
m_textureMapper = TextureMapper::create(TextureMapper::OpenGLMode);
- toTextureMapperNode(m_rootLayer.get())->setTextureMapper(m_textureMapper.get());
+ toTextureMapperLayer(m_rootLayer.get())->setTextureMapper(m_textureMapper.get());
}
void LayerTreeHostProxy::syncRemoteContent()
void LayerTreeHostProxy::purgeGLResources()
{
- TextureMapperNode* node = toTextureMapperNode(rootLayer());
+ TextureMapperLayer* layer = toTextureMapperLayer(rootLayer());
- if (node)
- node->clearBackingStoresRecursive();
+ if (layer)
+ layer->clearBackingStoresRecursive();
m_directlyCompositedImages.clear();
m_textureMapper.clear();