Changeset 170071 in webkit
- Timestamp:
- Jun 17, 2014 2:06:12 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r170068 r170071 1 2014-06-17 Simon Fraser <simon.fraser@apple.com> 2 3 [UI-side compositing] fix reflections on composited layers 4 https://bugs.webkit.org/show_bug.cgi?id=133942 5 6 Reviewed by Tim Horton. 7 8 Test with a reflected div, that repaints on a timer to test backing 9 store updating on the clone. 10 11 * compositing/reflections/repaint-with-reflection-expected.html: Added. 12 * compositing/reflections/repaint-with-reflection.html: Added. 13 1 14 2014-06-17 Commit Queue <commit-queue@webkit.org> 2 15 -
trunk/Source/WebCore/ChangeLog
r170070 r170071 1 2014-06-17 Simon Fraser <simon.fraser@apple.com> 2 3 [UI-side compositing] fix reflections on composited layers 4 https://bugs.webkit.org/show_bug.cgi?id=133942 5 6 Reviewed by Tim Horton. 7 8 Fix reflections on composited layers. There are two main set of changes. 9 10 First, a PlatformCALayerRemote which is a clone has to track the layer 11 it is a clone of, so it knows where to grab the contents from in the UI process. 12 This layer may be told that its contents need updating out of order during 13 recursiveBuildTransaction(), so we need some small changes in RemoteLayerTreeContext 14 to allow a layer to add itself to the set of layers requiring commit. 15 16 In the UI process, a new step is added to RemoteLayerTreeHost::updateLayerTree() 17 to go through clones, and copy their contents from the origin layer. 18 19 The second set of changes makes platformCALayerLayerDidDisplay() work for 20 UI-side compositing by not taking a PlatformLayer*, but instead a PlatformCALayer*. 21 PlatformCALayer::setContentsChanged() changed to copyContentsFromLayer() so we know 22 what the origin layer is. 23 24 Test: compositing/reflections/repaint-with-reflection.html 25 26 * WebCore.exp.in: 27 * platform/graphics/GraphicsLayer.h: 28 (WebCore::GraphicsLayer::layerDidDisplay): Deleted. 29 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: 30 (WebCore::LayerClient::platformCALayerLayerDidDisplay): Deleted. 31 * platform/graphics/ca/GraphicsLayerCA.cpp: 32 (WebCore::GraphicsLayerCA::layerDidDisplay): 33 (WebCore::GraphicsLayerCA::findOrMakeClone): 34 * platform/graphics/ca/GraphicsLayerCA.h: 35 * platform/graphics/ca/PlatformCALayer.h: 36 * platform/graphics/ca/PlatformCALayerClient.h: 37 (WebCore::PlatformCALayerClient::platformCALayerLayerDidDisplay): 38 * platform/graphics/ca/mac/PlatformCALayerMac.h: 39 * platform/graphics/ca/mac/PlatformCALayerMac.mm: 40 (PlatformCALayerMac::copyContentsFromLayer): 41 (PlatformCALayerMac::superlayer): 42 (PlatformCALayerMac::setContentsChanged): Deleted. 43 * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp: 44 (PlatformCALayerWinInternal::displayCallback): 45 * platform/graphics/mac/WebLayer.mm: 46 (-[WebSimpleLayer display]): 47 1 48 2014-06-17 Anders Carlsson <andersca@apple.com> 2 49 -
trunk/Source/WebCore/WebCore.exp.in
r170029 r170071 550 550 __ZN7WebCore15GraphicsLayerCA14setPreserves3DEb 551 551 __ZN7WebCore15GraphicsLayerCA15addChildAtIndexEPNS_13GraphicsLayerEi 552 __ZN7WebCore15GraphicsLayerCA15layerDidDisplayEP 7CALayer552 __ZN7WebCore15GraphicsLayerCA15layerDidDisplayEPNS_15PlatformCALayerE 553 553 __ZN7WebCore15GraphicsLayerCA15removeAnimationERKN3WTF6StringE 554 554 __ZN7WebCore15GraphicsLayerCA15setBoundsOriginERKNS_10FloatPointE -
trunk/Source/WebCore/platform/graphics/GraphicsLayer.h
r169972 r170071 420 420 // Callback from the underlying graphics system to draw layer contents. 421 421 void paintGraphicsLayerContents(GraphicsContext&, const FloatRect& clip); 422 // Callback from the underlying graphics system when the layer has been displayed423 virtual void layerDidDisplay(PlatformLayer*) { }424 422 425 423 // For hosting this GraphicsLayer in a native layer hierarchy. -
trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp
r169568 r170071 194 194 virtual bool platformCALayerContentsOpaque() const { return false; } 195 195 virtual bool platformCALayerDrawsContent() const { return false; } 196 virtual void platformCALayerLayerDidDisplay(PlatformLayer*) { }197 196 virtual float platformCALayerDeviceScaleFactor() const { return 1; } 198 197 -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
r170037 r170071 950 950 } 951 951 952 void GraphicsLayerCA::layerDidDisplay(PlatformLayer* layer) 953 { 954 PlatformCALayer* currentLayer = PlatformCALayer::platformCALayer(layer); 955 PlatformCALayer* sourceLayer; 952 void GraphicsLayerCA::layerDidDisplay(PlatformCALayer* layer) 953 { 956 954 LayerMap* layerCloneMap; 957 955 958 if (currentLayer == m_layer) { 959 sourceLayer = m_layer.get(); 956 if (layer == m_layer) 960 957 layerCloneMap = m_layerClones.get(); 961 } else if (currentLayer == m_contentsLayer) { 962 sourceLayer = m_contentsLayer.get(); 958 else if (layer == m_contentsLayer) 963 959 layerCloneMap = m_contentsLayerClones.get(); 964 }else960 else 965 961 return; 966 962 … … 972 968 continue; 973 969 974 if (currClone->contents() != sourceLayer->contents()) 975 currClone->setContents(sourceLayer->contents()); 976 else 977 currClone->setContentsChanged(); 970 currClone->copyContentsFromLayer(layer); 978 971 } 979 972 } … … 3102 3095 resultLayer = cloneLayer(sourceLayer, cloneLevel); 3103 3096 #ifndef NDEBUG 3104 resultLayer->setName(String::format("Clone %d of layer % p", cloneID[0U], sourceLayer->platformLayer()));3097 resultLayer->setName(String::format("Clone %d of layer %llu", cloneID[0U], sourceLayer->layerID())); 3105 3098 #endif 3106 3099 addResult.iterator->value = resultLayer; -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
r169690 r170071 145 145 virtual void setCustomBehavior(CustomBehavior) override; 146 146 147 virtual void layerDidDisplay(PlatformLayer*) override;148 149 147 virtual void deviceOrPageScaleFactorChanged() override; 150 148 … … 189 187 virtual bool platformCALayerContentsOpaque() const override { return contentsOpaque(); } 190 188 virtual bool platformCALayerDrawsContent() const override { return drawsContent(); } 191 virtual void platformCALayerLayerDidDisplay(Platform Layer* layer) override { return layerDidDisplay(layer); }189 virtual void platformCALayerLayerDidDisplay(PlatformCALayer* layer) override { return layerDidDisplay(layer); } 192 190 virtual void platformCALayerSetNeedsToRevalidateTiles() override; 193 191 virtual float platformCALayerDeviceScaleFactor() const override; … … 202 200 virtual bool shouldRepaintOnSizeChange() const override; 203 201 202 void layerDidDisplay(PlatformCALayer*); 204 203 void updateOpacityOnLayer(); 205 204 -
trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.h
r170037 r170071 103 103 virtual void setNeedsDisplay(const FloatRect* dirtyRect = 0) = 0; 104 104 105 virtual void setContentsChanged() = 0;105 virtual void copyContentsFromLayer(PlatformCALayer*) = 0; 106 106 107 107 LayerType layerType() const { return m_layerType; } -
trunk/Source/WebCore/platform/graphics/ca/PlatformCALayerClient.h
r166997 r170071 49 49 virtual bool platformCALayerContentsOpaque() const = 0; 50 50 virtual bool platformCALayerDrawsContent() const = 0; 51 virtual void platformCALayerLayerDidDisplay(Platform Layer*) { }51 virtual void platformCALayerLayerDidDisplay(PlatformCALayer*) { } 52 52 53 53 virtual void platformCALayerSetNeedsToRevalidateTiles() { } -
trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.h
r170037 r170071 47 47 virtual void setNeedsDisplay(const FloatRect* dirtyRect = 0) override; 48 48 49 virtual void setContentsChanged() override;49 virtual void copyContentsFromLayer(PlatformCALayer*) override; 50 50 51 51 virtual PlatformCALayer* superlayer() const override; -
trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm
r170037 r170071 324 324 END_BLOCK_OBJC_EXCEPTIONS 325 325 } 326 327 void PlatformCALayerMac::setContentsChanged() 328 { 329 BEGIN_BLOCK_OBJC_EXCEPTIONS 330 [m_layer.get() setContentsChanged]; 326 327 void PlatformCALayerMac::copyContentsFromLayer(PlatformCALayer* layer) 328 { 329 BEGIN_BLOCK_OBJC_EXCEPTIONS 330 CALayer* caLayer = layer->m_layer.get(); 331 if ([m_layer contents] != [caLayer contents]) 332 [m_layer setContents:[caLayer contents]]; 333 else 334 [m_layer setContentsChanged]; 331 335 END_BLOCK_OBJC_EXCEPTIONS 332 336 } … … 334 338 PlatformCALayer* PlatformCALayerMac::superlayer() const 335 339 { 336 return platformCALayer([m_layer .get()superlayer]);340 return platformCALayer([m_layer superlayer]); 337 341 } 338 342 -
trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp
r170037 r170071 221 221 } 222 222 223 void PlatformCALayerWin:: setContentsChanged()224 { 225 // FIXME: There is no equivalent of setContentsChanged in CACF. For now I will226 // set contents to 0 and then back to its original value to see if that227 // kicks CACF into redisplaying.228 RetainPtr<CFTypeRef> contents = CACFLayerGetContents(m_layer.get());229 CACFLayerSetContents(m_layer.get(), 0);230 CACFLayerSetContents(m_layer.get(), contents.get()); 223 void PlatformCALayerWin::copyContentsFromLayer(PlatformCALayer* source) 224 { 225 if (source) { 226 RetainPtr<CFTypeRef> contents = CACFLayerGetContents(source->platformLayer()); 227 CACFLayerSetContents(m_layer.get(), contents.get()); 228 } else 229 CACFLayerSetContents(m_layer.get(), nullptr); 230 231 231 setNeedsCommit(); 232 232 } -
trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.h
r170037 r170071 40 40 virtual void setNeedsDisplay(const FloatRect* dirtyRect = 0) override; 41 41 42 virtual void setContentsChanged() override;42 virtual void copyContentsFromLayer(PlatformCALayer*) override; 43 43 44 44 virtual PlatformCALayer* superlayer() const override; -
trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWinInternal.cpp
r170037 r170071 149 149 CGContextRestoreGState(context); 150 150 151 owner()->owner()->platformCALayerLayerDidDisplay( caLayer);151 owner()->owner()->platformCALayerLayerDidDisplay(owner()); 152 152 } 153 153 -
trunk/Source/WebCore/platform/graphics/mac/WebLayer.mm
r169960 r170071 111 111 PlatformCALayer* layer = PlatformCALayer::platformCALayer(self); 112 112 if (layer && layer->owner()) 113 layer->owner()->platformCALayerLayerDidDisplay( self);113 layer->owner()->platformCALayerLayerDidDisplay(layer); 114 114 } 115 115 -
trunk/Source/WebKit2/ChangeLog
r170069 r170071 1 2014-06-17 Simon Fraser <simon.fraser@apple.com> 2 3 [UI-side compositing] fix reflections on composited layers 4 https://bugs.webkit.org/show_bug.cgi?id=133942 5 6 Reviewed by Tim Horton. 7 8 Fix reflections on composited layers. There are two main set of changes. 9 10 First, a PlatformCALayerRemote which is a clone has to track the layer 11 it is a clone of, so it knows where to grab the contents from in the UI process. 12 This layer may be told that its contents need updating out of order during 13 recursiveBuildTransaction(), so we need some small changes in RemoteLayerTreeContext 14 to allow a layer to add itself to the set of layers requiring commit. 15 16 In the UI process, a new step is added to RemoteLayerTreeHost::updateLayerTree() 17 to go through clones, and copy their contents from the origin layer. 18 19 The second set of changes makes platformCALayerLayerDidDisplay() work for 20 UI-side compositing by not taking a PlatformLayer*, but instead a PlatformCALayer*. 21 PlatformCALayer::setContentsChanged() changed to copyContentsFromLayer() so we know 22 what the origin layer is. 23 24 * Shared/mac/RemoteLayerBackingStore.mm: 25 (WebKit::RemoteLayerBackingStore::display): Remove the early return so we can always 26 call platformCALayerLayerDidDisplay(). 27 * Shared/mac/RemoteLayerTreeTransaction.h: 28 * Shared/mac/RemoteLayerTreeTransaction.mm: 29 (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): 30 (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode): 31 (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): 32 (WebKit::dumpChangedLayers): 33 * UIProcess/mac/RemoteLayerTreeHost.mm: 34 (WebKit::RemoteLayerTreeHost::updateLayerTree): 35 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp: 36 (WebKit::PlatformCALayerRemote::clone): 37 (WebKit::PlatformCALayerRemote::recursiveBuildTransaction): 38 (WebKit::PlatformCALayerRemote::copyContentsFromLayer): 39 (WebKit::PlatformCALayerRemote::setClonedLayer): 40 (WebKit::PlatformCALayerRemote::setContentsChanged): Deleted. 41 * WebProcess/WebPage/mac/PlatformCALayerRemote.h: 42 (WebKit::PlatformCALayerRemote::properties): 43 (WebKit::PlatformCALayerRemote::context): 44 1 45 2014-06-17 Anders Carlsson <andersca@apple.com> 2 46 -
trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm
r169961 r170071 241 241 242 242 m_frontBuffer.surface->releaseGraphicsContext(); 243 244 return true; 245 } 246 #endif 247 248 ASSERT(!m_acceleratesDrawing); 249 std::unique_ptr<GraphicsContext> context = m_frontBuffer.bitmap->createGraphicsContext(); 250 251 RetainPtr<CGImageRef> backImage; 252 if (m_backBuffer.bitmap && !willPaintEntireBackingStore) 253 backImage = m_backBuffer.bitmap->makeCGImage(); 254 255 drawInContext(*context, backImage.get()); 243 } else 244 #endif 245 { 246 ASSERT(!m_acceleratesDrawing); 247 std::unique_ptr<GraphicsContext> context = m_frontBuffer.bitmap->createGraphicsContext(); 248 249 RetainPtr<CGImageRef> backImage; 250 if (m_backBuffer.bitmap && !willPaintEntireBackingStore) 251 backImage = m_backBuffer.bitmap->makeCGImage(); 252 253 drawInContext(*context, backImage.get()); 254 } 255 256 m_layer->owner()->platformCALayerLayerDidDisplay(m_layer); 256 257 257 258 return true; -
trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h
r170035 r170071 69 69 OpaqueChanged = 1 << 16, 70 70 MaskLayerChanged = 1 << 17, 71 ContentsRectChanged = 1 << 18, 72 ContentsScaleChanged = 1 << 19, 73 MinificationFilterChanged = 1 << 20, 74 MagnificationFilterChanged = 1 << 21, 75 BlendModeChanged = 1 << 22, 76 SpeedChanged = 1 << 23, 77 TimeOffsetChanged = 1 << 24, 78 BackingStoreChanged = 1 << 25, 79 FiltersChanged = 1 << 26, 80 AnimationsChanged = 1 << 27, 81 EdgeAntialiasingMaskChanged = 1 << 28, 82 CustomAppearanceChanged = 1 << 29, 83 CustomBehaviorChanged = 1 << 30 71 ClonedContentsChanged = 1 << 18, 72 ContentsRectChanged = 1 << 19, 73 ContentsScaleChanged = 1 << 20, 74 MinificationFilterChanged = 1 << 21, 75 MagnificationFilterChanged = 1 << 22, 76 BlendModeChanged = 1 << 23, 77 SpeedChanged = 1 << 24, 78 TimeOffsetChanged = 1 << 25, 79 BackingStoreChanged = 1 << 26, 80 FiltersChanged = 1 << 27, 81 AnimationsChanged = 1 << 28, 82 EdgeAntialiasingMaskChanged = 1 << 29, 83 CustomAppearanceChanged = 1 << 30, 84 CustomBehaviorChanged = 1 << 31 84 85 }; 85 86 typedef unsigned LayerChange; … … 133 134 std::unique_ptr<WebCore::FilterOperations> filters; 134 135 WebCore::GraphicsLayer::PlatformLayerID maskLayerID; 136 WebCore::GraphicsLayer::PlatformLayerID clonedLayerID; 135 137 double timeOffset; 136 138 float speed; … … 161 163 WebCore::GraphicsLayer::PlatformLayerID rootLayerID() const { return m_rootLayerID; } 162 164 void setRootLayerID(WebCore::GraphicsLayer::PlatformLayerID); 163 void layerPropertiesChanged(PlatformCALayerRemote* , LayerProperties&);165 void layerPropertiesChanged(PlatformCALayerRemote*); 164 166 void setCreatedLayers(Vector<LayerCreationProperties>); 165 167 void setDestroyedLayerIDs(Vector<WebCore::GraphicsLayer::PlatformLayerID>); -
trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm
r170035 r170071 82 82 , contentsRect(FloatPoint(), FloatSize(1, 1)) 83 83 , maskLayerID(0) 84 , clonedLayerID(0) 84 85 , timeOffset(0) 85 86 , speed(1) … … 115 116 , contentsRect(other.contentsRect) 116 117 , maskLayerID(other.maskLayerID) 118 , clonedLayerID(other.clonedLayerID) 117 119 , timeOffset(other.timeOffset) 118 120 , speed(other.speed) … … 207 209 encoder << maskLayerID; 208 210 211 if (changedProperties & ClonedContentsChanged) 212 encoder << clonedLayerID; 213 209 214 if (changedProperties & ContentsRectChanged) 210 215 encoder << contentsRect; … … 354 359 if (result.changedProperties & MaskLayerChanged) { 355 360 if (!decoder.decode(result.maskLayerID)) 361 return false; 362 } 363 364 if (result.changedProperties & ClonedContentsChanged) { 365 if (!decoder.decode(result.clonedLayerID)) 356 366 return false; 357 367 } … … 550 560 } 551 561 552 void RemoteLayerTreeTransaction::layerPropertiesChanged(PlatformCALayerRemote* remoteLayer , RemoteLayerTreeTransaction::LayerProperties& properties)562 void RemoteLayerTreeTransaction::layerPropertiesChanged(PlatformCALayerRemote* remoteLayer) 553 563 { 554 564 m_changedLayers.append(remoteLayer); … … 1058 1068 if (layerProperties.changedProperties & RemoteLayerTreeTransaction::MaskLayerChanged) 1059 1069 dumpProperty(ts, "maskLayer", layerProperties.maskLayerID); 1070 1071 if (layerProperties.changedProperties & RemoteLayerTreeTransaction::ClonedContentsChanged) 1072 dumpProperty(ts, "clonedLayer", layerProperties.clonedLayerID); 1060 1073 1061 1074 if (layerProperties.changedProperties & RemoteLayerTreeTransaction::ContentsRectChanged) -
trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm
r169957 r170071 72 72 } 73 73 74 typedef std::pair<GraphicsLayer::PlatformLayerID, GraphicsLayer::PlatformLayerID> LayerIDPair; 75 Vector<LayerIDPair> clonesToUpdate; 76 74 77 for (auto& changedLayer : transaction.changedLayerProperties()) { 75 78 auto layerID = changedLayer.key; … … 88 91 relatedLayers.set(properties.maskLayerID, getLayer(properties.maskLayerID)); 89 92 93 if (properties.changedProperties & RemoteLayerTreeTransaction::ClonedContentsChanged && properties.clonedLayerID) 94 clonesToUpdate.append(LayerIDPair(layerID, properties.clonedLayerID)); 95 90 96 if (m_isDebugLayerTreeHost) { 91 97 RemoteLayerTreePropertyApplier::applyProperties(layer, this, properties, relatedLayers); … … 96 102 } else 97 103 RemoteLayerTreePropertyApplier::applyProperties(layer, this, properties, relatedLayers); 104 } 105 106 for (const auto& layerPair : clonesToUpdate) { 107 LayerOrView *layer = getLayer(layerPair.first); 108 LayerOrView *clonedLayer = getLayer(layerPair.second); 109 asLayer(layer).contents = asLayer(clonedLayer).contents; 98 110 } 99 111 -
trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp
r168901 r170071 105 105 clone->m_properties.notePropertiesChanged(static_cast<RemoteLayerTreeTransaction::LayerChange>(m_properties.everChangedProperties & ~RemoteLayerTreeTransaction::BackingStoreChanged)); 106 106 107 clone->setClonedLayer(this); 107 108 return clone.release(); 108 109 } … … 142 143 } 143 144 144 transaction.layerPropertiesChanged(this , m_properties);145 transaction.layerPropertiesChanged(this); 145 146 } 146 147 … … 193 194 } 194 195 195 void PlatformCALayerRemote::setContentsChanged() 196 { 196 void PlatformCALayerRemote::copyContentsFromLayer(PlatformCALayer* layer) 197 { 198 ASSERT(m_properties.clonedLayerID == layer->layerID()); 199 200 if (!m_properties.changedProperties) 201 m_context->layerPropertyChangedWhileBuildingTransaction(this); 202 203 m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::ClonedContentsChanged); 197 204 } 198 205 … … 338 345 } 339 346 347 void PlatformCALayerRemote::setClonedLayer(const PlatformCALayer* layer) 348 { 349 if (layer) 350 m_properties.clonedLayerID = layer->layerID(); 351 else 352 m_properties.clonedLayerID = 0; 353 354 m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::ClonedContentsChanged); 355 } 356 340 357 bool PlatformCALayerRemote::isOpaque() const 341 358 { -
trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.h
r170037 r170071 50 50 virtual void setNeedsDisplay(const WebCore::FloatRect* dirtyRect = 0) override; 51 51 52 virtual void setContentsChanged() override;52 virtual void copyContentsFromLayer(PlatformCALayer*) override; 53 53 54 54 virtual WebCore::PlatformCALayer* superlayer() const override; … … 154 154 virtual uint32_t hostingContextID(); 155 155 156 void setClonedLayer(const PlatformCALayer*); 157 156 158 RemoteLayerTreeTransaction::LayerProperties& properties() { return m_properties; } 159 const RemoteLayerTreeTransaction::LayerProperties& properties() const { return m_properties; } 157 160 158 161 void didCommit(); … … 163 166 PlatformCALayerRemote(WebCore::PlatformCALayer::LayerType, WebCore::PlatformCALayerClient* owner, RemoteLayerTreeContext* context); 164 167 PlatformCALayerRemote(const PlatformCALayerRemote&, WebCore::PlatformCALayerClient*, RemoteLayerTreeContext*); 168 169 RemoteLayerTreeContext* context() const { return m_context; } 165 170 166 171 private: -
trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h
r169370 r170071 57 57 void buildTransaction(RemoteLayerTreeTransaction&, WebCore::PlatformCALayer& rootLayer); 58 58 59 void layerPropertyChangedWhileBuildingTransaction(PlatformCALayerRemote*); 60 59 61 // From the UI process 60 62 void animationDidStart(WebCore::GraphicsLayer::PlatformLayerID, const String& key, double startTime); … … 77 79 78 80 RemoteLayerBackingStoreCollection m_backingStoreCollection; 81 82 RemoteLayerTreeTransaction* m_currentTransaction; 79 83 }; 80 84 -
trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm
r169370 r170071 45 45 : m_webPage(webPage) 46 46 , m_backingStoreCollection(this) 47 , m_currentTransaction(nullptr) 47 48 { 48 49 } … … 102 103 transaction.setRootLayerID(rootLayerRemote.layerID()); 103 104 105 m_currentTransaction = &transaction; 104 106 rootLayerRemote.recursiveBuildTransaction(transaction); 107 m_currentTransaction = nullptr; 105 108 106 109 transaction.setCreatedLayers(std::move(m_createdLayers)); 107 110 transaction.setDestroyedLayerIDs(std::move(m_destroyedLayers)); 111 } 112 113 void RemoteLayerTreeContext::layerPropertyChangedWhileBuildingTransaction(PlatformCALayerRemote* layer) 114 { 115 if (m_currentTransaction) 116 m_currentTransaction->layerPropertiesChanged(layer); 108 117 } 109 118
Note: See TracChangeset
for help on using the changeset viewer.