Commit 58957734 authored by Caleb Raitto's avatar Caleb Raitto Committed by Commit Bot

Modify dactyloscoper to support more typed array variations.

This includes supporting MaybeShared and raw pointers in addition to
NotShared, and supporting all view types.

Bug: 973801
Change-Id: I6bf50dbda181ee33a47b12618601302eb50dba98
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2432813
Commit-Queue: Caleb Raitto <caraitto@chromium.org>
Reviewed-by: default avatarNate Chapin <japhet@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811008}
parent f3e77f47
......@@ -87,13 +87,12 @@ void Dactyloscoper::RecordDirectSurface(ExecutionContext* context,
}
// static
void Dactyloscoper::RecordDirectSurface(
ExecutionContext* context,
WebFeature feature,
const NotShared<DOMFloat32Array>& buffer) {
void Dactyloscoper::RecordDirectSurface(ExecutionContext* context,
WebFeature feature,
const DOMArrayBufferView* buffer) {
if (!context || !IsStudyEnabled(feature))
return;
if (buffer.IsNull() || buffer->lengthAsSizeT() == 0)
if (!buffer || buffer->byteLengthAsSizeT() == 0)
return;
IdentifiableTokenBuilder builder(
base::make_span(static_cast<uint8_t*>(buffer->BaseAddress()),
......
......@@ -42,10 +42,22 @@ class CORE_EXPORT Dactyloscoper {
const Vector<String>&);
static void RecordDirectSurface(ExecutionContext*,
WebFeature,
const NotShared<DOMFloat32Array>&);
const DOMArrayBufferView*);
static void RecordDirectSurface(ExecutionContext*,
WebFeature,
SVGStringListTearOff*);
static void RecordDirectSurface(
ExecutionContext* context,
WebFeature feature,
const NotShared<DOMArrayBufferView>& not_shared) {
Dactyloscoper::RecordDirectSurface(context, feature, not_shared.Get());
}
static void RecordDirectSurface(
ExecutionContext* context,
WebFeature feature,
const MaybeShared<DOMArrayBufferView>& maybe_shared) {
Dactyloscoper::RecordDirectSurface(context, feature, maybe_shared.Get());
}
template <typename T>
static void RecordDirectSurface(ExecutionContext* context,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment