#include "cc/slim/layer.h"
#include <algorithm>
#include <atomic>
#include <utility>
#include <vector>
#include "base/atomic_sequence_num.h"
#include "base/check.h"
#include "base/not_fatal_until.h"
#include "base/ranges/algorithm.h"
#include "cc/paint/filter_operation.h"
#include "cc/slim/layer_tree.h"
#include "cc/slim/layer_tree_impl.h"
#include "components/viz/common/quads/shared_quad_state.h"
namespace cc::slim {
namespace {
base::AtomicSequenceNumber g_next_id;
cc::FilterOperations ToCcFilters(std::vector<cc::slim::Filter> filters) { … }
bool DescendantLayerHasOffsetTag(const Layer* layer) { … }
bool VerifyOffsetTagTree(const Layer* layer) { … }
}
scoped_refptr<Layer> Layer::Create() { … }
Layer::Layer() : … { … }
Layer::~Layer() { … }
void Layer::SetLayerTree(LayerTree* layer_tree) { … }
Layer* Layer::RootLayer() { … }
void Layer::AddChild(scoped_refptr<Layer> child) { … }
void Layer::InsertChild(scoped_refptr<Layer> child, size_t position) { … }
void Layer::InsertChildSlim(scoped_refptr<Layer> child, size_t position) { … }
void Layer::WillAddChildSlim(Layer* child) { … }
void Layer::ReplaceChild(Layer* old_child, scoped_refptr<Layer> new_child) { … }
void Layer::RemoveFromParent() { … }
void Layer::RemoveFromParentSlim() { … }
void Layer::RemoveAllChildren() { … }
bool Layer::HasAncestor(Layer* layer) const { … }
void Layer::SetParentSlim(Layer* parent) { … }
void Layer::ChangeDrawableDescendantsBySlim(int num) { … }
void Layer::SetPosition(const gfx::PointF& position) { … }
void Layer::SetBounds(const gfx::Size& bounds) { … }
void Layer::SetTransform(const gfx::Transform& transform) { … }
void Layer::SetTransformOrigin(const gfx::PointF& origin) { … }
void Layer::SetIsDrawable(bool drawable) { … }
void Layer::SetBackgroundColor(SkColor4f color) { … }
void Layer::SetContentsOpaque(bool opaque) { … }
void Layer::SetOpacity(float opacity) { … }
void Layer::SetOffsetTag(const viz::OffsetTag& offset_tag) { … }
int Layer::NumDescendantsThatDrawContent() const { … }
void Layer::UpdateDrawsContent() { … }
void Layer::SetHideLayerAndSubtree(bool hide) { … }
void Layer::SetMasksToBounds(bool masks_to_bounds) { … }
void Layer::SetRoundedCorner(const gfx::RoundedCornersF& corner_radii) { … }
void Layer::SetGradientMask(const gfx::LinearGradient& gradient_mask) { … }
bool Layer::HasNonTrivialMaskFilterInfo() const { … }
void Layer::SetFilters(std::vector<Filter> filters) { … }
bool Layer::HasDrawableContent() const { … }
gfx::Transform Layer::ComputeTransformToParent() const { … }
std::optional<gfx::Transform> Layer::ComputeTransformFromParent() const { … }
bool Layer::HasFilters() const { … }
cc::FilterOperations Layer::GetFilters() const { … }
int Layer::GetNumDrawingLayersInSubtree() const { … }
bool Layer::GetAndResetPropertyChanged() { … }
bool Layer::GetAndResetSubtreePropertyChanged() { … }
void Layer::AppendQuads(viz::CompositorRenderPass& render_pass,
FrameData& data,
const gfx::Transform& transform_to_root,
const gfx::Transform& transform_to_target,
const gfx::Rect* clip_in_target,
const gfx::Rect& visible_rect,
float opacity) { … }
viz::SharedQuadState* Layer::CreateAndAppendSharedQuadState(
viz::CompositorRenderPass& render_pass,
FrameData& data,
const gfx::Transform& transform_to_target,
const gfx::Rect* clip_in_target,
const gfx::Rect& visible_rect,
float opacity) { … }
void Layer::NotifySubtreeChanged() { … }
void Layer::NotifyPropertyChanged() { … }
}