Changeset 148742 in webkit
- Timestamp:
- Apr 19, 2013 6:51:10 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r148731 r148742 1 2013-04-19 ChangSeok Oh <changseok.oh@collabora.com> 2 3 [GTK][AC] Support masksToBounds for clutter AC backend. 4 https://bugs.webkit.org/show_bug.cgi?id=114113 5 6 Reviewed by Gustavo Noronha Silva. 7 8 We can support the masksToBounds property by using clutter_actor_set_clip simply. 9 10 Covered by existing AC tests. 11 12 * platform/graphics/clutter/GraphicsLayerActor.cpp: 13 (graphicsLayerActorSetMasksToBounds): 14 * platform/graphics/clutter/GraphicsLayerActor.h: 15 * platform/graphics/clutter/GraphicsLayerClutter.cpp: 16 (WebCore::GraphicsLayerClutter::setMasksToBounds): 17 (WebCore): 18 (WebCore::GraphicsLayerClutter::commitLayerChangesBeforeSublayers): 19 (WebCore::GraphicsLayerClutter::setupContentsLayer): 20 (WebCore::GraphicsLayerClutter::updateMasksToBounds): 21 * platform/graphics/clutter/GraphicsLayerClutter.h: 22 (GraphicsLayerClutter): 23 1 24 2013-04-19 Dan Beam <dbeam@chromium.org> 2 25 -
trunk/Source/WebCore/platform/graphics/clutter/GraphicsLayerActor.cpp
r148202 r148742 525 525 } 526 526 527 void graphicsLayerActorSetMasksToBounds(GraphicsLayerActor* layer, bool masksToBounds) 528 { 529 ClutterActor* actor = CLUTTER_ACTOR(layer); 530 if (masksToBounds) 531 clutter_actor_set_clip(actor, 0, 0, clutter_actor_get_width(actor), clutter_actor_get_height(actor)); 532 else 533 clutter_actor_remove_clip(actor); 534 } 535 527 536 WebCore::PlatformClutterAnimation* graphicsLayerActorGetAnimationForKey(GraphicsLayerActor* layer, const String key) 528 537 { -
trunk/Source/WebCore/platform/graphics/clutter/GraphicsLayerActor.h
r147443 r148742 98 98 void graphicsLayerActorSetDrawsContent(GraphicsLayerActor*, bool drawsContent); 99 99 void graphicsLayerActorSetFlatten(GraphicsLayerActor*, bool flatten); 100 void graphicsLayerActorSetMasksToBounds(GraphicsLayerActor*, bool masksToBounds); 100 101 101 102 WebCore::PlatformClutterAnimation* graphicsLayerActorGetAnimationForKey(GraphicsLayerActor*, const String); -
trunk/Source/WebCore/platform/graphics/clutter/GraphicsLayerClutter.cpp
r148232 r148742 445 445 } 446 446 447 void GraphicsLayerClutter::setMasksToBounds(bool masksToBounds) 448 { 449 if (masksToBounds == m_masksToBounds) 450 return; 451 452 GraphicsLayer::setMasksToBounds(masksToBounds); 453 noteLayerPropertyChanged(MasksToBoundsChanged); 454 } 455 447 456 void GraphicsLayerClutter::setDrawsContent(bool drawsContent) 448 457 { … … 737 746 updateTransform(); 738 747 748 if (m_uncommittedChanges & MasksToBoundsChanged) 749 updateMasksToBounds(); 750 739 751 if (m_uncommittedChanges & OpacityChanged) 740 752 updateOpacityOnLayer(); … … 761 773 void GraphicsLayerClutter::setupContentsLayer(GraphicsLayerActor* contentsLayer) 762 774 { 775 graphicsLayerActorSetMasksToBounds(contentsLayer, true); 763 776 graphicsLayerActorSetAnchorPoint(contentsLayer, 0.0, 0.0, 0.0); 764 777 } … … 859 872 CoglMatrix matrix = m_transform; 860 873 clutter_actor_set_transform(CLUTTER_ACTOR(primaryLayer()), &matrix); 874 } 875 876 void GraphicsLayerClutter::updateMasksToBounds() 877 { 878 graphicsLayerActorSetMasksToBounds(m_layer.get(), m_masksToBounds); 861 879 } 862 880 -
trunk/Source/WebCore/platform/graphics/clutter/GraphicsLayerClutter.h
r148232 r148742 64 64 virtual void addChildAbove(GraphicsLayer*, GraphicsLayer* sibling); 65 65 virtual void addChildBelow(GraphicsLayer*, GraphicsLayer* sibling); 66 66 67 virtual void removeFromParent(); 68 67 69 virtual bool replaceChild(GraphicsLayer* oldChild, GraphicsLayer* newChild); 68 70 virtual bool setChildren(const Vector<GraphicsLayer*>&); … … 87 89 88 90 virtual void setPreserves3D(bool); 91 virtual void setMasksToBounds(bool); 89 92 90 93 virtual bool addAnimation(const KeyframeValueList&, const IntSize& boxSize, const Animation*, const String& animationName, double timeOffset); … … 191 194 void updateGeometry(float pixelAlignmentScale, const FloatPoint& positionRelativeToBase); 192 195 void updateTransform(); 196 void updateMasksToBounds(); 193 197 void updateLayerDrawsContent(float pixelAlignmentScale, const FloatPoint& positionRelativeToBase); 194 198 void updateContentsImage();
Note: See TracChangeset
for help on using the changeset viewer.