Changeset 107787 in webkit
- Timestamp:
- Feb 15, 2012 12:26:30 AM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 17 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r107786 r107787 1 2012-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 1 93 2012-02-15 Hayato Ito <hayato@chromium.org> 2 94 -
trunk/Source/WebCore/GNUmakefile.list.am
r107778 r107787 5754 5754 Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp \ 5755 5755 Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.h \ 5756 Source/WebCore/platform/graphics/texmap/TextureMapper Node.cpp \5757 Source/WebCore/platform/graphics/texmap/TextureMapper Node.h \5756 Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp \ 5757 Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h \ 5758 5758 Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayer.h 5759 5759 webcoregtk_sources += \ -
trunk/Source/WebCore/Target.pri
r107707 r107787 3958 3958 platform/graphics/texmap/TextureMapperBackingStore.h \ 3959 3959 platform/graphics/texmap/TextureMapperImageBuffer.h \ 3960 platform/graphics/texmap/TextureMapper Node.h \3960 platform/graphics/texmap/TextureMapperLayer.h \ 3961 3961 platform/graphics/texmap/TextureMapperPlatformLayer.h 3962 3962 … … 3967 3967 platform/graphics/texmap/TextureMapperBackingStore.cpp \ 3968 3968 platform/graphics/texmap/TextureMapperImageBuffer.cpp \ 3969 platform/graphics/texmap/TextureMapper Node.cpp \3969 platform/graphics/texmap/TextureMapperLayer.cpp \ 3970 3970 platform/graphics/texmap/GraphicsLayerTextureMapper.cpp 3971 3971 -
trunk/Source/WebCore/WebCore.gypi
r107778 r107787 3591 3591 'platform/graphics/texmap/TextureMapperImageBuffer.cpp', 3592 3592 'platform/graphics/texmap/TextureMapperImageBuffer.h', 3593 'platform/graphics/texmap/TextureMapper Node.cpp',3594 'platform/graphics/texmap/TextureMapper Node.h',3593 'platform/graphics/texmap/TextureMapperLayer.cpp', 3594 'platform/graphics/texmap/TextureMapperLayer.h', 3595 3595 'platform/graphics/texmap/TextureMapperPlatformLayer.h', 3596 3596 'platform/graphics/transforms/AffineTransform.cpp', -
trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp
r107707 r107787 21 21 #include "GraphicsLayerTextureMapper.h" 22 22 23 #include "TextureMapper Node.h"23 #include "TextureMapperLayer.h" 24 24 25 25 namespace WebCore { … … 27 27 GraphicsLayerTextureMapper::GraphicsLayerTextureMapper(GraphicsLayerClient* client) 28 28 : GraphicsLayer(client) 29 , m_ node(adoptPtr(new TextureMapperNode()))29 , m_layer(adoptPtr(new TextureMapperLayer())) 30 30 , m_changeMask(0) 31 31 , m_needsDisplay(false) … … 35 35 } 36 36 37 void GraphicsLayerTextureMapper::notifyChange(TextureMapper Node::ChangeMask changeMask)37 void GraphicsLayerTextureMapper::notifyChange(TextureMapperLayer::ChangeMask changeMask) 38 38 { 39 39 m_changeMask |= changeMask; … … 65 65 { 66 66 m_needsDisplay = true; 67 notifyChange(TextureMapper Node::DisplayChange);67 notifyChange(TextureMapperLayer::DisplayChange); 68 68 } 69 69 … … 74 74 if (m_image) 75 75 setContentsToImage(m_image.get()); 76 notifyChange(TextureMapper Node::DisplayChange);76 notifyChange(TextureMapperLayer::DisplayChange); 77 77 } 78 78 … … 84 84 return; 85 85 m_needsDisplayRect.unite(rect); 86 notifyChange(TextureMapper Node::DisplayChange);86 notifyChange(TextureMapperLayer::DisplayChange); 87 87 } 88 88 … … 91 91 void GraphicsLayerTextureMapper::setParent(GraphicsLayer* layer) 92 92 { 93 notifyChange(TextureMapper Node::ParentChange);93 notifyChange(TextureMapperLayer::ParentChange); 94 94 GraphicsLayer::setParent(layer); 95 95 } … … 99 99 bool GraphicsLayerTextureMapper::setChildren(const Vector<GraphicsLayer*>& children) 100 100 { 101 notifyChange(TextureMapper Node::ChildrenChange);101 notifyChange(TextureMapperLayer::ChildrenChange); 102 102 return GraphicsLayer::setChildren(children); 103 103 } … … 107 107 void GraphicsLayerTextureMapper::addChild(GraphicsLayer* layer) 108 108 { 109 notifyChange(TextureMapper Node::ChildrenChange);109 notifyChange(TextureMapperLayer::ChildrenChange); 110 110 GraphicsLayer::addChild(layer); 111 111 } … … 116 116 { 117 117 GraphicsLayer::addChildAtIndex(layer, index); 118 notifyChange(TextureMapper Node::ChildrenChange);118 notifyChange(TextureMapperLayer::ChildrenChange); 119 119 } 120 120 … … 124 124 { 125 125 GraphicsLayer::addChildAbove(layer, sibling); 126 notifyChange(TextureMapper Node::ChildrenChange);126 notifyChange(TextureMapperLayer::ChildrenChange); 127 127 } 128 128 … … 132 132 { 133 133 GraphicsLayer::addChildBelow(layer, sibling); 134 notifyChange(TextureMapper Node::ChildrenChange);134 notifyChange(TextureMapperLayer::ChildrenChange); 135 135 } 136 136 … … 140 140 { 141 141 if (GraphicsLayer::replaceChild(oldChild, newChild)) { 142 notifyChange(TextureMapper Node::ChildrenChange);142 notifyChange(TextureMapperLayer::ChildrenChange); 143 143 return true; 144 144 } … … 152 152 if (!parent()) 153 153 return; 154 notifyChange(TextureMapper Node::ParentChange);154 notifyChange(TextureMapperLayer::ParentChange); 155 155 GraphicsLayer::removeFromParent(); 156 156 } … … 163 163 return; 164 164 GraphicsLayer::setMaskLayer(value); 165 notifyChange(TextureMapper Node::MaskLayerChange);165 notifyChange(TextureMapperLayer::MaskLayerChange); 166 166 } 167 167 … … 174 174 return; 175 175 GraphicsLayer::setReplicatedByLayer(value); 176 notifyChange(TextureMapper Node::ReplicaLayerChange);176 notifyChange(TextureMapperLayer::ReplicaLayerChange); 177 177 } 178 178 … … 184 184 return; 185 185 GraphicsLayer::setPosition(value); 186 notifyChange(TextureMapper Node::PositionChange);186 notifyChange(TextureMapperLayer::PositionChange); 187 187 } 188 188 … … 194 194 return; 195 195 GraphicsLayer::setAnchorPoint(value); 196 notifyChange(TextureMapper Node::AnchorPointChange);196 notifyChange(TextureMapperLayer::AnchorPointChange); 197 197 } 198 198 … … 205 205 206 206 GraphicsLayer::setSize(value); 207 notifyChange(TextureMapper Node::SizeChange);207 notifyChange(TextureMapperLayer::SizeChange); 208 208 } 209 209 … … 216 216 217 217 GraphicsLayer::setTransform(value); 218 notifyChange(TextureMapper Node::TransformChange);218 notifyChange(TextureMapperLayer::TransformChange); 219 219 } 220 220 … … 226 226 return; 227 227 GraphicsLayer::setChildrenTransform(value); 228 notifyChange(TextureMapper Node::ChildrenTransformChange);228 notifyChange(TextureMapperLayer::ChildrenTransformChange); 229 229 } 230 230 … … 236 236 return; 237 237 GraphicsLayer::setPreserves3D(value); 238 notifyChange(TextureMapper Node::Preserves3DChange);238 notifyChange(TextureMapperLayer::Preserves3DChange); 239 239 } 240 240 … … 246 246 return; 247 247 GraphicsLayer::setMasksToBounds(value); 248 notifyChange(TextureMapper Node::MasksToBoundsChange);248 notifyChange(TextureMapperLayer::MasksToBoundsChange); 249 249 } 250 250 … … 255 255 if (value == drawsContent()) 256 256 return; 257 notifyChange(TextureMapper Node::DrawsContentChange);257 notifyChange(TextureMapperLayer::DrawsContentChange); 258 258 GraphicsLayer::setDrawsContent(value); 259 259 } … … 265 265 if (value == contentsOpaque()) 266 266 return; 267 notifyChange(TextureMapper Node::ContentsOpaqueChange);267 notifyChange(TextureMapperLayer::ContentsOpaqueChange); 268 268 GraphicsLayer::setContentsOpaque(value); 269 269 } … … 276 276 return; 277 277 GraphicsLayer::setBackfaceVisibility(value); 278 notifyChange(TextureMapper Node::BackfaceVisibilityChange);278 notifyChange(TextureMapperLayer::BackfaceVisibilityChange); 279 279 } 280 280 … … 286 286 return; 287 287 GraphicsLayer::setOpacity(value); 288 notifyChange(TextureMapper Node::OpacityChange);288 notifyChange(TextureMapperLayer::OpacityChange); 289 289 } 290 290 … … 296 296 return; 297 297 GraphicsLayer::setContentsRect(value); 298 notifyChange(TextureMapper Node::ContentsRectChange);298 notifyChange(TextureMapperLayer::ContentsRectChange); 299 299 } 300 300 … … 315 315 316 316 setContentsToMedia(m_compositedImage.get()); 317 notifyChange(TextureMapper Node::ContentChange);317 notifyChange(TextureMapperLayer::ContentChange); 318 318 GraphicsLayer::setContentsToImage(image); 319 319 } … … 325 325 326 326 GraphicsLayer::setContentsToMedia(media); 327 notifyChange(TextureMapper Node::ContentChange);327 notifyChange(TextureMapperLayer::ContentChange); 328 328 m_contentsLayer = media; 329 329 } … … 333 333 void GraphicsLayerTextureMapper::syncCompositingStateForThisLayerOnly() 334 334 { 335 m_ node->syncCompositingState(this);335 m_layer->syncCompositingState(this); 336 336 } 337 337 … … 340 340 void GraphicsLayerTextureMapper::syncCompositingState(const FloatRect&) 341 341 { 342 m_ node->syncCompositingState(this, TextureMapperNode::TraverseDescendants);342 m_layer->syncCompositingState(this, TextureMapperLayer::TraverseDescendants); 343 343 } 344 344 … … 357 357 358 358 m_animations.add(keyframesName, TextureMapperAnimation(valueList, boxSize, anim, timeOffset, listsMatch)); 359 notifyChange(TextureMapper Node::AnimationChange);359 notifyChange(TextureMapperLayer::AnimationChange); 360 360 m_animationStartedTimer.startOneShot(0); 361 361 return true; -
trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h
r107707 r107787 25 25 #include "GraphicsLayerClient.h" 26 26 #include "Image.h" 27 #include "TextureMapper Node.h"27 #include "TextureMapperLayer.h" 28 28 29 29 #if ENABLE(WEBGL) … … 33 33 namespace WebCore { 34 34 35 class TextureMapper Node;35 class TextureMapperLayer; 36 36 class BitmapTexture; 37 37 class TextureMapper; 38 38 39 39 class GraphicsLayerTextureMapper : public GraphicsLayer { 40 friend class TextureMapper Node;40 friend class TextureMapperLayer; 41 41 42 42 public: … … 78 78 virtual PlatformLayer* platformLayer() const { return 0; } 79 79 80 void notifyChange(TextureMapper Node::ChangeMask changeMask);80 void notifyChange(TextureMapperLayer::ChangeMask); 81 81 inline int changeMask() const { return m_changeMask; } 82 82 void didSynchronize(); … … 86 86 virtual void removeAnimation(const String&); 87 87 88 TextureMapper Node* node() const { return m_node.get(); }88 TextureMapperLayer* layer() const { return m_layer.get(); } 89 89 TextureMapperPlatformLayer* contentsLayer() const { return m_contentsLayer; } 90 90 bool needsDisplay() const { return m_needsDisplay; } … … 92 92 93 93 private: 94 OwnPtr<TextureMapper Node> m_node;94 OwnPtr<TextureMapperLayer> m_layer; 95 95 RefPtr<TextureMapperBackingStore> m_compositedImage; 96 96 RefPtr<Image> m_image; -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
r107786 r107787 19 19 20 20 #include "config.h" 21 #include "TextureMapper Node.h"21 #include "TextureMapperLayer.h" 22 22 23 23 #include "stdio.h" … … 31 31 namespace WebCore { 32 32 33 TextureMapper Node* toTextureMapperNode(GraphicsLayer* layer)34 { 35 return layer ? toGraphicsLayerTextureMapper(layer)-> node() : 0;36 } 37 38 TextureMapper Node* TextureMapperNode::rootLayer()33 TextureMapperLayer* toTextureMapperLayer(GraphicsLayer* layer) 34 { 35 return layer ? toGraphicsLayerTextureMapper(layer)->layer() : 0; 36 } 37 38 TextureMapperLayer* TextureMapperLayer::rootLayer() 39 39 { 40 40 if (m_effectTarget) … … 45 45 } 46 46 47 void TextureMapper Node::setTransform(const TransformationMatrix& matrix)47 void TextureMapperLayer::setTransform(const TransformationMatrix& matrix) 48 48 { 49 49 m_transform.setLocalTransform(matrix); 50 50 } 51 51 52 void TextureMapper Node::clearBackingStoresRecursive()52 void TextureMapperLayer::clearBackingStoresRecursive() 53 53 { 54 54 m_backingStore.clear(); … … 60 60 } 61 61 62 void TextureMapper Node::computeTransformsRecursive()62 void TextureMapperLayer::computeTransformsRecursive() 63 63 { 64 64 if (m_size.isEmpty() && m_state.masksToBounds) … … 90 90 } 91 91 92 void TextureMapper Node::updateBackingStore(TextureMapper* textureMapper, GraphicsLayer* layer)92 void TextureMapperLayer::updateBackingStore(TextureMapper* textureMapper, GraphicsLayer* layer) 93 93 { 94 94 if (!layer || !textureMapper) … … 132 132 } 133 133 134 void TextureMapper Node::paint()134 void TextureMapperLayer::paint() 135 135 { 136 136 computeTransformsRecursive(); … … 142 142 } 143 143 144 void TextureMapper Node::paintSelf(const TextureMapperPaintOptions& options)144 void TextureMapperLayer::paintSelf(const TextureMapperPaintOptions& options) 145 145 { 146 146 // 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. … … 160 160 } 161 161 162 int TextureMapper Node::compareGraphicsLayersZValue(const void* a, const void* b)163 { 164 TextureMapper Node* const* nodeA = static_cast<TextureMapperNode* const*>(a);165 TextureMapper Node* const* nodeB = static_cast<TextureMapperNode* const*>(b);166 return int(((* nodeA)->m_centerZ - (*nodeB)->m_centerZ) * 1000);167 } 168 169 void TextureMapper Node::sortByZOrder(Vector<TextureMapperNode* >& array, int first, int last)170 { 171 qsort(array.data(), array.size(), sizeof(TextureMapper Node*), compareGraphicsLayersZValue);172 } 173 174 void TextureMapper Node::paintSelfAndChildren(const TextureMapperPaintOptions& options)162 int 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 169 void TextureMapperLayer::sortByZOrder(Vector<TextureMapperLayer* >& array, int first, int last) 170 { 171 qsort(array.data(), array.size(), sizeof(TextureMapperLayer*), compareGraphicsLayersZValue); 172 } 173 174 void TextureMapperLayer::paintSelfAndChildren(const TextureMapperPaintOptions& options) 175 175 { 176 176 bool hasClip = m_state.masksToBounds && !m_children.isEmpty(); … … 187 187 } 188 188 189 IntRect TextureMapper Node::intermediateSurfaceRect()189 IntRect TextureMapperLayer::intermediateSurfaceRect() 190 190 { 191 191 // FIXME: Add an inverse transform to LayerTransform. … … 193 193 } 194 194 195 IntRect TextureMapper Node::intermediateSurfaceRect(const TransformationMatrix& matrix)195 IntRect TextureMapperLayer::intermediateSurfaceRect(const TransformationMatrix& matrix) 196 196 { 197 197 IntRect rect; … … 209 209 } 210 210 211 bool TextureMapper Node::shouldPaintToIntermediateSurface() const211 bool TextureMapperLayer::shouldPaintToIntermediateSurface() const 212 212 { 213 213 bool hasOpacity = m_opacity < 0.99; … … 234 234 } 235 235 236 bool TextureMapper Node::isVisible() const236 bool TextureMapperLayer::isVisible() const 237 237 { 238 238 if (m_size.isEmpty() && (m_state.masksToBounds || m_state.maskLayer || m_children.isEmpty())) … … 243 243 } 244 244 245 void TextureMapper Node::paintSelfAndChildrenWithReplica(const TextureMapperPaintOptions& options)245 void TextureMapperLayer::paintSelfAndChildrenWithReplica(const TextureMapperPaintOptions& options) 246 246 { 247 247 if (m_state.replicaLayer) { … … 261 261 } 262 262 263 void TextureMapper Node::paintRecursive(const TextureMapperPaintOptions& options)263 void TextureMapperLayer::paintRecursive(const TextureMapperPaintOptions& options) 264 264 { 265 265 if (!isVisible()) … … 306 306 } 307 307 308 TextureMapper Node::~TextureMapperNode()308 TextureMapperLayer::~TextureMapperLayer() 309 309 { 310 310 for (int i = m_children.size() - 1; i >= 0; --i) … … 315 315 } 316 316 317 void TextureMapper Node::syncCompositingState(GraphicsLayerTextureMapper* graphicsLayer, int options)317 void TextureMapperLayer::syncCompositingState(GraphicsLayerTextureMapper* graphicsLayer, int options) 318 318 { 319 319 syncCompositingState(graphicsLayer, rootLayer()->m_textureMapper, options); 320 320 } 321 321 322 void TextureMapper Node::syncCompositingStateSelf(GraphicsLayerTextureMapper* graphicsLayer, TextureMapper* textureMapper)322 void TextureMapperLayer::syncCompositingStateSelf(GraphicsLayerTextureMapper* graphicsLayer, TextureMapper* textureMapper) 323 323 { 324 324 int changeMask = graphicsLayer->changeMask(); … … 328 328 329 329 if (changeMask & ParentChange) { 330 TextureMapper Node* newParent = toTextureMapperNode(graphicsLayer->parent());330 TextureMapperLayer* newParent = toTextureMapperLayer(graphicsLayer->parent()); 331 331 if (newParent != m_parent) { 332 // Remove nodefrom current from child list first.332 // Remove layer from current from child list first. 333 333 if (m_parent) { 334 334 size_t index = m_parent->m_children.find(this); … … 336 336 m_parent = 0; 337 337 } 338 // Set new node parent and add nodeto the parents child list.338 // Set new layer parent and add layer to the parents child list. 339 339 if (newParent) { 340 340 m_parent = newParent; … … 345 345 346 346 if (changeMask & ChildrenChange) { 347 // Clear children parent pointer to avoid unsync and crash on nodedelete.347 // Clear children parent pointer to avoid unsync and crash on layer delete. 348 348 for (size_t i = 0; i < m_children.size(); i++) 349 349 m_children[i]->m_parent = 0; … … 351 351 m_children.clear(); 352 352 for (size_t i = 0; i < graphicsLayer->children().size(); ++i) { 353 TextureMapper Node* child = toTextureMapperNode(graphicsLayer->children()[i]);353 TextureMapperLayer* child = toTextureMapperLayer(graphicsLayer->children()[i]); 354 354 if (!child) 355 355 continue; … … 362 362 363 363 if (changeMask & MaskLayerChange) { 364 if (TextureMapper Node* layer = toTextureMapperNode(graphicsLayer->maskLayer()))364 if (TextureMapperLayer* layer = toTextureMapperLayer(graphicsLayer->maskLayer())) 365 365 layer->m_effectTarget = this; 366 366 } 367 367 368 368 if (changeMask & ReplicaLayerChange) { 369 if (TextureMapper Node* layer = toTextureMapperNode(graphicsLayer->replicaLayer()))369 if (TextureMapperLayer* layer = toTextureMapperLayer(graphicsLayer->replicaLayer())) 370 370 layer->m_effectTarget = this; 371 371 } … … 374 374 m_animations = graphicsLayer->m_animations; 375 375 376 m_state.maskLayer = toTextureMapper Node(graphicsLayer->maskLayer());377 m_state.replicaLayer = toTextureMapper Node(graphicsLayer->replicaLayer());376 m_state.maskLayer = toTextureMapperLayer(graphicsLayer->maskLayer()); 377 m_state.replicaLayer = toTextureMapperLayer(graphicsLayer->replicaLayer()); 378 378 m_state.pos = graphicsLayer->position(); 379 379 m_state.anchorPoint = graphicsLayer->anchorPoint(); … … 401 401 } 402 402 403 bool TextureMapper Node::descendantsOrSelfHaveRunningAnimations() const403 bool TextureMapperLayer::descendantsOrSelfHaveRunningAnimations() const 404 404 { 405 405 if (m_animations.hasRunningAnimations()) … … 414 414 } 415 415 416 void TextureMapper Node::syncAnimations()416 void TextureMapperLayer::syncAnimations() 417 417 { 418 418 m_animations.apply(this); … … 423 423 } 424 424 425 void TextureMapper Node::syncAnimationsRecursively()425 void TextureMapperLayer::syncAnimationsRecursively() 426 426 { 427 427 syncAnimations(); … … 431 431 } 432 432 433 void TextureMapper Node::syncCompositingState(GraphicsLayerTextureMapper* graphicsLayer, TextureMapper* textureMapper, int options)433 void TextureMapperLayer::syncCompositingState(GraphicsLayerTextureMapper* graphicsLayer, TextureMapper* textureMapper, int options) 434 434 { 435 435 if (!textureMapper) … … 461 461 Vector<GraphicsLayer*> children = graphicsLayer->children(); 462 462 for (int i = children.size() - 1; i >= 0; --i) { 463 TextureMapper Node* node = toTextureMapperNode(children[i]);464 if (! node)463 TextureMapperLayer* layer = toTextureMapperLayer(children[i]); 464 if (!layer) 465 465 continue; 466 node->syncCompositingState(toGraphicsLayerTextureMapper(children[i]), textureMapper, options);466 layer->syncCompositingState(toGraphicsLayerTextureMapper(children[i]), textureMapper, options); 467 467 } 468 468 } else { -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h
r107786 r107787 18 18 */ 19 19 20 #ifndef TextureMapper Node_h21 #define TextureMapper Node_h20 #ifndef TextureMapperLayer_h 21 #define TextureMapperLayer_h 22 22 23 23 #include "FloatRect.h" … … 39 39 40 40 class TextureMapperPlatformLayer; 41 class TextureMapper Node;41 class TextureMapperLayer; 42 42 class GraphicsLayerTextureMapper; 43 43 … … 56 56 }; 57 57 58 class TextureMapper Node: public TextureMapperAnimationClient {58 class TextureMapperLayer : public TextureMapperAnimationClient { 59 59 60 60 public: … … 97 97 }; 98 98 99 TextureMapper Node()99 TextureMapperLayer() 100 100 : m_parent(0) 101 101 , m_effectTarget(0) … … 107 107 { } 108 108 109 virtual ~TextureMapper Node();109 virtual ~TextureMapperLayer(); 110 110 111 111 void syncCompositingState(GraphicsLayerTextureMapper*, int syncOptions = 0); … … 126 126 127 127 private: 128 TextureMapper Node* rootLayer();128 TextureMapperLayer* rootLayer(); 129 129 void computeTransformsRecursive(); 130 130 void computeOverlapsIfNeeded(); … … 136 136 void invalidateViewport(const FloatRect&); 137 137 void notifyChange(ChangeMask); 138 void syncCompositingStateSelf(GraphicsLayerTextureMapper* graphicsLayer, TextureMapper* textureMapper);138 void syncCompositingStateSelf(GraphicsLayerTextureMapper*, TextureMapper*); 139 139 140 140 static int compareGraphicsLayersZValue(const void* a, const void* b); 141 static void sortByZOrder(Vector<TextureMapper Node* >& array, int first, int last);141 static void sortByZOrder(Vector<TextureMapperLayer* >& array, int first, int last); 142 142 143 143 PassRefPtr<BitmapTexture> texture() { return m_backingStore ? m_backingStore->texture() : 0; } … … 160 160 } 161 161 162 Vector<TextureMapper Node*> m_children;163 TextureMapper Node* m_parent;164 TextureMapper Node* m_effectTarget;162 Vector<TextureMapperLayer*> m_children; 163 TextureMapperLayer* m_parent; 164 TextureMapperLayer* m_effectTarget; 165 165 RefPtr<TextureMapperBackingStore> m_backingStore; 166 166 TextureMapperPlatformLayer* m_contentsLayer; … … 181 181 FloatRect needsDisplayRect; 182 182 int descendantsWithContent; 183 TextureMapper Node* maskLayer;184 TextureMapper Node* replicaLayer;183 TextureMapperLayer* maskLayer; 184 TextureMapperLayer* replicaLayer; 185 185 bool preserves3D : 1; 186 186 bool masksToBounds : 1; … … 215 215 216 216 217 TextureMapper Node* toTextureMapperNode(GraphicsLayer*);217 TextureMapperLayer* toTextureMapperLayer(GraphicsLayer*); 218 218 219 219 } 220 #endif // TextureMapper Node_h220 #endif // TextureMapperLayer_h -
trunk/Source/WebKit/gtk/ChangeLog
r107682 r107787 1 2012-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 1 19 2012-02-11 Nikolas Zimmermann <nzimmermann@rim.com> 2 20 -
trunk/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContext.h
r106901 r107787 29 29 30 30 #if USE(TEXTURE_MAPPER_GL) 31 #include "TextureMapper Node.h"31 #include "TextureMapperLayer.h" 32 32 #include "WindowGLContext.h" 33 33 #endif … … 73 73 74 74 bool m_initialized; 75 WebCore::TextureMapper Node* m_rootTextureMapperNode;75 WebCore::TextureMapperLayer* m_rootTextureMapperLayer; 76 76 OwnPtr<WebCore::WindowGLContext> m_context; 77 77 OwnPtr<WebCore::TextureMapper> m_textureMapper; -
trunk/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp
r106901 r107787 29 29 #include "PlatformContextCairo.h" 30 30 #include "TextureMapperGL.h" 31 #include "TextureMapper Node.h"31 #include "TextureMapperLayer.h" 32 32 #include "webkitwebviewprivate.h" 33 33 #include <GL/gl.h> … … 44 44 , m_syncTimer(this, &AcceleratedCompositingContext::syncLayersTimeout) 45 45 , m_initialized(false) 46 , m_rootTextureMapper Node(0)46 , m_rootTextureMapperLayer(0) 47 47 { 48 48 } … … 70 70 bool AcceleratedCompositingContext::enabled() 71 71 { 72 return m_rootTextureMapper Node&& m_textureMapper;72 return m_rootTextureMapperLayer && m_textureMapper; 73 73 } 74 74 … … 91 91 92 92 m_textureMapper->beginPainting(); 93 m_rootTextureMapper Node->paint();93 m_rootTextureMapperLayer->paint(); 94 94 m_textureMapper->endPainting(); 95 95 … … 102 102 if (!graphicsLayer) { 103 103 m_rootGraphicsLayer.clear(); 104 m_rootTextureMapper Node= 0;104 m_rootTextureMapperLayer = 0; 105 105 return; 106 106 } 107 107 108 108 m_rootGraphicsLayer = GraphicsLayer::create(this); 109 m_rootTextureMapper Node = toTextureMapperNode(m_rootGraphicsLayer.get());109 m_rootTextureMapperLayer = toTextureMapperLayer(m_rootGraphicsLayer.get()); 110 110 m_rootGraphicsLayer->addChild(graphicsLayer); 111 111 m_rootGraphicsLayer->setDrawsContent(true); … … 128 128 129 129 m_textureMapper = TextureMapperGL::create(); 130 m_rootTextureMapper Node->setTextureMapper(m_textureMapper.get());130 m_rootTextureMapperLayer->setTextureMapper(m_textureMapper.get()); 131 131 m_rootGraphicsLayer->syncCompositingStateForThisLayerOnly(); 132 132 } … … 174 174 renderLayersToWindow(IntRect()); 175 175 176 if (toTextureMapper Node(m_rootGraphicsLayer.get())->descendantsOrSelfHaveRunningAnimations())176 if (toTextureMapperLayer(m_rootGraphicsLayer.get())->descendantsOrSelfHaveRunningAnimations()) 177 177 m_syncTimer.startOneShot(1.0 / 60.0); 178 178 } -
trunk/Source/WebKit/qt/Api/qwebframe.cpp
r106783 r107787 105 105 #if USE(TEXTURE_MAPPER) 106 106 #include "texmap/TextureMapper.h" 107 #include "texmap/TextureMapper Node.h"107 #include "texmap/TextureMapperLayer.h" 108 108 #endif 109 109 #include "wtf/HashMap.h" … … 332 332 void QWebFramePrivate::renderCompositedLayers(GraphicsContext* context, const IntRect& clip) 333 333 { 334 if (!rootTextureMapper Node|| !textureMapper)334 if (!rootTextureMapperLayer || !textureMapper) 335 335 return; 336 336 … … 346 346 transform.m31(), transform.m32(), 0, transform.m33() 347 347 ); 348 rootTextureMapper Node->setTransform(matrix);349 rootTextureMapper Node->setOpacity(painter->opacity());348 rootTextureMapperLayer->setTransform(matrix); 349 rootTextureMapperLayer->setOpacity(painter->opacity()); 350 350 textureMapper->beginPainting(); 351 351 textureMapper->beginClip(matrix, clip); 352 rootTextureMapper Node->paint();352 rootTextureMapperLayer->paint(); 353 353 textureMapper->endClip(); 354 354 textureMapper->endPainting(); -
trunk/Source/WebKit/qt/Api/qwebframe.h
r96345 r107787 61 61 class FrameLoaderClientQt; 62 62 class ChromeClientQt; 63 class TextureMapper NodeClientQt;63 class TextureMapperLayerClientQt; 64 64 } 65 65 class QWebFrameData; … … 235 235 friend class WebCore::FrameLoaderClientQt; 236 236 friend class WebCore::ChromeClientQt; 237 friend class WebCore::TextureMapper NodeClientQt;237 friend class WebCore::TextureMapperLayerClientQt; 238 238 QWebFramePrivate *d; 239 239 Q_PRIVATE_SLOT(d, void _q_orientationChanged()) -
trunk/Source/WebKit/qt/Api/qwebframe_p.h
r103232 r107787 50 50 class HTMLFrameOwnerElement; 51 51 class Scrollbar; 52 class TextureMapper Node;52 class TextureMapperLayer; 53 53 } 54 54 class QWebPage; … … 86 86 , marginHeight(-1) 87 87 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER) 88 , rootTextureMapper Node(0)88 , rootTextureMapperLayer(0) 89 89 #endif 90 90 {} … … 126 126 int marginHeight; 127 127 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER) 128 WebCore::TextureMapper Node* rootTextureMapperNode;128 WebCore::TextureMapperLayer* rootTextureMapperLayer; 129 129 OwnPtr<WebCore::TextureMapper> textureMapper; 130 130 #endif -
trunk/Source/WebKit/qt/ChangeLog
r107682 r107787 1 2012-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 1 33 2012-02-11 Nikolas Zimmermann <nzimmermann@rim.com> 2 34 -
trunk/Source/WebKit/qt/WebCoreSupport/PageClientQt.cpp
r106659 r107787 30 30 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER) 31 31 #include "TextureMapper.h" 32 #include "texmap/TextureMapper Node.h"32 #include "texmap/TextureMapperLayer.h" 33 33 #endif 34 34 … … 36 36 37 37 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER) 38 TextureMapper NodeClientQt::TextureMapperNodeClientQt(QWebFrame* frame, GraphicsLayer* layer)38 TextureMapperLayerClientQt::TextureMapperLayerClientQt(QWebFrame* frame, GraphicsLayer* layer) 39 39 : m_frame(frame) 40 40 , m_rootGraphicsLayer(GraphicsLayer::create(0)) 41 41 { 42 m_frame->d->rootTextureMapper Node = rootNode();42 m_frame->d->rootTextureMapperLayer = rootLayer(); 43 43 m_rootGraphicsLayer->addChild(layer); 44 44 m_rootGraphicsLayer->setDrawsContent(false); … … 47 47 } 48 48 49 void TextureMapper NodeClientQt::setTextureMapper(const PassOwnPtr<TextureMapper>& textureMapper)49 void TextureMapperLayerClientQt::setTextureMapper(const PassOwnPtr<TextureMapper>& textureMapper) 50 50 { 51 51 m_frame->d->textureMapper = textureMapper; 52 m_frame->d->rootTextureMapper Node->setTextureMapper(m_frame->d->textureMapper.get());53 } 54 55 TextureMapper NodeClientQt::~TextureMapperNodeClientQt()56 { 57 m_frame->d->rootTextureMapper Node= 0;58 } 59 60 void TextureMapper NodeClientQt::syncRootLayer()52 m_frame->d->rootTextureMapperLayer->setTextureMapper(m_frame->d->textureMapper.get()); 53 } 54 55 TextureMapperLayerClientQt::~TextureMapperLayerClientQt() 56 { 57 m_frame->d->rootTextureMapperLayer = 0; 58 } 59 60 void TextureMapperLayerClientQt::syncRootLayer() 61 61 { 62 62 m_rootGraphicsLayer->syncCompositingStateForThisLayerOnly(); 63 63 } 64 64 65 TextureMapper Node* TextureMapperNodeClientQt::rootNode()66 { 67 return toTextureMapper Node(m_rootGraphicsLayer.get());65 TextureMapperLayer* TextureMapperLayerClientQt::rootLayer() 66 { 67 return toTextureMapperLayer(m_rootGraphicsLayer.get()); 68 68 } 69 69 … … 72 72 { 73 73 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(); 80 80 } 81 81 … … 89 89 void PageClientQWidget::syncLayers(Timer<PageClientQWidget>*) 90 90 { 91 if ( textureMapperNodeClient)92 textureMapperNodeClient->syncRootLayer();91 if (TextureMapperLayerClient) 92 TextureMapperLayerClient->syncRootLayer(); 93 93 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()) 97 97 syncTimer.startOneShot(1.0 / 60.0); 98 98 update(view->rect()); … … 240 240 { 241 241 #if USE(TEXTURE_MAPPER) 242 if ( textureMapperNodeClient)243 textureMapperNodeClient->syncRootLayer();242 if (TextureMapperLayerClient) 243 TextureMapperLayerClient->syncRootLayer(); 244 244 #endif 245 245 … … 247 247 248 248 #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()) 253 253 syncTimer.startOneShot(1.0 / 60.0); 254 254 update(view->boundingRect().toAlignedRect()); … … 260 260 { 261 261 if (layer) { 262 textureMapperNodeClient = adoptPtr(new TextureMapperNodeClientQt(page->mainFrame(), layer));262 TextureMapperLayerClient = adoptPtr(new TextureMapperLayerClientQt(page->mainFrame(), layer)); 263 263 #if USE(TEXTURE_MAPPER_GL) 264 264 QGraphicsView* graphicsView = view->scene()->views()[0]; 265 265 if (graphicsView && graphicsView->viewport() && graphicsView->viewport()->inherits("QGLWidget")) { 266 textureMapperNodeClient->setTextureMapper(TextureMapper::create(TextureMapper::OpenGLMode));266 TextureMapperLayerClient->setTextureMapper(TextureMapper::create(TextureMapper::OpenGLMode)); 267 267 return; 268 268 } 269 269 #endif 270 textureMapperNodeClient->setTextureMapper(TextureMapper::create());271 return; 272 } 273 textureMapperNodeClient.clear();270 TextureMapperLayerClient->setTextureMapper(TextureMapper::create()); 271 return; 272 } 273 TextureMapperLayerClient.clear(); 274 274 } 275 275 #else -
trunk/Source/WebKit/qt/WebCoreSupport/PageClientQt.h
r100410 r107787 45 45 46 46 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER) 47 class TextureMapper NodeClientQt {47 class TextureMapperLayerClientQt { 48 48 public: 49 TextureMapper NodeClientQt(QWebFrame*, GraphicsLayer*);50 virtual ~TextureMapper NodeClientQt();49 TextureMapperLayerClientQt(QWebFrame*, GraphicsLayer*); 50 virtual ~TextureMapperLayerClientQt(); 51 51 void setTextureMapper(const PassOwnPtr<TextureMapper>&); 52 52 void syncRootLayer(); 53 TextureMapper Node* rootNode();53 TextureMapperLayer* rootLayer(); 54 54 55 55 private: … … 115 115 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER) 116 116 Timer<PageClientQWidget> syncTimer; 117 OwnPtr<TextureMapper NodeClientQt> textureMapperNodeClient;117 OwnPtr<TextureMapperLayerClientQt> TextureMapperLayerClient; 118 118 #endif 119 119 }; … … 224 224 #if USE(ACCELERATED_COMPOSITING) 225 225 #if USE(TEXTURE_MAPPER) 226 OwnPtr<TextureMapper NodeClientQt> textureMapperNodeClient;226 OwnPtr<TextureMapperLayerClientQt> TextureMapperLayerClient; 227 227 #else 228 228 QWeakPointer<QGraphicsObject> rootGraphicsLayer; -
trunk/Source/WebKit2/ChangeLog
r107758 r107787 1 2012-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 1 18 2012-02-14 Anders Carlsson <andersca@apple.com> 2 19 -
trunk/Source/WebKit2/UIProcess/qt/LayerTreeHostProxyQt.cpp
r107707 r107787 31 31 #include "TextureMapper.h" 32 32 #include "TextureMapperBackingStore.h" 33 #include "TextureMapper Node.h"33 #include "TextureMapperLayer.h" 34 34 #include "UpdateInfo.h" 35 35 #include "WebCoreArgumentCoders.h" … … 150 150 { 151 151 GraphicsLayer* newLayer = new GraphicsLayerTextureMapper(this); 152 TextureMapper Node* node = toTextureMapperNode(newLayer);153 node->setShouldUpdateBackingStoreFromLayer(false);152 TextureMapperLayer* layer = toTextureMapperLayer(newLayer); 153 layer->setShouldUpdateBackingStoreFromLayer(false); 154 154 return adoptPtr(newLayer); 155 155 } … … 179 179 return; 180 180 181 TextureMapper Node* 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()); 187 187 m_textureMapper->beginPainting(); 188 188 m_textureMapper->bindSurface(0); … … 195 195 } 196 196 197 node->paint();197 layer->paint(); 198 198 m_textureMapper->endClip(); 199 199 m_textureMapper->endPainting(); 200 200 201 if ( node->descendantsOrSelfHaveRunningAnimations()) {202 node->syncAnimationsRecursively();201 if (layer->descendantsOrSelfHaveRunningAnimations()) { 202 layer->syncAnimationsRecursively(); 203 203 m_viewportUpdateTimer.startOneShot(0); 204 204 } … … 211 211 ASSERT(m_textureMapper->accelerationMode() == TextureMapper::SoftwareMode); 212 212 syncRemoteContent(); 213 TextureMapper Node* node = toTextureMapperNode(rootLayer());214 215 if (! node)213 TextureMapperLayer* layer = toTextureMapperLayer(rootLayer()); 214 215 if (!layer) 216 216 return; 217 217 … … 220 220 m_textureMapper->beginPainting(); 221 221 m_textureMapper->bindSurface(0); 222 node->paint();222 layer->paint(); 223 223 m_textureMapper->endPainting(); 224 224 m_textureMapper->setGraphicsContext(0); … … 344 344 { 345 345 ensureLayer(id); 346 TextureMapper Node* 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()); 348 348 if (!backingStore) { 349 349 backingStore = LayerBackingStore::create(); 350 node->setBackingStore(backingStore.get());350 layer->setBackingStore(backingStore.get()); 351 351 } 352 352 ASSERT(backingStore); … … 421 421 if (!m_textureMapper) 422 422 m_textureMapper = TextureMapper::create(TextureMapper::OpenGLMode); 423 toTextureMapper Node(m_rootLayer.get())->setTextureMapper(m_textureMapper.get());423 toTextureMapperLayer(m_rootLayer.get())->setTextureMapper(m_textureMapper.get()); 424 424 } 425 425 … … 578 578 void LayerTreeHostProxy::purgeGLResources() 579 579 { 580 TextureMapper Node* node = toTextureMapperNode(rootLayer());581 582 if ( node)583 node->clearBackingStoresRecursive();580 TextureMapperLayer* layer = toTextureMapperLayer(rootLayer()); 581 582 if (layer) 583 layer->clearBackingStoresRecursive(); 584 584 585 585 m_directlyCompositedImages.clear();
Note: See TracChangeset
for help on using the changeset viewer.