Changeset 104832 in webkit
- Timestamp:
- Jan 12, 2012 9:27:41 AM (12 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r104823 r104832 1 2012-01-12 No'am Rosenthal <noam.rosenthal@nokia.com> 2 3 [Qt][WK2] WebProcesses crashes when composited reflections/masks are present 4 https://bugs.webkit.org/show_bug.cgi?id=75883 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 Make sure masks and replica layers can access layerTreeTileClient. Let masks 9 have the right contents/visible rect so that they can render content tiles. 10 Default the mask's size to be the layer's size. 11 12 * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: 13 (WebCore::WebGraphicsLayer::WebGraphicsLayer): 14 (WebCore::WebGraphicsLayer::setSize): 15 (WebCore::WebGraphicsLayer::setMaskLayer): 16 (WebCore::WebGraphicsLayer::setReplicatedByLayer): 17 (WebCore::WebGraphicsLayer::syncCompositingState): 18 (WebCore::WebGraphicsLayer::setContentsScale): 19 (WebCore::WebGraphicsLayer::setVisibleContentRect): 20 (WebCore::WebGraphicsLayer::tiledBackingStoreContentsRect): 21 (WebCore::WebGraphicsLayer::updateTileBuffersRecursively): 22 (WebCore::WebGraphicsLayer::layerTreeTileClient): 23 (WebCore::WebGraphicsLayer::purgeBackingStores): 24 (WebCore::WebGraphicsLayer::recreateBackingStoreIfNeeded): 25 (WebCore::WebGraphicsLayer::setLayerTreeTileClient): 26 * WebProcess/WebCoreSupport/WebGraphicsLayer.h: 27 (WebCore::WebGraphicsLayer::maskTarget): 28 (WebCore::WebGraphicsLayer::setMaskTarget): 29 1 30 2012-01-12 Kenneth Rohde Christiansen <kenneth@webkit.org> 2 31 … … 11047 11076 Reviewed by Adam Roben. 11048 11077 11049 This avoids calling into the plug-in 11078 This avoids calling into the plug-in when only the plug-in position relative to the window changes. 11050 11079 11051 11080 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.cpp
r104720 r104832 73 73 WebGraphicsLayer::WebGraphicsLayer(GraphicsLayerClient* client) 74 74 : GraphicsLayer(client) 75 , m_maskTarget(0) 75 76 , m_needsDisplay(false) 76 77 , m_modified(true) … … 193 194 GraphicsLayer::setSize(size); 194 195 setNeedsDisplay(); 196 if (maskLayer()) 197 maskLayer()->setSize(size); 195 198 notifyChange(); 196 199 } … … 355 358 void WebGraphicsLayer::setMaskLayer(GraphicsLayer* layer) 356 359 { 360 if (layer == maskLayer()) 361 return; 362 357 363 GraphicsLayer::setMaskLayer(layer); 358 notifyChange(); 364 365 if (!layer) 366 return; 367 368 layer->setSize(size()); 369 WebGraphicsLayer* webGraphicsLayer = toWebGraphicsLayer(layer); 370 webGraphicsLayer->setLayerTreeTileClient(layerTreeTileClient()); 371 webGraphicsLayer->setMaskTarget(this); 372 webGraphicsLayer->setContentsScale(m_contentsScale); 373 webGraphicsLayer->notifyChange(); 374 notifyChange(); 375 359 376 } 360 377 … … 363 380 if (layer == replicaLayer()) 364 381 return; 382 383 if (layer) 384 toWebGraphicsLayer(layer)->setLayerTreeTileClient(layerTreeTileClient()); 385 365 386 GraphicsLayer::setReplicatedByLayer(layer); 366 387 notifyChange(); … … 388 409 for (size_t i = 0; i < children().size(); ++i) 389 410 children()[i]->syncCompositingState(rect); 390 if (replicaLayer()) 391 replicaLayer()->syncCompositingState(rect); 392 if (maskLayer()) 393 maskLayer()->syncCompositingState(rect); 411 412 if (WebGraphicsLayer* mask = toWebGraphicsLayer(maskLayer())) 413 mask->syncCompositingStateForThisLayerOnly(); 414 415 if (WebGraphicsLayer* replica = toWebGraphicsLayer(replicaLayer())) 416 replica->syncCompositingStateForThisLayerOnly(); 417 394 418 syncCompositingStateForThisLayerOnly(); 395 419 } … … 457 481 } 458 482 483 if (WebGraphicsLayer* mask = toWebGraphicsLayer(maskLayer())) 484 mask->setContentsScale(scale); 485 459 486 m_contentsScale = scale; 460 487 if (m_mainBackingStore && m_mainBackingStore->contentsScale() == scale) … … 484 511 notifyChange(); 485 512 m_mainBackingStore->adjustVisibleRect(); 513 if (maskLayer()) 514 toWebGraphicsLayer(maskLayer())->setVisibleContentRect(rect); 486 515 } 487 516 … … 509 538 IntRect WebGraphicsLayer::tiledBackingStoreContentsRect() 510 539 { 511 if ( m_image)540 if (!drawsContent()) 512 541 return IntRect(); 513 542 return IntRect(0, 0, size().width(), size().height()); … … 552 581 layer->updateTileBuffersRecursively(); 553 582 } 583 584 if (WebGraphicsLayer* mask = toWebGraphicsLayer(maskLayer())) 585 mask->updateTileBuffersRecursively(); 554 586 } 555 587 … … 558 590 if (m_layerTreeTileClient) 559 591 return m_layerTreeTileClient; 560 WebGraphicsLayer* parent = toWebGraphicsLayer(this->parent()); 592 WebGraphicsLayer* parent; 593 if (this->replicatedLayer()) 594 parent = toWebGraphicsLayer(this->replicatedLayer()); 595 else if (this->maskTarget()) 596 parent = toWebGraphicsLayer(this->maskTarget()); 597 else 598 parent = toWebGraphicsLayer(this->parent()); 599 561 600 if (!parent) 562 601 return 0; … … 587 626 } 588 627 628 if (WebGraphicsLayer* mask = toWebGraphicsLayer(maskLayer())) 629 mask->purgeBackingStores(); 630 589 631 if (m_mainBackingStore) 590 632 m_mainBackingStore.clear(); … … 603 645 layer->recreateBackingStoreIfNeeded(); 604 646 } 647 if (WebGraphicsLayer* mask = toWebGraphicsLayer(maskLayer())) 648 mask->recreateBackingStoreIfNeeded(); 605 649 606 650 if (!m_mainBackingStore) { … … 618 662 return; 619 663 664 if (WebGraphicsLayer* replica = toWebGraphicsLayer(replicaLayer())) 665 replica->setLayerTreeTileClient(client); 666 if (WebGraphicsLayer* mask = toWebGraphicsLayer(maskLayer())) 667 mask->setLayerTreeTileClient(client); 620 668 for (size_t i = 0; i < children().size(); ++i) { 621 669 WebGraphicsLayer* layer = toWebGraphicsLayer(this->children()[i]); -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.h
r104370 r104832 108 108 void notifyAnimationStarted(double); 109 109 110 GraphicsLayer* maskTarget() const { return m_maskTarget; } 111 void setMaskTarget(GraphicsLayer* layer) { m_maskTarget = layer; } 112 110 113 static void initFactory(); 111 114 … … 138 141 private: 139 142 WebKit::WebLayerInfo m_layerInfo; 140 WebKit::WebLayerTreeTileClient* m_layerTileClient;141 143 RefPtr<Image> m_image; 144 GraphicsLayer* m_maskTarget; 142 145 FloatRect m_needsDisplayRect; 143 146 IntRect m_visibleContentRect;
Note: See TracChangeset
for help on using the changeset viewer.