#include "cc/layers/painted_scrollbar_layer_impl.h"
#include <algorithm>
#include "base/memory/ptr_util.h"
#include "cc/input/scrollbar.h"
#include "cc/input/scrollbar_animation_controller.h"
#include "cc/layers/layer.h"
#include "cc/trees/layer_tree_impl.h"
#include "cc/trees/layer_tree_settings.h"
#include "cc/trees/occlusion.h"
#include "components/viz/common/quads/solid_color_draw_quad.h"
#include "components/viz/common/quads/texture_draw_quad.h"
#include "ui/gfx/geometry/rect_conversions.h"
namespace cc {
std::unique_ptr<PaintedScrollbarLayerImpl> PaintedScrollbarLayerImpl::Create(
LayerTreeImpl* tree_impl,
int id,
ScrollbarOrientation orientation,
bool is_left_side_vertical_scrollbar,
bool is_overlay) { … }
PaintedScrollbarLayerImpl::PaintedScrollbarLayerImpl(
LayerTreeImpl* tree_impl,
int id,
ScrollbarOrientation orientation,
bool is_left_side_vertical_scrollbar,
bool is_overlay)
: … { … }
PaintedScrollbarLayerImpl::~PaintedScrollbarLayerImpl() = default;
mojom::LayerType PaintedScrollbarLayerImpl::GetLayerType() const { … }
std::unique_ptr<LayerImpl> PaintedScrollbarLayerImpl::CreateLayerImpl(
LayerTreeImpl* tree_impl) const { … }
void PaintedScrollbarLayerImpl::PushPropertiesTo(LayerImpl* layer) { … }
float PaintedScrollbarLayerImpl::OverlayScrollbarOpacity() const { … }
bool PaintedScrollbarLayerImpl::WillDraw(
DrawMode draw_mode,
viz::ClientResourceProvider* resource_provider) { … }
void PaintedScrollbarLayerImpl::AppendQuads(
viz::CompositorRenderPass* render_pass,
AppendQuadsData* append_quads_data) { … }
void PaintedScrollbarLayerImpl::AppendThumbQuads(
viz::CompositorRenderPass* render_pass,
AppendQuadsData* append_quads_data) const { … }
void PaintedScrollbarLayerImpl::AppendTrackAndButtonsQuads(
viz::CompositorRenderPass* render_pass,
AppendQuadsData* append_quads_data) { … }
void PaintedScrollbarLayerImpl::AppendNinePatchScaledTrackAndButtons(
viz::CompositorRenderPass* render_pass,
viz::SharedQuadState* shared_quad_state,
gfx::Rect& track_and_buttons_quad_rect) { … }
gfx::Rect PaintedScrollbarLayerImpl::GetEnclosingVisibleRectInTargetSpace()
const { … }
gfx::Rect PaintedScrollbarLayerImpl::ComputeThumbQuadRect() const { … }
gfx::Rect PaintedScrollbarLayerImpl::ComputeHitTestableThumbQuadRect() const { … }
gfx::Rect PaintedScrollbarLayerImpl::ComputeHitTestableExpandedThumbQuadRect()
const { … }
gfx::Rect PaintedScrollbarLayerImpl::CenterSolidColorThumb(
gfx::Rect thumb_rect) const { … }
gfx::Rect PaintedScrollbarLayerImpl::ExpandSolidColorThumb(
gfx::Rect thumb_rect) const { … }
void PaintedScrollbarLayerImpl::SetJumpOnTrackClick(bool jump_on_track_click) { … }
bool PaintedScrollbarLayerImpl::JumpOnTrackClick() const { … }
void PaintedScrollbarLayerImpl::SetSupportsDragSnapBack(
bool supports_drag_snap_back) { … }
void PaintedScrollbarLayerImpl::SetTrackAndButtonsImageBounds(
const gfx::Size& bounds) { … }
void PaintedScrollbarLayerImpl::SetTrackAndButtonsAperture(
const gfx::Rect& aperture) { … }
void PaintedScrollbarLayerImpl::SetThumbColor(SkColor4f thumb_color) { … }
bool PaintedScrollbarLayerImpl::SupportsDragSnapBack() const { … }
void PaintedScrollbarLayerImpl::SetThumbThickness(int thumb_thickness) { … }
int PaintedScrollbarLayerImpl::ThumbThickness() const { … }
void PaintedScrollbarLayerImpl::SetThumbLength(int thumb_length) { … }
int PaintedScrollbarLayerImpl::ThumbLength() const { … }
int PaintedScrollbarLayerImpl::TrackStart() const { … }
void PaintedScrollbarLayerImpl::SetBackButtonRect(gfx::Rect back_button_rect) { … }
gfx::Rect PaintedScrollbarLayerImpl::BackButtonRect() const { … }
void PaintedScrollbarLayerImpl::SetForwardButtonRect(
gfx::Rect forward_button_rect) { … }
gfx::Rect PaintedScrollbarLayerImpl::ForwardButtonRect() const { … }
gfx::Rect PaintedScrollbarLayerImpl::BackTrackRect() const { … }
gfx::Rect PaintedScrollbarLayerImpl::ForwardTrackRect() const { … }
void PaintedScrollbarLayerImpl::SetTrackRect(gfx::Rect track_rect) { … }
void PaintedScrollbarLayerImpl::SetScrollbarPaintedOpacity(float opacity) { … }
float PaintedScrollbarLayerImpl::TrackLength() const { … }
bool PaintedScrollbarLayerImpl::IsThumbResizable() const { … }
LayerTreeSettings::ScrollbarAnimator
PaintedScrollbarLayerImpl::GetScrollbarAnimator() const { … }
}