зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1622360 - Remove the content render root. r=jrmuizel
Nothing creates the content render root anymore, so we can delete references to it and wipe it off the face of the codebase. This makes the non-default render root array a zero-length Array which is a template specialization that lacks things like begin() end end(). So we need to also rip out any code that tries to iterate these things, in order to get compilation to succeed. The code would be a no-op anyway now that there are no non-default render roots left. Depends on D68864 Differential Revision: https://phabricator.services.mozilla.com/D68865 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
30d30f9300
Коммит
cd8118eabb
|
@ -258,9 +258,6 @@ IpcResourceUpdateQueue::IpcResourceUpdateQueue(
|
|||
: mWriter(std::move(aOther.mWriter)),
|
||||
mUpdates(std::move(aOther.mUpdates)),
|
||||
mRenderRoot(aOther.mRenderRoot) {
|
||||
for (auto renderRoot : wr::kNonDefaultRenderRoots) {
|
||||
mSubQueues[renderRoot] = std::move(aOther.mSubQueues[renderRoot]);
|
||||
}
|
||||
}
|
||||
|
||||
IpcResourceUpdateQueue& IpcResourceUpdateQueue::operator=(
|
||||
|
@ -269,9 +266,6 @@ IpcResourceUpdateQueue& IpcResourceUpdateQueue::operator=(
|
|||
mWriter = std::move(aOther.mWriter);
|
||||
mUpdates = std::move(aOther.mUpdates);
|
||||
mRenderRoot = aOther.mRenderRoot;
|
||||
for (auto renderRoot : wr::kNonDefaultRenderRoots) {
|
||||
mSubQueues[renderRoot] = std::move(aOther.mSubQueues[renderRoot]);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@ -432,12 +426,6 @@ bool IpcResourceUpdateQueue::IsEmpty() const {
|
|||
void IpcResourceUpdateQueue::Clear() {
|
||||
mWriter.Clear();
|
||||
mUpdates.Clear();
|
||||
|
||||
for (auto& subQueue : mSubQueues) {
|
||||
if (subQueue) {
|
||||
subQueue->Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
|
|
|
@ -97,28 +97,16 @@ class IpcResourceUpdateQueue {
|
|||
// we need to know which WR document to generate a frame for when they change.
|
||||
IpcResourceUpdateQueue& SubQueue(wr::RenderRoot aRenderRoot) {
|
||||
MOZ_ASSERT(mRenderRoot == wr::RenderRoot::Default);
|
||||
if (aRenderRoot == wr::RenderRoot::Default) {
|
||||
MOZ_ASSERT(mRenderRoot == wr::RenderRoot::Default);
|
||||
return *this;
|
||||
}
|
||||
if (!mSubQueues[aRenderRoot]) {
|
||||
mSubQueues[aRenderRoot] = MakeUnique<IpcResourceUpdateQueue>(
|
||||
mWriter.WrBridge(), aRenderRoot, mWriter.ChunkSize());
|
||||
}
|
||||
return *mSubQueues[aRenderRoot];
|
||||
MOZ_ASSERT(aRenderRoot == wr::RenderRoot::Default);
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool HasAnySubQueue() {
|
||||
for (auto renderRoot : wr::kNonDefaultRenderRoots) {
|
||||
if (mSubQueues[renderRoot]) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool HasSubQueue(wr::RenderRoot aRenderRoot) {
|
||||
return aRenderRoot == wr::RenderRoot::Default || !!mSubQueues[aRenderRoot];
|
||||
return aRenderRoot == wr::RenderRoot::Default;
|
||||
}
|
||||
|
||||
wr::RenderRoot GetRenderRoot() { return mRenderRoot; }
|
||||
|
@ -194,7 +182,6 @@ class IpcResourceUpdateQueue {
|
|||
protected:
|
||||
ShmSegmentsWriter mWriter;
|
||||
nsTArray<layers::OpUpdateResource> mUpdates;
|
||||
wr::NonDefaultRenderRootArray<UniquePtr<IpcResourceUpdateQueue>> mSubQueues;
|
||||
wr::RenderRoot mRenderRoot;
|
||||
};
|
||||
|
||||
|
|
|
@ -1174,8 +1174,6 @@ bool WebRenderBridgeParent::SetDisplayList(
|
|||
if (IsRootWebRenderBridgeParent()) {
|
||||
if (aRenderRoot != wr::RenderRoot::Default) {
|
||||
MutexAutoLock lock(mRenderRootRectMutex);
|
||||
mRenderRootRects[aRenderRoot] = ViewAs<ScreenPixel>(
|
||||
aRect, PixelCastJustification::LayoutDeviceIsScreenForTabDims);
|
||||
}
|
||||
LayoutDeviceIntSize widgetSize = mWidget->GetClientSize();
|
||||
LayoutDeviceIntRect rect =
|
||||
|
@ -2474,11 +2472,6 @@ void WebRenderBridgeParent::HoldPendingTransactionId(
|
|||
already_AddRefed<wr::WebRenderAPI>
|
||||
WebRenderBridgeParent::GetWebRenderAPIAtPoint(const ScreenPoint& aPoint) {
|
||||
MutexAutoLock lock(mRenderRootRectMutex);
|
||||
for (auto renderRoot : wr::kNonDefaultRenderRoots) {
|
||||
if (mRenderRootRects[renderRoot].Contains(aPoint)) {
|
||||
return do_AddRef(Api(renderRoot));
|
||||
}
|
||||
}
|
||||
return do_AddRef(Api(wr::RenderRoot::Default));
|
||||
}
|
||||
|
||||
|
|
|
@ -616,7 +616,6 @@ class WebRenderBridgeParent final
|
|||
// Kind of clunky, but I can't sort out a more elegant way of getting this to
|
||||
// work.
|
||||
Mutex mRenderRootRectMutex;
|
||||
wr::NonDefaultRenderRootArray<ScreenRect> mRenderRootRects;
|
||||
|
||||
Maybe<wr::RenderRoot> mRenderRoot;
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
|
|
|
@ -329,14 +329,6 @@ void WebRenderLayerManager::EndTransactionWithoutLayer(
|
|||
WrBridge()->GetPipeline(), wrRects[wr::RenderRoot::Default].size,
|
||||
mLastDisplayListSizes[wr::RenderRoot::Default], &mDisplayItemCache);
|
||||
|
||||
for (auto renderRoot : wr::kNonDefaultRenderRoots) {
|
||||
if (!rects[renderRoot].IsEmpty()) {
|
||||
builder.CreateSubBuilder(wrRects[renderRoot].size,
|
||||
mLastDisplayListSizes[renderRoot], nullptr,
|
||||
renderRoot);
|
||||
}
|
||||
}
|
||||
|
||||
wr::IpcResourceUpdateQueue resourceUpdates(WrBridge());
|
||||
wr::usize builderDumpIndex = 0;
|
||||
bool containsSVGGroup = false;
|
||||
|
|
|
@ -73,24 +73,13 @@ MOZ_DEFINE_ENUM_CLASS_WITH_BASE(
|
|||
// Within the content process, this refers to the content area. Any
|
||||
// system that multiplexes data streams from different processes is
|
||||
// responsible for converting RenderRoot::Default into
|
||||
// RenderRoot::Content (or whatever value is appropriate)
|
||||
Default,
|
||||
|
||||
// Everything below the chrome - even if it is not coming from a content
|
||||
// process. For example. the devtools, sidebars, and status panel are
|
||||
// traditionally part of the "chrome," but are assigned a renderroot of
|
||||
// RenderRoot::Content because they occupy screen space in the "content"
|
||||
// area of the browser (visually situated below the "chrome" area).
|
||||
Content));
|
||||
// whatever value is appropriate
|
||||
Default));
|
||||
|
||||
typedef EnumSet<RenderRoot, uint8_t> RenderRootSet;
|
||||
|
||||
// For simple iteration of all render roots
|
||||
const Array<RenderRoot, kRenderRootCount> kRenderRoots(RenderRoot::Default,
|
||||
RenderRoot::Content);
|
||||
|
||||
const Array<RenderRoot, kRenderRootCount - 1> kNonDefaultRenderRoots(
|
||||
RenderRoot::Content);
|
||||
const Array<RenderRoot, kRenderRootCount> kRenderRoots(RenderRoot::Default);
|
||||
|
||||
template <typename T>
|
||||
class RenderRootArray : public Array<T, kRenderRootCount> {
|
||||
|
|
|
@ -1581,8 +1581,6 @@ void nsDisplayListBuilder::ComputeDefaultRenderRootRect(
|
|||
LayoutDeviceIntRegion cutout;
|
||||
LayoutDeviceIntRect clientRect(LayoutDeviceIntPoint(), aClientSize);
|
||||
cutout.OrWith(clientRect);
|
||||
cutout.SubOut(
|
||||
RoundedToInt(mRenderRootRects[mozilla::wr::RenderRoot::Content]));
|
||||
|
||||
mRenderRootRects[mozilla::wr::RenderRoot::Default] =
|
||||
LayoutDeviceRect(cutout.GetBounds());
|
||||
|
|
Загрузка…
Ссылка в новой задаче