/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
class SurfacePoolWayland final : public SurfacePool { public: // Get a handle for a new window. aGL can be nullptr.
RefPtr<SurfacePoolHandle> GetHandleForGL(gl::GLContext* aGL) override;
// Destroy all GL resources associated with aGL managed by this pool. void DestroyGLResourcesForContext(gl::GLContext* aGL) override;
// Stores the entries for surfaces that are in use by NativeLayerWayland, i.e. // an entry is inside mInUseEntries between calls to ObtainSurfaceFromPool() // and ReturnSurfaceToPool().
std::unordered_map<widget::WaylandBuffer*, SurfacePoolEntry> mInUseEntries;
// Stores entries which are no longer in use by NativeLayerWayland but are // still in use by the window server, i.e. for which // WaylandBuffer::IsAttached() still returns true. // These entries are checked once per frame inside // CollectPendingSurfaces(), and returned to mAvailableEntries once the // window server is done.
nsTArray<SurfacePoolEntry> mPendingEntries;
// Stores entries which are available for recycling. These entries are not // in use by a NativeLayerWayland or by the window server.
nsTArray<SurfacePoolEntry> mAvailableEntries;
size_t mPoolSizeLimit;
// A surface pool handle that is stored on NativeLayerWayland and keeps the // SurfacePool alive. class SurfacePoolHandleWayland final : public SurfacePoolHandle { public:
SurfacePoolHandleWayland* AsSurfacePoolHandleWayland() override { returnthis;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.