chromium/third_party/blink/renderer/platform/graphics/paint/cull_rect.cc

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

#include "third_party/blink/renderer/platform/graphics/paint/cull_rect.h"

#include "base/containers/adapters.h"
#include "base/feature_list.h"
#include "base/metrics/field_trial_params.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/renderer/platform/graphics/paint/geometry_mapper.h"
#include "third_party/blink/renderer/platform/graphics/paint/scroll_paint_property_node.h"
#include "third_party/blink/renderer/platform/graphics/paint/transform_paint_property_node.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/blink/renderer/platform/transforms/affine_transform.h"
#include "ui/gfx/geometry/rect_conversions.h"
#include "ui/gfx/geometry/rect_f.h"

namespace blink {

namespace {

constexpr int kReasonablePixelLimit =;

// This is the size, in css pixels, for which we start using the minimum
// expansion rect if kSmallScrollersUseMinCullRect is enabled.
constexpr int kSmallScrollerArea =;

int ChangedEnoughMinimumDistance(float expansion_ratio) {}

int MinimumLocalPixelDistanceToExpand(float expansion_ratio) {}

// Returns the number of pixels to expand the cull rect for composited scroll
// and transform.
int LocalPixelDistanceToExpand(
    const TransformPaintPropertyNode& root_transform,
    const TransformPaintPropertyNode& local_transform,
    float expansion_ratio) {}

bool CanExpandForScroll(const ScrollPaintPropertyNode& scroll) {}

}  // anonymous namespace

bool CullRect::Intersects(const gfx::Rect& rect) const {}

bool CullRect::IntersectsTransformed(const AffineTransform& transform,
                                     const gfx::RectF& rect) const {}

bool CullRect::IntersectsHorizontalRange(LayoutUnit lo, LayoutUnit hi) const {}

bool CullRect::IntersectsVerticalRange(LayoutUnit lo, LayoutUnit hi) const {}

void CullRect::Move(const gfx::Vector2d& offset) {}

void CullRect::ApplyTransform(const TransformPaintPropertyNode& transform) {}

std::pair<bool, bool> CullRect::ApplyScrollTranslation(
    const TransformPaintPropertyNode& root_transform,
    const TransformPaintPropertyNode& scroll_translation,
    float expansion_ratio) {}

bool CullRect::ApplyPaintPropertiesWithoutExpansion(
    const PropertyTreeState& source,
    const PropertyTreeState& destination) {}

bool CullRect::ApplyPaintProperties(
    const PropertyTreeState& root,
    const PropertyTreeState& source,
    const PropertyTreeState& destination,
    const std::optional<CullRect>& old_cull_rect,
    float expansion_ratio) {}

bool CullRect::ChangedEnough(const std::pair<bool, bool>& expanded,
                             const CullRect& old_cull_rect,
                             const std::optional<gfx::Rect>& expansion_bounds,
                             float expansion_ratio) const {}

bool CullRect::HasScrolledEnough(
    const gfx::Vector2dF& delta,
    const TransformPaintPropertyNode& scroll_translation,
    float expansion_ratio) {}

}  // namespace blink