chromium/third_party/blink/renderer/core/layout/measure_cache.h

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_MEASURE_CACHE_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_MEASURE_CACHE_H_

#include <optional>

#include "third_party/blink/renderer/platform/heap/collection_support/heap_vector.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/heap/member.h"

namespace blink {

class LayoutResult;
class ConstraintSpace;
class BlockNode;
struct FragmentGeometry;

// Implements an N-way LRU cache for "measure" layout results.
//
// Some layout algorithms (grid in particular) will measure an element multiple
// times with different constraint spaces.
//
// This cache is designed to handle these multiple measure passes.
class MeasureCache final : public GarbageCollected<MeasureCache> {};

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_MEASURE_CACHE_H_