chromium/components/paint_preview/common/paint_preview_tracker.cc

// 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.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#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 =;

// Heuristically choose between a dense and sparse glyph usage map.
// TODO(crbug.com/40101107): Gather data to make this heuristic better.
bool ShouldUseDenseGlyphUsage(SkTypeface* typeface) {}

}  // namespace

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) {}

}  // namespace paint_preview