Commit b116d077 authored by Chris Cunningham's avatar Chris Cunningham Committed by Commit Bot

WebCodecs: Add measure IDL attributes

Measure interface usage by constructor calls.

Bug: 1121462
Change-Id: Ibdac55925d918bf86ec5f01b7046b8c54b4671ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2374506
Commit-Queue: Steven Holte <holte@chromium.org>
Reviewed-by: default avatarSteven Holte <holte@chromium.org>
Reviewed-by: default avatarThomas Guilbert <tguilbert@chromium.org>
Auto-Submit: Chrome Cunningham <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#801854}
parent c2b75547
...@@ -2781,6 +2781,11 @@ enum WebFeature { ...@@ -2781,6 +2781,11 @@ enum WebFeature {
kRTCPeerConnectionCreateOffer = 3453, kRTCPeerConnectionCreateOffer = 3453,
kRTCPeerConnectionCreateAnswer = 3454, kRTCPeerConnectionCreateAnswer = 3454,
kV8AuthenticatorAttestationResponse_GetTransports_Method = 3455, kV8AuthenticatorAttestationResponse_GetTransports_Method = 3455,
kWebCodecsAudioDecoder = 3456,
kWebCodecsVideoDecoder = 3457,
kWebCodecsVideoEncoder = 3458,
kWebCodecsVideoTrackReader= 3459,
kWebCodecsImageDecoder = 3460,
// Add new features immediately above this line. Don't change assigned // Add new features immediately above this line. Don't change assigned
// numbers of any item, and don't reuse removed slots. // numbers of any item, and don't reuse removed slots.
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
// construct a new decoder to recover. // construct a new decoder to recover.
// //
// TODO(sandersd): Consider adding a state or last error attribute. // TODO(sandersd): Consider adding a state or last error attribute.
[CallWith=ScriptState, RaisesException] constructor(AudioDecoderInit init); [CallWith=ScriptState, RaisesException, MeasureAs=WebCodecsAudioDecoder] constructor(AudioDecoderInit init);
// The number of pending decode requests. This does not include requests that // The number of pending decode requests. This does not include requests that
// have been sent to the underlying codec. // have been sent to the underlying codec.
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
RuntimeEnabled=WebCodecs, RuntimeEnabled=WebCodecs,
ImplementedAs=ImageDecoderExternal ImplementedAs=ImageDecoderExternal
] interface ImageDecoder { ] interface ImageDecoder {
[CallWith=ScriptState, RaisesException] constructor(ImageDecoderInit init); [CallWith=ScriptState, RaisesException, MeasureAs=WebCodecsImageDecoder] constructor(ImageDecoderInit init);
// Returns true if ImageDecoder supports decoding of the given mime type. // Returns true if ImageDecoder supports decoding of the given mime type.
static boolean canDecodeType(USVString type); static boolean canDecodeType(USVString type);
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
// When in an closed state, all methods will fail. // When in an closed state, all methods will fail.
// //
// TODO(sandersd): Consider adding a state or last error attribute. // TODO(sandersd): Consider adding a state or last error attribute.
[CallWith=ScriptState, RaisesException] constructor(VideoDecoderInit init); [CallWith=ScriptState, RaisesException, MeasureAs=WebCodecsVideoDecoder] constructor(VideoDecoderInit init);
// The number of pending decode requests. This does not include requests that // The number of pending decode requests. This does not include requests that
// have been sent to the underlying codec. // have been sent to the underlying codec.
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
Exposed=Window, Exposed=Window,
RuntimeEnabled=WebCodecs RuntimeEnabled=WebCodecs
] interface VideoEncoder { ] interface VideoEncoder {
[CallWith=ScriptState, RaisesException] [CallWith=ScriptState, RaisesException, MeasureAs=WebCodecsVideoEncoder]
constructor(VideoEncoderInit init); constructor(VideoEncoderInit init);
// The number of pending decode requests. This does not include requests that // The number of pending decode requests. This does not include requests that
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
Exposed=Window, Exposed=Window,
RuntimeEnabled=WebCodecs RuntimeEnabled=WebCodecs
] interface VideoTrackReader { ] interface VideoTrackReader {
[CallWith=ScriptState, RaisesException] [CallWith=ScriptState, RaisesException, MeasureAs=WebCodecsVideoTrackReader]
constructor(MediaStreamTrack track); constructor(MediaStreamTrack track);
[RaisesException] [RaisesException]
......
...@@ -28956,6 +28956,11 @@ Called by update_use_counter_feature_enum.py.--> ...@@ -28956,6 +28956,11 @@ Called by update_use_counter_feature_enum.py.-->
<int value="3454" label="RTCPeerConnectionCreateAnswer"/> <int value="3454" label="RTCPeerConnectionCreateAnswer"/>
<int value="3455" <int value="3455"
label="V8AuthenticatorAttestationResponse_GetTransports_Method"/> label="V8AuthenticatorAttestationResponse_GetTransports_Method"/>
<int value="3456" label="WebCodecsAudioDecoder"/>
<int value="3457" label="WebCodecsVideoDecoder"/>
<int value="3458" label="WebCodecsVideoEncoder"/>
<int value="3459" label="WebCodecsVideoTrackReader"/>
<int value="3460" label="WebCodecsImageDecoder"/>
</enum> </enum>
<enum name="FeaturePolicyAllowlistType"> <enum name="FeaturePolicyAllowlistType">
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