chromium/third_party/blink/renderer/platform/graphics/paint/scrollbar_display_item.h

// Copyright 2019 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_PLATFORM_GRAPHICS_PAINT_SCROLLBAR_DISPLAY_ITEM_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_GRAPHICS_PAINT_SCROLLBAR_DISPLAY_ITEM_H_

#include "base/dcheck_is_on.h"
#include "cc/input/hit_test_opaqueness.h"
#include "cc/input/scrollbar.h"
#include "third_party/blink/renderer/platform/graphics/compositor_element_id.h"
#include "third_party/blink/renderer/platform/graphics/paint/display_item.h"
#include "third_party/blink/renderer/platform/graphics/paint/paint_record.h"
#include "third_party/blink/renderer/platform/heap/persistent.h"
#include "third_party/blink/renderer/platform/wtf/casting.h"

namespace cc {
class ScrollbarLayerBase;
}

namespace blink {

class DisplayItemClient;
class GraphicsContext;
class TransformPaintPropertyNode;

// During paint, we create a ScrollbarDisplayItem for a non-custom scrollbar.
// During PaintArtifactCompositor::Update(), we decide whether to composite the
// scrollbar and, if not composited, call Paint() to actually paint the
// scrollbar into a paint record, otherwise call CreateLayer() to create a cc
// scrollbar layer.
class PLATFORM_EXPORT ScrollbarDisplayItem final : public DisplayItem {};

template <>
struct DowncastTraits<ScrollbarDisplayItem> {};

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_GRAPHICS_PAINT_SCROLLBAR_DISPLAY_ITEM_H_