#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "components/paint_preview/common/paint_preview_tracker.h"
#include <stdint.h>
#include <string>
#include <utility>
#include "base/check.h"
#include "base/containers/contains.h"
#include "base/not_fatal_until.h"
#include "components/paint_preview/common/glyph_usage.h"
#include "components/paint_preview/common/mojom/paint_preview_recorder.mojom.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkMatrix.h"
#include "third_party/skia/include/core/SkTextBlob.h"
#include "third_party/skia/include/core/SkTypeface.h"
#include "ui/gfx/geometry/rect.h"
#include "url/gurl.h"
namespace paint_preview {
namespace {
constexpr int kMaxGlyphsForDenseGlyphUsage = …;
bool ShouldUseDenseGlyphUsage(SkTypeface* typeface) { … }
}
PaintPreviewTracker::PaintPreviewTracker(
const base::UnguessableToken& guid,
const std::optional<base::UnguessableToken>& embedding_token,
bool is_main_frame)
: … { … }
PaintPreviewTracker::~PaintPreviewTracker() { … }
void PaintPreviewTracker::Save() { … }
void PaintPreviewTracker::SetMatrix(const SkMatrix& matrix) { … }
void PaintPreviewTracker::Restore() { … }
void PaintPreviewTracker::Concat(const SkMatrix& matrix) { … }
void PaintPreviewTracker::Scale(SkScalar x, SkScalar y) { … }
void PaintPreviewTracker::Rotate(SkScalar degrees) { … }
void PaintPreviewTracker::Translate(SkScalar x, SkScalar y) { … }
uint32_t PaintPreviewTracker::CreateContentForRemoteFrame(
const gfx::Rect& rect,
const base::UnguessableToken& embedding_token) { … }
void PaintPreviewTracker::AddGlyphs(const SkTextBlob* blob) { … }
void PaintPreviewTracker::AnnotateLink(const GURL& url, const SkRect& rect) { … }
void PaintPreviewTracker::TransformClipForFrame(uint32_t id) { … }
void PaintPreviewTracker::CustomDataToSkPictureCallback(SkCanvas* canvas,
uint32_t content_id) { … }
void PaintPreviewTracker::MoveLinks(std::vector<mojom::LinkDataPtr>* out) { … }
}