#include "third_party/blink/renderer/platform/graphics/paint/geometry_mapper.h"
#include "base/containers/adapters.h"
#include "third_party/blink/renderer/platform/geometry/infinite_int_rect.h"
#include "third_party/blink/renderer/platform/graphics/paint/scroll_paint_property_node.h"
#include "third_party/blink/renderer/platform/heap/collection_support/heap_vector.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
namespace blink {
namespace {
gfx::SizeF MaxScrollOffset(
const TransformPaintPropertyNode& scroll_translation) { … }
PropertyTreeState ScrollContainerState(
const TransformPaintPropertyNode& scroll_translation) { … }
PropertyTreeState ScrollingContentsState(
const TransformPaintPropertyNode& scroll_translation) { … }
}
gfx::Transform GeometryMapper::SourceToDestinationProjection(
const TransformPaintPropertyNode& source,
const TransformPaintPropertyNode& destination) { … }
gfx::Transform GeometryMapper::SourceToDestinationProjectionInternal(
const TransformPaintPropertyNode& source,
const TransformPaintPropertyNode& destination,
ExtraProjectionResult& extra_result,
bool& success) { … }
float GeometryMapper::SourceToDestinationApproximateMinimumScale(
const TransformPaintPropertyNode& source,
const TransformPaintPropertyNode& destination) { … }
bool GeometryMapper::LocalToAncestorVisualRect(
const PropertyTreeState& local_state,
const PropertyTreeState& ancestor_state,
FloatClipRect& mapping_rect,
OverlayScrollbarClipBehavior clip_behavior,
VisualRectFlags flags) { … }
template <GeometryMapper::ForCompositingOverlap for_compositing_overlap>
bool GeometryMapper::LocalToAncestorVisualRectInternal(
const PropertyTreeState& local_state,
const PropertyTreeState& ancestor_state,
FloatClipRect& rect_to_map,
OverlayScrollbarClipBehavior clip_behavior,
VisualRectFlags flags) { … }
template <GeometryMapper::ForCompositingOverlap for_compositing_overlap>
bool GeometryMapper::SlowLocalToAncestorVisualRectWithPixelMovingFilters(
const PropertyTreeState& local_state,
const PropertyTreeState& ancestor_state,
FloatClipRect& rect_to_map,
OverlayScrollbarClipBehavior clip_behavior,
VisualRectFlags flags) { … }
FloatClipRect GeometryMapper::LocalToAncestorClipRect(
const PropertyTreeState& local_state,
const PropertyTreeState& ancestor_state,
OverlayScrollbarClipBehavior clip_behavior) { … }
static FloatClipRect GetClipRect(const ClipPaintPropertyNode& clip_node,
OverlayScrollbarClipBehavior clip_behavior) { … }
template <GeometryMapper::ForCompositingOverlap for_compositing_overlap>
FloatClipRect GeometryMapper::LocalToAncestorClipRectInternal(
const ClipPaintPropertyNode& descendant_clip,
const ClipPaintPropertyNode& ancestor_clip,
const TransformPaintPropertyNode& ancestor_transform,
OverlayScrollbarClipBehavior clip_behavior,
VisualRectFlags flags) { … }
bool GeometryMapper::MightOverlapForCompositing(
const gfx::RectF& rect1,
const PropertyTreeState& state1,
const gfx::RectF& rect2,
const PropertyTreeState& state2) { … }
bool GeometryMapper::MightOverlapForCompositingInternal(
const PropertyTreeState& common_ancestor,
const gfx::RectF& rect1,
const PropertyTreeState& state1,
const gfx::RectF& rect2,
const PropertyTreeState& state2) { … }
gfx::RectF GeometryMapper::VisualRectForCompositingOverlap(
const gfx::RectF& local_rect,
const PropertyTreeState& local_state,
const PropertyTreeState& ancestor_state) { … }
void GeometryMapper::MapVisualRectAboveScrollForCompositingOverlap(
const TransformPaintPropertyNode& scroll_translation,
gfx::RectF& rect,
PropertyTreeState& state) { … }
bool GeometryMapper::LocalToAncestorVisualRectInternalForTesting(
const PropertyTreeState& local_state,
const PropertyTreeState& ancestor_state,
FloatClipRect& mapping_rect) { … }
bool GeometryMapper::
LocalToAncestorVisualRectInternalForCompositingOverlapForTesting(
const PropertyTreeState& local_state,
const PropertyTreeState& ancestor_state,
FloatClipRect& mapping_rect) { … }
std::optional<gfx::RectF> GeometryMapper::VisibilityLimit(
const PropertyTreeState& state) { … }
void GeometryMapper::ClearCache() { … }
}