author | Morris Tseng <mtseng@mozilla.com> |
Tue, 22 Aug 2017 13:46:30 +0800 | |
changeset 376150 | f8712cfa25880a939ccca45bdd8a1ad318b359ff |
parent 376086 | db36870cee64a8edcb5bed7d40c3a9a067152813 |
child 376151 | b0142c177ac0d9577cd0c5da75069e57272a0f7d |
push id | 32376 |
push user | kwierso@gmail.com |
push date | Wed, 23 Aug 2017 00:07:40 +0000 |
treeherder | mozilla-central@64a45ee1731c [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | kats |
bugs | 1392200 |
milestone | 57.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
gfx/layers/wr/StackingContextHelper.h | file | annotate | diff | comparison | revisions | |
gfx/layers/wr/WebRenderLayerManager.cpp | file | annotate | diff | comparison | revisions |
--- a/gfx/layers/wr/StackingContextHelper.h +++ b/gfx/layers/wr/StackingContextHelper.h @@ -78,16 +78,18 @@ public: // same as the layer space. (TODO: try to make this more explicit somehow). wr::LayoutRect ToRelativeLayoutRect(const LayerRect& aRect) const; wr::LayoutRect ToRelativeLayoutRect(const LayoutDeviceRect& aRect) const; // Same but for points wr::LayoutPoint ToRelativeLayoutPoint(const LayerPoint& aPoint) const; // Same but rounds the rectangle to ints after transforming. wr::LayoutRect ToRelativeLayoutRectRounded(const LayoutDeviceRect& aRect) const; + bool IsBackfaceVisible() const { return mTransform.IsBackfaceVisible(); } + private: wr::DisplayListBuilder* mBuilder; LayerPoint mOrigin; gfx::Matrix4x4 mTransform; }; } // namespace layers } // namespace mozilla
--- a/gfx/layers/wr/WebRenderLayerManager.cpp +++ b/gfx/layers/wr/WebRenderLayerManager.cpp @@ -238,16 +238,20 @@ WebRenderLayerManager::CreateWebRenderCo nsDisplayList* itemSameCoordinateSystemChildren = item->GetSameCoordinateSystemChildren(); if (item->ShouldFlattenAway(aDisplayListBuilder)) { aDisplayList->AppendToBottom(itemSameCoordinateSystemChildren); item->Destroy(aDisplayListBuilder); continue; } + if (item->BackfaceIsHidden() && aSc.IsBackfaceVisible()) { + continue; + } + savedItems.AppendToTop(item); bool forceNewLayerData = false; size_t layerCountBeforeRecursing = mLayerScrollData.size(); if (apzEnabled) { // For some types of display items we want to force a new // WebRenderLayerScrollData object, to ensure we preserve the APZ-relevant // data that is in the display item.