#include "third_party/blink/renderer/core/paint/nine_piece_image_painter.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/inspector/inspector_trace_events.h"
#include "third_party/blink/renderer/core/layout/geometry/physical_rect.h"
#include "third_party/blink/renderer/core/paint/nine_piece_image_grid.h"
#include "third_party/blink/renderer/core/paint/paint_auto_dark_mode.h"
#include "third_party/blink/renderer/core/style/computed_style.h"
#include "third_party/blink/renderer/core/style/nine_piece_image.h"
#include "third_party/blink/renderer/platform/graphics/graphics_context.h"
#include "third_party/blink/renderer/platform/graphics/scoped_image_rendering_settings.h"
#include "ui/gfx/geometry/outsets.h"
#include "ui/gfx/geometry/size.h"
namespace blink {
namespace {
std::optional<float> CalculateSpaceNeeded(const float destination,
const float source) { … }
struct TileParameters { … };
std::optional<TileParameters> ComputeTileParameters(
ENinePieceImageRule tile_rule,
float dst_extent,
float src_extent) { … }
bool ShouldTile(const NinePieceImageGrid::NinePieceDrawInfo& draw_info) { … }
void PaintPieces(GraphicsContext& context,
const PhysicalRect& border_image_rect,
const ComputedStyle& style,
const Document& document,
const NinePieceImage& nine_piece_image,
Image& image,
const gfx::SizeF& unzoomed_image_size,
PhysicalBoxSides sides_to_include) { … }
}
bool NinePieceImagePainter::Paint(GraphicsContext& graphics_context,
const ImageResourceObserver& observer,
const Document& document,
Node* node,
const PhysicalRect& rect,
const ComputedStyle& style,
const NinePieceImage& nine_piece_image,
PhysicalBoxSides sides_to_include) { … }
}