Changeset 137326 in webkit
- Timestamp:
- Dec 11, 2012 9:34:15 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/clutter/GraphicsLayerClutter.cpp (modified) (3 diffs)
-
platform/graphics/clutter/GraphicsLayerClutter.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r137324 r137326 1 2012-12-11 Joone Hur <joone.hur@intel.com>, Gustavo Noronha Silva <gustavo.noronha@collabora.com> 2 3 [GTK] Update GraphicsLayerClutter 4 https://bugs.webkit.org/show_bug.cgi?id=92045 5 6 Reviewed by Gustavo Noronha Silva. 7 8 Add more methods to GraphicsLayerClutter in order to run CSS 3D transforms 9 by using GraphicsLayerActor. 10 11 No new tests. This will be covered by pixel tests for Qt and GTK+ accelerated 12 compositing and 3D transforms. 13 14 * platform/graphics/clutter/GraphicsLayerClutter.cpp: 15 (WebCore): 16 (WebCore::GraphicsLayerClutter::GraphicsLayerClutter): 17 (WebCore::idleDestroy): 18 (WebCore::GraphicsLayerClutter::~GraphicsLayerClutter): 19 (WebCore::GraphicsLayerClutter::setName): 20 (WebCore::GraphicsLayerClutter::platformLayer): Returns the platform layer(ClutterAcotr). 21 (WebCore::GraphicsLayerClutter::setNeedsDisplay): Update the display. 22 (WebCore::GraphicsLayerClutter::setNeedsDisplayInRect): Update part of the Display. 23 (WebCore::GraphicsLayerClutter::setAnchorPoint): 24 (WebCore::GraphicsLayerClutter::setPosition): 25 (WebCore::GraphicsLayerClutter::setSize): 26 (WebCore::GraphicsLayerClutter::setTransform): 27 (WebCore::GraphicsLayerClutter::setDrawsContent): 28 (WebCore::GraphicsLayerClutter::setParent): 29 (WebCore::GraphicsLayerClutter::setChildren): 30 (WebCore::GraphicsLayerClutter::addChild): 31 (WebCore::GraphicsLayerClutter::addChildAtIndex): 32 (WebCore::GraphicsLayerClutter::addChildBelow): 33 (WebCore::GraphicsLayerClutter::addChildAbove): 34 (WebCore::GraphicsLayerClutter::replaceChild): 35 (WebCore::GraphicsLayerClutter::removeFromParent): 36 (WebCore::GraphicsLayerClutter::platformClutterLayerPaintContents): 37 (WebCore::GraphicsLayerClutter::platformClutterLayerAnimationStarted): 38 (WebCore::GraphicsLayerClutter::repaintLayerDirtyRects): 39 (WebCore::GraphicsLayerClutter::computePositionRelativeToBase): 40 (WebCore::GraphicsLayerClutter::flushCompositingState): Synchronize the corresponding Actors with the current 41 compositing states of this GraphicsLayer and its child layers. 42 (WebCore::GraphicsLayerClutter::recursiveCommitChanges): 43 (WebCore::GraphicsLayerClutter::flushCompositingStateForThisLayerOnly): Commit batched changes non-recursively. 44 (WebCore::GraphicsLayerClutter::commitLayerChangesAfterSublayers): Reset layer changes after we recurse on children. 45 (WebCore::GraphicsLayerClutter::noteSublayersChanged): 46 (WebCore::GraphicsLayerClutter::noteLayerPropertyChanged): 47 (WebCore::GraphicsLayerClutter::commitLayerChangesBeforeSublayers): Commit layer changes before we recurse on children. 48 (WebCore::GraphicsLayerClutter::updateGeometry): Updated the position and size of the Actor. 49 (WebCore::GraphicsLayerClutter::updateSublayerList): Updated the list of child Actors. 50 (WebCore::GraphicsLayerClutter::updateLayerNames): 51 (WebCore::GraphicsLayerClutter::updateTransform): 52 (WebCore::GraphicsLayerClutter::updateLayerDrawsContent): 53 (WebCore::GraphicsLayerClutter::layerForSuperlayer): 54 * platform/graphics/clutter/GraphicsLayerClutter.h: 55 (WebCore): 56 (WebCore::GraphicsLayerClutter::primaryLayer): 57 (GraphicsLayerClutter): 58 1 59 2012-12-11 Jessie Berlin <jberlin@apple.com> 2 60 -
trunk/Source/WebCore/platform/graphics/clutter/GraphicsLayerClutter.cpp
r137097 r137326 1 1 /* 2 2 * Copyright (C) 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Collabora Ltd. 3 * Copyright (C) 2011, 2012 Collabora Ltd. 4 * Copyright (C) 2012 Intel Corporation. All rights reserved. 4 5 * 5 6 * Redistribution and use in source and binary forms, with or without … … 31 32 32 33 #include "FloatRect.h" 34 #include "GraphicsLayerActor.h" 33 35 #include "GraphicsLayerFactory.h" 34 36 #include "NotImplemented.h" 37 #include "RefPtrCairo.h" 38 #include "TransformState.h" 39 #include <wtf/text/CString.h> 40 #include <wtf/text/WTFString.h> 35 41 36 42 namespace WebCore { 37 43 44 // This is the hook for WebCore compositor to know that the webKit clutter port implements 45 // compositing with GraphicsLayerClutter. 38 46 PassOwnPtr<GraphicsLayer> GraphicsLayer::create(GraphicsLayerFactory* factory, GraphicsLayerClient* client) 39 47 { … … 51 59 GraphicsLayerClutter::GraphicsLayerClutter(GraphicsLayerClient* client) 52 60 : GraphicsLayer(client) 61 , m_uncommittedChanges(0) 53 62 { 54 63 // ClutterRectangle will be used to show the debug border. 55 m_layer = adoptGRef(clutter_rectangle_new()); 64 m_layer = graphicsLayerActorNewWithClient(LayerTypeWebLayer, this); 65 } 66 67 static gboolean idleDestroy(gpointer data) 68 { 69 GRefPtr<ClutterActor> actor = adoptGRef(CLUTTER_ACTOR(data)); 70 ClutterActor* parent = clutter_actor_get_parent(actor.get()); 71 72 // We should remove child actors manually because the container of Clutter 73 // seems to have a bug to remove its child actors when it is removed. 74 if (GRAPHICS_LAYER_IS_ACTOR(GRAPHICS_LAYER_ACTOR(actor.get()))) 75 graphicsLayerActorRemoveAll(GRAPHICS_LAYER_ACTOR(actor.get())); 76 77 if (parent) 78 clutter_container_remove_actor(CLUTTER_CONTAINER(parent), actor.get()); 79 80 // FIXME: we should assert that the actor's ref count is 1 here, but some 81 // of them are getting here with 2! 82 // ASSERT((G_OBJECT(actor.get()))->ref_count == 1); 83 84 return FALSE; 56 85 } 57 86 58 87 GraphicsLayerClutter::~GraphicsLayerClutter() 59 88 { 60 willBeDestroyed(); 89 if (graphicsLayerActorGetLayerType(m_layer.get()) == GraphicsLayerClutter::LayerTypeRootLayer) 90 return; 91 92 // We destroy the actors on an idle so that the main loop can run enough to 93 // repaint the background that will replace the actor. 94 if (m_layer) { 95 graphicsLayerActorSetClient(m_layer.get(), 0); 96 g_idle_add(idleDestroy, m_layer.leakRef()); 97 } 98 } 99 100 void GraphicsLayerClutter::setName(const String& name) 101 { 102 String longName = String::format("Actor(%p) GraphicsLayer(%p) ", m_layer.get(), this) + name; 103 GraphicsLayer::setName(longName); 104 noteLayerPropertyChanged(NameChanged); 61 105 } 62 106 63 107 ClutterActor* GraphicsLayerClutter::platformLayer() const 64 108 { 109 return CLUTTER_ACTOR(m_layer.get()); 110 } 111 112 void GraphicsLayerClutter::setNeedsDisplay() 113 { 114 FloatRect hugeRect(FloatPoint(), m_size); 115 setNeedsDisplayInRect(hugeRect); 116 } 117 118 void GraphicsLayerClutter::setNeedsDisplayInRect(const FloatRect& r) 119 { 120 if (!drawsContent()) 121 return; 122 123 FloatRect rect(r); 124 FloatRect layerBounds(FloatPoint(), m_size); 125 rect.intersect(layerBounds); 126 if (rect.isEmpty()) 127 return; 128 129 const size_t maxDirtyRects = 32; 130 131 for (size_t i = 0; i < m_dirtyRects.size(); ++i) { 132 if (m_dirtyRects[i].contains(rect)) 133 return; 134 } 135 136 if (m_dirtyRects.size() < maxDirtyRects) 137 m_dirtyRects.append(rect); 138 else 139 m_dirtyRects[0].unite(rect); 140 141 noteLayerPropertyChanged(DirtyRectsChanged); 142 } 143 144 void GraphicsLayerClutter::setAnchorPoint(const FloatPoint3D& point) 145 { 146 if (point == m_anchorPoint) 147 return; 148 149 GraphicsLayer::setAnchorPoint(point); 150 noteLayerPropertyChanged(GeometryChanged); 151 } 152 153 void GraphicsLayerClutter::setPosition(const FloatPoint& point) 154 { 155 if (point == m_position) 156 return; 157 158 GraphicsLayer::setPosition(point); 159 noteLayerPropertyChanged(GeometryChanged); 160 } 161 162 void GraphicsLayerClutter::setSize(const FloatSize& size) 163 { 164 if (size == m_size) 165 return; 166 167 GraphicsLayer::setSize(size); 168 noteLayerPropertyChanged(GeometryChanged); 169 } 170 void GraphicsLayerClutter::setTransform(const TransformationMatrix& t) 171 { 172 if (t == m_transform) 173 return; 174 175 GraphicsLayer::setTransform(t); 176 noteLayerPropertyChanged(TransformChanged); 177 } 178 179 void GraphicsLayerClutter::setDrawsContent(bool drawsContent) 180 { 181 if (drawsContent == m_drawsContent) 182 return; 183 184 GraphicsLayer::setDrawsContent(drawsContent); 185 noteLayerPropertyChanged(DrawsContentChanged); 186 } 187 188 void GraphicsLayerClutter::setParent(GraphicsLayer* childLayer) 189 { 190 notImplemented(); 191 192 GraphicsLayer::setParent(childLayer); 193 } 194 195 bool GraphicsLayerClutter::setChildren(const Vector<GraphicsLayer*>& children) 196 { 197 bool childrenChanged = GraphicsLayer::setChildren(children); 198 if (childrenChanged) 199 noteSublayersChanged(); 200 201 return childrenChanged; 202 } 203 204 void GraphicsLayerClutter::addChild(GraphicsLayer* childLayer) 205 { 206 GraphicsLayer::addChild(childLayer); 207 noteSublayersChanged(); 208 } 209 210 void GraphicsLayerClutter::addChildAtIndex(GraphicsLayer* childLayer, int index) 211 { 212 GraphicsLayer::addChildAtIndex(childLayer, index); 213 noteSublayersChanged(); 214 } 215 216 void GraphicsLayerClutter::addChildBelow(GraphicsLayer* childLayer, GraphicsLayer* sibling) 217 { 218 GraphicsLayer::addChildBelow(childLayer, sibling); 219 noteSublayersChanged(); 220 } 221 222 void GraphicsLayerClutter::addChildAbove(GraphicsLayer* childLayer, GraphicsLayer* sibling) 223 { 224 GraphicsLayer::addChildAbove(childLayer, sibling); 225 noteSublayersChanged(); 226 } 227 228 bool GraphicsLayerClutter::replaceChild(GraphicsLayer* oldChild, GraphicsLayer* newChild) 229 { 230 if (GraphicsLayer::replaceChild(oldChild, newChild)) { 231 noteSublayersChanged(); 232 return true; 233 } 234 return false; 235 } 236 237 void GraphicsLayerClutter::removeFromParent() 238 { 239 if (m_parent) 240 static_cast<GraphicsLayerClutter*>(m_parent)->noteSublayersChanged(); 241 GraphicsLayer::removeFromParent(); 242 } 243 244 void GraphicsLayerClutter::platformClutterLayerPaintContents(GraphicsContext& context, const IntRect& clip) 245 { 246 paintGraphicsLayerContents(context, clip); 247 } 248 249 void GraphicsLayerClutter::platformClutterLayerAnimationStarted(double startTime) 250 { 251 if (m_client) 252 m_client->notifyAnimationStarted(this, startTime); 253 } 254 255 void GraphicsLayerClutter::repaintLayerDirtyRects() 256 { 257 if (!m_dirtyRects.size()) 258 return; 259 260 for (size_t i = 0; i < m_dirtyRects.size(); ++i) 261 graphicsLayerActorInvalidateRectangle(m_layer.get(), m_dirtyRects[i]); 262 263 m_dirtyRects.clear(); 264 } 265 266 FloatPoint GraphicsLayerClutter::computePositionRelativeToBase(float& pageScale) const 267 { 268 pageScale = 1; 269 270 FloatPoint offset; 271 for (const GraphicsLayer* currLayer = this; currLayer; currLayer = currLayer->parent()) { 272 if (currLayer->appliesPageScale()) { 273 if (currLayer->client()) 274 pageScale = currLayer->pageScaleFactor(); 275 return offset; 276 } 277 278 offset += currLayer->position(); 279 } 280 281 return FloatPoint(); 282 } 283 284 // called from void RenderLayerCompositor::flushPendingLayerChanges 285 void GraphicsLayerClutter::flushCompositingState(const FloatRect& clipRect) 286 { 287 TransformState state(TransformState::UnapplyInverseTransformDirection, FloatQuad(clipRect)); 288 recursiveCommitChanges(state); 289 } 290 291 void GraphicsLayerClutter::recursiveCommitChanges(const TransformState& state, float pageScaleFactor, const FloatPoint& positionRelativeToBase, bool affectedByPageScale) 292 { 293 // FIXME: Save the state before sending down to kids and restore it after 294 TransformState localState = state; 295 296 if (appliesPageScale()) { 297 pageScaleFactor = this->pageScaleFactor(); 298 affectedByPageScale = true; 299 } 300 301 // Accumulate an offset from the ancestral pixel-aligned layer. 302 FloatPoint baseRelativePosition = positionRelativeToBase; 303 if (affectedByPageScale) 304 baseRelativePosition += m_position; 305 306 commitLayerChangesBeforeSublayers(pageScaleFactor, baseRelativePosition); 307 308 const Vector<GraphicsLayer*>& childLayers = children(); 309 size_t numChildren = childLayers.size(); 310 311 for (size_t i = 0; i < numChildren; ++i) { 312 GraphicsLayerClutter* curChild = static_cast<GraphicsLayerClutter*>(childLayers[i]); 313 curChild->recursiveCommitChanges(localState, pageScaleFactor, baseRelativePosition, affectedByPageScale); 314 } 315 316 commitLayerChangesAfterSublayers(); 317 } 318 319 void GraphicsLayerClutter::flushCompositingStateForThisLayerOnly() 320 { 321 float pageScaleFactor; 322 FloatPoint offset = computePositionRelativeToBase(pageScaleFactor); 323 commitLayerChangesBeforeSublayers(pageScaleFactor, offset); 324 commitLayerChangesAfterSublayers(); 325 } 326 327 void GraphicsLayerClutter::commitLayerChangesAfterSublayers() 328 { 329 if (!m_uncommittedChanges) 330 return; 331 332 m_uncommittedChanges = NoChange; 333 } 334 void GraphicsLayerClutter::noteSublayersChanged() 335 { 336 noteLayerPropertyChanged(ChildrenChanged); 337 } 338 339 void GraphicsLayerClutter::noteLayerPropertyChanged(LayerChangeFlags flags) 340 { 341 if (!m_uncommittedChanges && m_client) 342 m_client->notifyFlushRequired(this); // call RenderLayerBacking::notifyFlushRequired 343 344 m_uncommittedChanges |= flags; 345 } 346 347 void GraphicsLayerClutter::commitLayerChangesBeforeSublayers(float pageScaleFactor, const FloatPoint& positionRelativeToBase) 348 { 349 if (!m_uncommittedChanges) 350 return; 351 352 if (m_uncommittedChanges & NameChanged) 353 updateLayerNames(); 354 355 if (m_uncommittedChanges & ChildrenChanged) 356 updateSublayerList(); 357 358 if (m_uncommittedChanges & GeometryChanged) 359 updateGeometry(pageScaleFactor, positionRelativeToBase); 360 361 if (m_uncommittedChanges & TransformChanged) 362 updateTransform(); 363 364 if (m_uncommittedChanges & DrawsContentChanged) 365 updateLayerDrawsContent(pageScaleFactor, positionRelativeToBase); 366 367 if (m_uncommittedChanges & DirtyRectsChanged) 368 repaintLayerDirtyRects(); 369 } 370 371 void GraphicsLayerClutter::updateGeometry(float pageScaleFactor, const FloatPoint& positionRelativeToBase) 372 { 373 FloatPoint scaledPosition; 374 FloatPoint3D scaledAnchorPoint; 375 FloatSize scaledSize; 376 377 // FIXME: Need to support scaling 378 scaledPosition = m_position; 379 scaledAnchorPoint = m_anchorPoint; 380 scaledSize = m_size; 381 382 FloatRect adjustedBounds(m_boundsOrigin , scaledSize); 383 FloatPoint adjustedPosition(scaledPosition.x() + scaledAnchorPoint.x() * scaledSize.width(), scaledPosition.y() + scaledAnchorPoint.y() * scaledSize.height()); 384 385 clutter_actor_set_size(CLUTTER_ACTOR(m_layer.get()), adjustedBounds.width(), adjustedBounds.height()); 386 clutter_actor_set_position(CLUTTER_ACTOR(m_layer.get()), adjustedPosition.x(), adjustedPosition.y()); 387 graphicsLayerActorSetAnchorPoint(m_layer.get(), scaledAnchorPoint.x(), scaledAnchorPoint.y(), scaledAnchorPoint.z()); 388 } 389 390 // Each GraphicsLayer has the corresponding layer in the platform port. 391 // So whenever the list of child layer changes, the list of GraphicsLayerActor should be updated accordingly. 392 void GraphicsLayerClutter::updateSublayerList() 393 { 394 GraphicsLayerActorList newSublayers; 395 const Vector<GraphicsLayer*>& childLayers = children(); 396 397 if (childLayers.size() > 0) { 398 size_t numChildren = childLayers.size(); 399 for (size_t i = 0; i < numChildren; ++i) { 400 GraphicsLayerClutter* curChild = static_cast<GraphicsLayerClutter*>(childLayers[i]); 401 GraphicsLayerActor* childLayer = curChild->layerForSuperlayer(); 402 g_assert(GRAPHICS_LAYER_IS_ACTOR(childLayer)); 403 newSublayers.append(childLayer); 404 } 405 406 for (size_t i = 0; i < newSublayers.size(); i++) { 407 ClutterActor* layerActor = CLUTTER_ACTOR(newSublayers[i].get()); 408 ClutterActor* parentActor = clutter_actor_get_parent(layerActor); 409 if (parentActor) 410 clutter_container_remove_actor(CLUTTER_CONTAINER(parentActor), layerActor); 411 } 412 } 413 414 graphicsLayerActorSetSublayers(m_layer.get(), newSublayers); 415 } 416 417 void GraphicsLayerClutter::updateLayerNames() 418 { 419 clutter_actor_set_name(CLUTTER_ACTOR(m_layer.get()), name().utf8().data()); 420 } 421 422 void GraphicsLayerClutter::updateTransform() 423 { 424 CoglMatrix matrix = m_transform; 425 graphicsLayerActorSetTransform(primaryLayer(), &matrix); 426 } 427 428 void GraphicsLayerClutter::updateLayerDrawsContent(float pageScaleFactor, const FloatPoint& positionRelativeToBase) 429 { 430 if (m_drawsContent) { 431 graphicsLayerActorSetDrawsContent(m_layer.get(), TRUE); 432 setNeedsDisplay(); 433 } else { 434 graphicsLayerActorSetDrawsContent(m_layer.get(), FALSE); 435 graphicsLayerActorSetSurface(m_layer.get(), 0); 436 } 437 438 updateDebugIndicators(); 439 } 440 441 GraphicsLayerActor* GraphicsLayerClutter::layerForSuperlayer() const 442 { 65 443 return m_layer.get(); 66 444 } 67 68 void GraphicsLayerClutter::setNeedsDisplay()69 {70 notImplemented();71 addRepaintRect(FloatRect(FloatPoint(), m_size));72 }73 74 void GraphicsLayerClutter::setNeedsDisplayInRect(const FloatRect& rect)75 {76 notImplemented();77 addRepaintRect(rect);78 }79 80 445 } // namespace WebCore 81 446 -
trunk/Source/WebCore/platform/graphics/clutter/GraphicsLayerClutter.h
r129387 r137326 1 1 /* 2 2 * Copyright (C) 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Collabora Ltd. 3 * Copyright (C) 2011, 2012 Collabora Ltd. 4 * Copyright (C) 2012 Intel Corporation. All rights reserved. 4 5 * 5 6 * Redistribution and use in source and binary forms, with or without … … 31 32 32 33 #include "GraphicsLayer.h" 34 #include "GraphicsLayerClient.h" 35 #include "Image.h" 36 #include "ImageSource.h" 37 #include "PlatformClutterLayerClient.h" 38 #include <wtf/HashMap.h> 39 #include <wtf/HashSet.h> 40 #include <wtf/text/StringHash.h> 33 41 34 42 #include <clutter/clutter.h> 35 43 #include <wtf/gobject/GRefPtr.h> 36 44 45 typedef struct _GraphicsLayerActor GraphicsLayerActor; 46 37 47 namespace WebCore { 38 48 39 class GraphicsLayerClutter : public GraphicsLayer { 49 class TransformState; 50 51 typedef Vector<GRefPtr<GraphicsLayerActor> > GraphicsLayerActorList; 52 53 class GraphicsLayerClutter : public GraphicsLayer, public PlatformClutterLayerClient { 40 54 public: 55 enum LayerType { LayerTypeLayer, LayerTypeWebLayer, LayerTypeVideoLayer, LayerTypeTransformLayer, LayerTypeRootLayer, LayerTypeCustom }; 56 41 57 GraphicsLayerClutter(GraphicsLayerClient*); 42 58 virtual ~GraphicsLayerClutter(); 43 59 44 60 virtual ClutterActor* platformLayer() const; 61 virtual void addChild(GraphicsLayer*); 62 virtual void addChildAtIndex(GraphicsLayer*, int index); 63 virtual void addChildAbove(GraphicsLayer*, GraphicsLayer* sibling); 64 virtual void addChildBelow(GraphicsLayer*, GraphicsLayer* sibling); 65 virtual void removeFromParent(); 66 virtual bool replaceChild(GraphicsLayer* oldChild, GraphicsLayer* newChild); 67 virtual bool setChildren(const Vector<GraphicsLayer*>&); 68 virtual void setParent(GraphicsLayer*); 69 70 virtual void setDrawsContent(bool); 71 virtual void setAnchorPoint(const FloatPoint3D&); 72 virtual void setPosition(const FloatPoint&); 73 virtual void setSize(const FloatSize&); 74 75 virtual void setTransform(const TransformationMatrix&); 76 virtual void setName(const String&); 45 77 virtual void setNeedsDisplay(); 46 78 virtual void setNeedsDisplayInRect(const FloatRect&); 47 79 80 virtual void flushCompositingState(const FloatRect&); 81 virtual void flushCompositingStateForThisLayerOnly(); 82 83 void recursiveCommitChanges(const TransformState&, float pageScaleFactor = 1, const FloatPoint& positionRelativeToBase = FloatPoint(), bool affectedByPageScale = false); 84 48 85 private: 49 GRefPtr<ClutterActor> m_layer; 86 FloatPoint computePositionRelativeToBase(float& pageScale) const; 87 void commitLayerChangesBeforeSublayers(float pageScaleFactor, const FloatPoint& positionRelativeToBase); 88 void commitLayerChangesAfterSublayers(); 89 90 virtual void platformClutterLayerAnimationStarted(double beginTime); 91 virtual void platformClutterLayerPaintContents(GraphicsContext&, const IntRect& clip); 92 93 GraphicsLayerActor* primaryLayer() const { return m_layer.get(); } 94 GraphicsLayerActor* layerForSuperlayer() const; 95 enum LayerChange { 96 NoChange = 0, 97 NameChanged = 1 << 1, 98 ChildrenChanged = 1 << 2, // also used for content layer, and preserves-3d, and size if tiling changes? 99 GeometryChanged = 1 << 3, 100 TransformChanged = 1 << 4, 101 ChildrenTransformChanged = 1 << 5, 102 Preserves3DChanged = 1 << 6, 103 MasksToBoundsChanged = 1 << 7, 104 DrawsContentChanged = 1 << 8, // need this? 105 BackgroundColorChanged = 1 << 9, 106 ContentsOpaqueChanged = 1 << 10, 107 BackfaceVisibilityChanged = 1 << 11, 108 OpacityChanged = 1 << 12, 109 AnimationChanged = 1 << 13, 110 DirtyRectsChanged = 1 << 14, 111 ContentsImageChanged = 1 << 15, 112 ContentsMediaLayerChanged = 1 << 16, 113 ContentsCanvasLayerChanged = 1 << 17, 114 ContentsRectChanged = 1 << 18, 115 MaskLayerChanged = 1 << 19, 116 ReplicatedLayerChanged = 1 << 20, 117 ContentsNeedsDisplay = 1 << 21, 118 AcceleratesDrawingChanged = 1 << 22, 119 ContentsScaleChanged = 1 << 23 120 }; 121 122 typedef unsigned LayerChangeFlags; 123 void noteLayerPropertyChanged(LayerChangeFlags); 124 void noteSublayersChanged(); 125 126 void updateBackfaceVisibility(); 127 void updateLayerNames(); 128 void updateSublayerList(); 129 void updateGeometry(float pixelAlignmentScale, const FloatPoint& positionRelativeToBase); 130 void updateTransform(); 131 void updateLayerDrawsContent(float pixelAlignmentScale, const FloatPoint& positionRelativeToBase); 132 133 void repaintLayerDirtyRects(); 134 135 GRefPtr<GraphicsLayerActor> m_layer; 136 137 Vector<FloatRect> m_dirtyRects; 138 LayerChangeFlags m_uncommittedChanges; 50 139 }; 51 140
Note: See TracChangeset
for help on using the changeset viewer.