#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "ui/gfx/nine_image_painter.h"
#include <stddef.h>
#include <limits>
#include "base/numerics/safe_conversions.h"
#include "cc/paint/paint_flags.h"
#include "third_party/skia/include/core/SkRect.h"
#include "third_party/skia/include/core/SkScalar.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/rect_conversions.h"
#include "ui/gfx/geometry/skia_conversions.h"
#include "ui/gfx/image/image_skia_operations.h"
#include "ui/gfx/image/image_skia_rep.h"
#include "ui/gfx/scoped_canvas.h"
namespace gfx {
namespace {
int ImageRepWidthInPixels(const ImageSkiaRep& rep) { … }
int ImageRepHeightInPixels(const ImageSkiaRep& rep) { … }
void Fill(Canvas* c,
const ImageSkiaRep& rep,
int x,
int y,
int w,
int h,
const cc::PaintFlags& flags) { … }
}
NineImagePainter::NineImagePainter(const std::vector<ImageSkia>& images) { … }
NineImagePainter::NineImagePainter(const ImageSkia& image,
const Insets& insets) { … }
NineImagePainter::~NineImagePainter() { … }
bool NineImagePainter::IsEmpty() const { … }
Size NineImagePainter::GetMinimumSize() const { … }
void NineImagePainter::Paint(Canvas* canvas, const Rect& bounds) { … }
void NineImagePainter::Paint(Canvas* canvas,
const Rect& bounds,
const uint8_t alpha) { … }
void NineImagePainter::GetSubsetRegions(const ImageSkia& image,
const Insets& insets,
std::vector<Rect>* regions) { … }
}