<!--
Copyright 2020 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<!--
This file is used to generate a comprehensive list of GPU histograms
along with a detailed description for each histogram.

For best practices on writing histogram descriptions, see
https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histograms/README.md

Please follow the instructions in the OWNERS file in this directory to find a
reviewer. If no OWNERS file exists, please consider signing up at
go/reviewing-metrics (Googlers only), as all subdirectories are expected to
have an OWNERS file. As a last resort you can send the CL to
chromium-metrics-reviews@google.com.
-->

<histogram-configuration>

<histograms>

<variants name="WebGPUAdapterType">
  <variant name="Discrete" summary="discrete"/>
  <variant name="Integrated" summary="integrated"/>
</variants>

<variants name="WebGPUCacheable">
  <variant name="D3D11.CompileShader"/>
  <variant name="D3D12.CompileShader"/>
  <variant name="D3D12.CreateComputePipelineState"/>
  <variant name="D3D12.CreateGraphicsPipelineState"/>
  <variant name="Metal.CompileShaderToMSL"/>
  <variant name="OpenGL.CompileShaderToGLSL"/>
  <variant name="Vulkan.CompileShaderToSPIRV"/>
  <variant name="Vulkan.CreateComputePipelines"/>
  <variant name="Vulkan.CreateGraphicsPipelines"/>
</variants>

<variants name="WebGPUModule">
  <variant name="ComputePipeline"/>
  <variant name="RenderPipeline"/>
  <variant name="ShaderModule"/>
</variants>

<histogram name="ConfigureDisplays.External.Modeset.AttemptSucceeded"
    enum="BooleanSuccess" expires_after="2024-04-01">
  <owner>gildekel@chromium.org</owner>
  <owner>chromeos-gfx-display@chromium.org</owner>
  <summary>
    Modeset attempt result of an external display. Every time an external
    display is connected/disconnected, or when the display mode of the external
    screen is changed by the user, Chrome attempts to modeset the display. This
    metric tracks the result of those attempts. Resolution and RefreshRate
    metrics will be recorded for each attempt.
  </summary>
</histogram>

<histogram name="ConfigureDisplays.External.Modeset.FinalStatus"
    enum="BooleanSuccess" expires_after="2024-04-01">
  <owner>gildekel@chromium.org</owner>
  <owner>chromeos-gfx-display@chromium.org</owner>
  <summary>
    Modeset attempt result of an internal display. This is recorded after Chrome
    attempted all the available modes and finally modeset the display. All the
    previously attempted modes and refreshes, including the successful one will
    be recorded.
  </summary>
</histogram>

<histogram name="ConfigureDisplays.Internal.Modeset.AttemptSucceeded"
    enum="BooleanSuccess" expires_after="2024-04-01">
  <owner>gildekel@chromium.org</owner>
  <owner>chromeos-gfx-display@chromium.org</owner>
  <summary>
    Modeset attempt result of an internal display. Chrome might try additional
    modes after a failed attempt. Every time an external display is
    connected/disconnected, or when the display mode of the external screen is
    changed by the user, Chrome attempts to modeset the display. This metric
    tracks the result of those attempts. Resolution and RefreshRate metrics will
    be recorded for each attempt.
  </summary>
</histogram>

<histogram name="ConfigureDisplays.Internal.Modeset.FinalStatus"
    enum="BooleanSuccess" expires_after="2024-04-01">
  <owner>gildekel@chromium.org</owner>
  <owner>chromeos-gfx-display@chromium.org</owner>
  <summary>
    Modeset attempt result of an internal display. This is recorded after Chrome
    attempted all the available modes and finally modeset the display. All the
    previously attempted modes and refreshes, including the successful one will
    be recorded.
  </summary>
</histogram>

<histogram name="ConfigureDisplays.Modeset.FinalTaskStatus"
    enum="ConfigureDisplaysTaskStatus" expires_after="2024-07-01">
  <owner>gildekel@chromium.org</owner>
  <owner>chromeos-gfx-display@chromium.org</owner>
  <summary>
    The final result of a configuration attempt across all displays. This is
    recorded every time Chrome configures all connected displays, or fails to do
    so after exhausting all available modes in one (or more) of the displays.

    Partial success occurs when a configuration is successful, but not with the
    requested resolution/refresh rate for one (or more) of the connected
    displays (e.g. a display fails to modeset at 4k@60Hz, but succeeds at
    1440p@60Hz).
  </summary>
</histogram>

<histogram name="ConfigureDisplays.Modeset.MstExternalDisplaysCount"
    units="count" expires_after="2024-04-01">
  <owner>gildekel@chromium.org</owner>
  <owner>chromeos-gfx-display@chromium.org</owner>
  <summary>
    Total number of external displays connected via MST and being configured.
    This is recorded every time an external display is connected/disconnected,
    or when the display mode of a screen is about to change.
  </summary>
</histogram>

<histogram name="ConfigureDisplays.Modeset.MstExternalDisplaysPercentage"
    units="%" expires_after="2024-04-01">
  <owner>gildekel@chromium.org</owner>
  <owner>chromeos-gfx-display@chromium.org</owner>
  <summary>
    Percentage of external displays connected via MST and being configured. This
    is recorded every time an external display is connected/disconnected, or
    when the display mode of a screen is about to change.
  </summary>
</histogram>

<histogram name="ConfigureDisplays.Modeset.TotalExternalDisplaysCount"
    units="count" expires_after="2024-04-01">
  <owner>gildekel@chromium.org</owner>
  <owner>chromeos-gfx-display@chromium.org</owner>
  <summary>
    Total number of external displays being configured. This is recorded every
    time an external display is connected/disconnected, or when the display mode
    of a screen is about to change.
  </summary>
</histogram>

<histogram name="ConfigureDisplays.{Connection}.Modeset.Success.RefreshRate"
    units="Hz" expires_after="2024-04-01">
  <owner>gildekel@chromium.org</owner>
  <owner>chromeos-gfx-display@chromium.org</owner>
  <summary>
    Tracks an {Connection} display's resulting refresh rate after a successful
    display configuration.
  </summary>
  <token key="Connection">
    <variant name="External" summary="external"/>
    <variant name="Internal" summary="internal"/>
  </token>
</histogram>

<histogram name="ConfigureDisplays.{Connection}.Modeset.{Report}.Resolution"
    enum="DisplayResolution" expires_after="2024-04-01">
  <owner>gildekel@chromium.org</owner>
  <owner>chromeos-gfx-display@chromium.org</owner>
  <summary>{Connection} {Report}</summary>
  <token key="Connection">
    <variant name="External" summary="Tracks an external display's"/>
    <variant name="Internal" summary="Tracks an internal display's"/>
  </token>
  <token key="Report">
    <variant name="OriginalRequest"
        summary="original resolution request during display configuration."/>
    <variant name="Success"
        summary="resulting resolution after a successful display
                 configuration."/>
  </token>
</histogram>

<histogram name="Display.External.BlockZeroSerialNumberType"
    enum="BlockZeroSerialNumberType" expires_after="2024-04-01">
  <owner>gildekel@chromium.org</owner>
  <owner>chromeos-gfx-display@google.com</owner>
  <summary>
    The type of serial number retrieved from block zero of a display's EDID
    during EDID parsing.
  </summary>
</histogram>

<histogram name="Display.External.NumOfSerialNumbersProvided" units="count"
    expires_after="2024-04-01">
  <owner>gildekel@chromium.org</owner>
  <owner>chromeos-gfx-display@google.com</owner>
  <summary>
    The number of serial numbers provided in an EDID (i.e. via block zero and/or
    the serial number descriptor block). Values should be in the range of 0-2.
  </summary>
</histogram>

<histogram name="Display.External.ParseEdidOptionals" enum="ParseEdidOptionals"
    expires_after="2024-04-01">
  <owner>gildekel@chromium.org</owner>
  <owner>chromeos-gfx-display@google.com</owner>
  <summary>
    The availability (or lack thereof) of tracked optional fields during EDID
    parsing of external.
  </summary>
</histogram>

<histogram name="Display.MultipleDisplays.GenerateId.CollisionDetection"
    enum="BooleanDisplayIdCollision" expires_after="2024-04-01">
  <owner>gildekel@chromium.org</owner>
  <owner>chromeos-gfx-display@google.com</owner>
  <summary>
    Whether or not multiple connected displays produced identical display IDs
    due to incomplete EDIDs. This may occur when identical displays (same make
    and model) lack serial numbers in both the EDID's block zero or S/N
    descriptor block. Recorded every time Chrome OS detects a change in display
    configuration and attempts to get an updated list of available displays.
  </summary>
</histogram>

<histogram name="Display.ParseEdidFailure" enum="ParseEdidFailure"
    expires_after="2024-04-01">
  <owner>gildekel@chromium.org</owner>
  <owner>chromeos-gfx-display@google.com</owner>
  <summary>
    Type of failure that occurs during EDID parsing. Typically the failure is
    caused by a mismatch between the EDID size and the expected offset of the
    data component.
  </summary>
</histogram>

<histogram name="GPU.ANGLE.Buffer11CPUMemoryMB" units="MB"
    expires_after="2020-05-10">
  <owner>cwallez@chromium.org</owner>
  <summary>
    The sum of the size of the CPU-side memory allocations of Buffer11's copies
    (vs. GPU memory allocations). These allocations are used when modifying the
    buffer data on the CPU or when transfering to GPU memory via DMA.
  </summary>
</histogram>

<histogram name="GPU.ANGLE.D3D11CreateDeviceError" enum="Hresult"
    expires_after="2024-01-28">
  <owner>jonahr@google.com</owner>
  <owner>angle-team@google.com</owner>
  <summary>
    An extended Windows error code returned from D3D11CreateDevice on error when
    ANGLE's D3D backend is in use. Can be almost any valid HRESULT or DXGI error
    code, which are listed at
    https://msdn.microsoft.com/en-us/library/windows/desktop/bb509553.aspx.
  </summary>
</histogram>

<histogram name="GPU.ANGLE.D3D11FeatureLevel" enum="D3DFeatureLevel"
    expires_after="2024-03-24">
  <owner>jonahr@google.com</owner>
  <owner>angle-team@google.com</owner>
  <summary>
    The maxmium supported (or currently requested) Direct3D feature level in
    D3D11 ANGLE. We support as low as 9.3, and as high as 11.1, though Chrome
    should only use 10.0+ for D3D11. Gives an indication of how new a user's
    video card is, what features it supports, and it's general speed tier.
    Recorded on D3D device initialization, loss, or reset when ANGLE's D3D
    backend is in use.
  </summary>
</histogram>

<histogram name="GPU.ANGLE.D3D11InitializeResult" enum="D3D11InitializeResult"
    expires_after="2024-03-24">
  <owner>jonahr@google.com</owner>
  <owner>angle-team@google.com</owner>
  <summary>
    The result from initializing a D3D11 device in ANGLE. Can be success, or one
    of several error codes which indicate different reasons for failing.
    Recorded on D3D11 device initialization when ANGLE's D3D backend is in use.
  </summary>
</histogram>

<histogram name="GPU.ANGLE.D3D9InitializeResult" enum="D3D9InitializeResult"
    expires_after="2024-03-24">
  <owner>jonahr@google.com</owner>
  <owner>angle-team@google.com</owner>
  <summary>
    The result from initializing a D3D9 device in ANGLE. Can be success, or one
    of several error codes which indicate different reasons for failing.
    Recorded on D3D9 device initialization when ANGLE's D3D backend is in use.
  </summary>
</histogram>

<histogram name="GPU.ANGLE.D3DShaderBlobSizeKB" units="KB"
    expires_after="2024-02-20">
  <owner>geofflang@chromium.org</owner>
  <owner>angle-team@google.com</owner>
  <summary>The size of compiled D3D shader bytecode.</summary>
</histogram>

<histogram name="GPU.ANGLE.D3DShaderCompilationTimeUs" units="microseconds"
    expires_after="2024-02-20">
  <owner>geofflang@chromium.org</owner>
  <owner>angle-team@google.com</owner>
  <summary>
    The time it takes for fxc to compile HLSL to D3D bytecode. Recorded for all
    clients regardless of support for high resolution timers.
  </summary>
</histogram>

<histogram name="GPU.ANGLE.MetalShader.CacheHitCount" units="count"
    expires_after="2024-02-20">
  <owner>sky@chromium.org</owner>
  <owner>angle-team@google.com</owner>
  <summary>
    An integer that is logged shortly after the gpu process starts up. The value
    is the number of shaders that were needed and were available in the shader
    cache.
  </summary>
</histogram>

<histogram name="GPU.ANGLE.MetalShader.CacheMissCount" units="count"
    expires_after="2024-02-20">
  <owner>sky@chromium.org</owner>
  <owner>angle-team@google.com</owner>
  <summary>
    An integer that is logged shortly after the gpu process starts up. The value
    is the number of shaders that were needed and were not in the shader cache.
  </summary>
</histogram>

<histogram name="GPU.ANGLE.MetalShaderCompilationTimeUs" units="microseconds"
    expires_after="2024-02-20">
  <owner>geofflang@chromium.org</owner>
  <owner>angle-team@google.com</owner>
  <summary>
    The time it takes for the Metal driver to compile a shader with the
    newLibraryFromSource function. Recorded for all clients regardless of
    support for high resolution timers.
  </summary>
</histogram>

<histogram name="GPU.ANGLE.MetalShaderInBlobCache" enum="Boolean"
    expires_after="2024-02-20">
  <owner>sky@chromium.org</owner>
  <owner>angle-team@google.com</owner>
  <summary>
    A boolean that is logged for each shader program. A value of true means the
    metallib for the shader existed in blob-cache. A value of false means the
    metallib for the shader did not exist in blob-cache.
  </summary>
</histogram>

<histogram name="GPU.ANGLE.SupportsDXGI1_2" enum="BooleanSupported"
    expires_after="2023-09-17">
  <owner>jonahr@google.com</owner>
  <owner>angle-team@google.com</owner>
  <summary>
    Windows computers running Windows 8+, or running Windows 7 with a platform
    update, support the newer version of DXGI. This update also indicates the
    computer is capable of running Direct3D 11.1 if the hardware supports it.
    Recorded on D3D11 device initialization when ANGLE's D3D backend is in use.
  </summary>
</histogram>

<histogram name="GPU.ANGLE.SyncFromNativeContextMicroseconds"
    units="microseconds" expires_after="2023-12-01">
  <owner>blundell@chromium.org</owner>
  <owner>geofflang@chromium.org</owner>
  <owner>vasilyt@chromium.org</owner>
  <owner>angle-team@google.com</owner>
  <summary>
    Tracks the amount of time that it took for WebView to save HWUI's GL state
    when using ANGLE (when not using ANGLE, the corresponding interval is
    recorded as Android.WebView.Gfx.SaveHWUIStateNonANGLEMicroseconds; the
    method of recording is not quite identical, but the two metrics should be
    comparable at a high level). Recorded once per saving of HWUI state when
    drawing with GL. Recorded for all clients as ANGLE does not support checking
    for high-resolution clocks (in practice, all Android devices have
    high-resolution clocks).
  </summary>
</histogram>

<histogram name="GPU.AppHelpIsLoaded" enum="Boolean" expires_after="2024-02-27">
  <owner>zmo@chromium.org</owner>
  <owner>spvw@chromium.org</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    Records whether AppHelp.dll is loaded at GPU initialization. Only recorded
    on Windows platform at GPU process launch time.

    It is not yet known what exactly is triggering the load of AppHelp.dll, and
    so we can't be sure that AppHelp.dll won't be loaded after this is
    collected, even if this metric is false.

    A bug tracking metric collection related to the application compatibility
    layer can be found at crbug.com/1357617.

    Part of a performance investigation that Catan is doing into GPU startup
    time.
  </summary>
</histogram>

<histogram name="GPU.BlocklistFeatureTestResults"
    enum="GPUBlocklistFeatureTestResults" expires_after="2024-02-11">
  <owner>vmiura@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    Counts number of browser invocations for which a GPU feature is
    allowed/blocklisted/disabled.
  </summary>
</histogram>

<histogram name="GPU.BlocklistTestResultsPerEntry"
    enum="GPUBlocklistTestResultPerEntry" expires_after="2022-07-03">
  <owner>vmiura@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    Counts number of browser invocations for which the GPU process is blocked
    due to a blocklist entry match.
  </summary>
</histogram>

<histogram name="GPU.CanvasOopRaster.OopRasterAndGpuAcceleration"
    enum="CanvasOopRasterAndGpuAcceleration" expires_after="2024-03-17">
  <owner>vasilyt@chromium.org</owner>
  <owner>nazabris@microsoft.com</owner>
  <owner>jochin@microsoft.com</owner>
  <summary>
    Records, during GPU process initialization, the combination of the following
    two features being enabled/disabled: 1) Accelerated 2D Canvas 2) OOP
    Rasterization of Canvas.
  </summary>
</histogram>

<histogram name="GPU.CompositingMode" enum="CompositingMode"
    expires_after="never">
  <owner>kylechar@chromium.org</owner>
  <summary>
    Records what compositing mode (software, GL, etc.) Chrome is using every
    five minutes. This is the default compositing mode that most windows will
    use. There are some window types (eg. menus on some platforms) that always
    use software compositing and ignore the default.
  </summary>
</histogram>

<histogram name="GPU.ContextLost" enum="ContextLostReason"
    expires_after="2024-03-17">
  <owner>sievers@chromium.org</owner>
  <summary>
    The reason a GPU command buffer context of a given type was lost.
  </summary>
</histogram>

<histogram name="GPU.D3D11_B8G8R8A8_RenderTargetSupport" enum="BooleanSuccess"
    expires_after="M85">
  <owner>vmiura@chromium.org</owner>
  <summary>Whether D3D11 supports B8G8R8A8 format for render targets.</summary>
</histogram>

<histogram name="GPU.D3D11_B8G8R8A8_Texture2DSupport" enum="BooleanSuccess"
    expires_after="M85">
  <owner>vmiura@chromium.org</owner>
  <summary>Whether D3D11 supports B8G8R8A8 format for 2D textures.</summary>
</histogram>

<histogram name="GPU.D3D11FeatureLevel" enum="D3D11FeatureLevel"
    expires_after="2024-02-25">
  <owner>zmo@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    Records the highest D3D_FEATURE_LEVEL available, collected in the info
    collection GPU process, once per UMA ping. This is Windows platform only.
  </summary>
</histogram>

<histogram name="GPU.D3D12FeatureLevel" enum="D3D12FeatureLevel"
    expires_after="2024-02-25">
  <owner>magchen@chromium.org</owner>
  <owner>zmo@chromium.org</owner>
  <summary>
    The maximum D3D12 feature level supported in the gpu drivers. It is recorded
    in the browser process 120 seconds after the browser launch.
  </summary>
</histogram>

<histogram name="GPU.D3D12HighestShaderModel2" enum="D3DShaderModel"
    expires_after="2024-02-25">
  <owner>magchen@chromium.org</owner>
  <owner>zmo@chromium.org</owner>
  <owner>amaiorano@google.com</owner>
  <summary>
    The maximum supported D3D shader model version on a D3D12 device. It is
    recorded in the browser process 120 seconds after the browser launch. Note
    that the &quot;2&quot; suffix was added when a fix was made in how this stat
    is collected: the previous unsuffixed version would store
    &quot;unknown/unsupported&quot; on systems that supported shader model 5.1
    to 6.5, but were unaware of 6.6. The suffixed version correctly stores the
    highest supported shader model.
  </summary>
</histogram>

<histogram name="GPU.D3DShaderModel" enum="ShaderModel"
    expires_after="2024-03-24">
  <owner>jonahr@google.com</owner>
  <owner>angle-team@google.com</owner>
  <summary>
    ANGLE's currently active D3D shader model version. Logged once every startup
    of the GPU process, on Windows only. Note that Shader Models 2 and 3 map to
    D3D9 with ANGLE, and 4+ map to D3D11 ANGLE.
  </summary>
</histogram>

<histogram name="GPU.DirectComposition.ApprovedPresentDuration" units="ms"
    expires_after="2022-01-03">
  <owner>sunnyps@chromium.org</owner>
  <owner>zmo@chromium.org</owner>
  <summary>
    If the system approves a swap chain's custom present duration request, this
    is the approved custom present duration. If the swap chain's custom present
    duration request is not approved, this is zero.
  </summary>
</histogram>

<histogram name="GPU.DirectComposition.CompositionMode2.VideoOrCanvas"
    enum="DxgiFramePresentationMode" expires_after="2024-02-04">
  <owner>sunnyps@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    How the Desktop Window Manager presented Chrome's DirectComposition layers
    of video or canvas elements to the screen. Only recorded on Windows. NOTE:
    This metric was expired and not collecting data between 2021-12-31 and
    crrev.com/c/4041850 (M110).
  </summary>
</histogram>

<histogram name="GPU.DirectComposition.CreateSwapChainForComposition"
    enum="Hresult" expires_after="2024-02-11">
  <owner>magchen@chromium.org</owner>
  <owner>zmo@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    HRESULT return value of IDXGIFactory2::CreateSwapChainForComposition.
  </summary>
</histogram>

<histogram name="GPU.DirectComposition.DCLayer.YUVOverlayCount"
    units="overlays" expires_after="2024-01-14">
  <owner>magchen@chromium.org</owner>
  <owner>zmo@chromium.org</owner>
  <summary>
    The number of YUV overlays we are going to present in each frame if the
    number is not 0. Recorded when the overlay processor is called for drawing a
    frame.
  </summary>
</histogram>

<histogram name="GPU.DirectComposition.DCLayerResult.StreamVideo"
    enum="DCLayerResult" expires_after="2021-12-12">
  <owner>sunnyps@chromium.org</owner>
  <owner>zmo@chromium.org</owner>
  <summary>
    Recorded for each stream video quad (on overlay processing) the reason it
    was or wasn't put in an overlay.
  </summary>
</histogram>

<histogram name="GPU.DirectComposition.DCLayerResult.Texture"
    enum="DCLayerResult" expires_after="2023-08-20">
  <owner>sunnyps@chromium.org</owner>
  <owner>zmo@chromium.org</owner>
  <summary>
    Recorded for each texture quad (on overlay processing) the reason it was or
    wasn't put in an overlay. (This metric might be lack of coverage between
    2022-05-01 and 2022-06-24 due to metric expiration.)
  </summary>
</histogram>

<histogram base="true" name="GPU.DirectComposition.DCLayerResult.Video"
    enum="DCLayerResult" expires_after="2024-02-11">
<!-- Name completed by histogram_suffixes name="GPU.ProtectedVideoType" -->

  <owner>magchen@chromium.org</owner>
  <owner>zmo@chromium.org</owner>
  <summary>
    Recorded for each quad (on overlay processing) with protected video type the
    reason it was or wasn't put in an overlay.
  </summary>
</histogram>

<histogram name="GPU.DirectComposition.DcompDeviceCreateSurface" enum="Hresult"
    expires_after="2024-02-11">
  <owner>magchen@chromium.org</owner>
  <owner>zmo@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    HRESULT return value of IDCompositionDevice2::CreateSurface.
  </summary>
</histogram>

<histogram name="GPU.DirectComposition.HardwareOverlaysSupported"
    enum="BooleanOverlaySupported" expires_after="2024-03-03">
  <owner>magchen@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    True if the GPU driver supports hardware overlays. Recorded during Chrome
    GPU initialization and each time the overlay caps change.
  </summary>
</histogram>

<histogram name="GPU.DirectComposition.IsUnderlay" enum="BooleanUnderlay"
    expires_after="2024-02-25">
  <owner>magchen@chromium.org</owner>
  <owner>zmo@chromium.org</owner>
  <summary>
    Recorded for each video quad during the video playback whether it is an
    underlay or an overlay.
  </summary>
</histogram>

<histogram name="GPU.DirectComposition.NumPendingFrames" units="frames"
    expires_after="2020-10-11">
  <owner>sunnyps@chromium.org</owner>
  <owner>zmo@chromium.org</owner>
  <summary>
    Number of presented frames for which presentation queries haven't completed.
    Recorded on each vblank.
  </summary>
</histogram>

<histogram name="GPU.DirectComposition.OverlayFormatUsed3" enum="DXGI_FORMAT"
    expires_after="2024-03-17">
  <owner>sunnyps@chromium.org</owner>
  <owner>zmo@chromium.org</owner>
  <owner>magchen@chromium.org</owner>
  <summary>
    Which overlay format was chosen for YUV overlays. Recorded once per GPU
    process launch only if hardware overlays are supported. (Might be lack of
    metrics coverage between 2022-05-01 and 2022-06-24 due to metric
    expiration.)
  </summary>
</histogram>

<histogram name="GPU.DirectComposition.OverlaysSupported"
    enum="BooleanOverlaySupported" expires_after="2024-03-17">
  <owner>sunnyps@chromium.org</owner>
  <owner>zmo@chromium.org</owner>
  <owner>magchen@chromium.org</owner>
  <summary>
    True if Chrome will try to use DirectComposition overlays. (Might be lack of
    metrics coverage between 2021-10-04 and 2022-06-24 due to metric
    expiration.)
  </summary>
</histogram>

<histogram base="true" name="GPU.DirectComposition.SwapChainCreationResult3"
    enum="Hresult" expires_after="2024-03-03">
<!-- Name completed by histogram_suffixes name="GPU.ProtectedVideoType" -->

  <owner>magchen@chromium.org</owner>
  <owner>zmo@chromium.org</owner>
  <summary>
    Whether creating swap chain for protected video succeeded. Recorded once per
    swap chain creation.
  </summary>
</histogram>

<histogram name="GPU.DirectComposition.SwapChainFormat3" enum="DXGI_FORMAT"
    expires_after="2024-01-14">
  <owner>sunnyps@chromium.org</owner>
  <owner>zmo@chromium.org</owner>
  <owner>magchen@chromium.org</owner>
  <summary>
    What format was used for each overlay swap chain on each swap buffers.
    (Might be lack of metrics coverage between 2020-12-31 and 2022-06-24 due to
    metric expiration.)
  </summary>
</histogram>

<histogram name="GPU.DirectComposition.VideoPresentationMode"
    enum="DirectCompositionVideoPresentationMode" expires_after="2024-02-25">
  <owner>sunnyps@chromium.org</owner>
  <owner>zmo@chromium.org</owner>
  <owner>magchen@chromium.org</owner>
  <summary>
    What code path was used to present a video frame. Recorded on each present.
    (Might be lack of metrics coverage between 2022-03-06 and 2022-06-24 due to
    metric expiration.)
  </summary>
</histogram>

<histogram name="GPU.DriverBugTestResultsPerEntry"
    enum="GpuDriverBugWorkaroundEntry" expires_after="never">
<!-- expires-never: For monitoring new driver bugs. -->

  <owner>vmiura@chromium.org</owner>
  <owner>kbr@chromium.org</owner>
  <owner>zmo@chromium.org</owner>
  <summary>
    For every entry in the gpu driver bug list that is hit on a machine, this
    records the id. Entry 0 is the total number of times that data is recorded.
    It should be recorded whenever new GPU information is received: on startup,
    whenever a GPU process launches, and whenever the active GPU changes.
  </summary>
</histogram>

<histogram name="GPU.EGLDisplayType" enum="EGLDisplayType"
    expires_after="2024-03-17">
  <owner>zmo@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>The display type used to ask for an EGLDisplay.</summary>
</histogram>

<histogram name="GPU.EnsureWorkVisibleDuration" units="microseconds"
    expires_after="2024-02-12">
  <owner>alemate@chromium.org</owner>
  <owner>magchen@chromium.org</owner>
  <owner>oshima@chromium.org</owner>
  <summary>
    Records the duration of EnsureWorkVisible GPU call. Since it's blocking UI
    thread we want to measure it, and this histogram must be active as long as
    this call is still blocking.

    Warning: This metric may include reports from clients with low-resolution
    clocks (i.e. on Windows, ref. |TimeTicks::IsHighResolution()|). Such reports
    will cause this metric to have an abnormal distribution.
  </summary>
</histogram>

<histogram name="GPU.EnsureWorkVisibleDurationLowRes" units="ms"
    expires_after="2024-02-12">
  <owner>alemate@chromium.org</owner>
  <owner>magchen@chromium.org</owner>
  <owner>oshima@chromium.org</owner>
  <summary>
    Records the duration of EnsureWorkVisible GPU call. Since it's blocking UI
    thread we want to measure it, and this histogram must be active as long as
    this call is still blocking.

    This is a sister histogram to GPU.EnsureWorkVisibleDuration. The former is
    our target goal. However it's custom buckets do not have enough granularity
    to measure improvement steps. This metric will instead cap at 5s, and allow
    the buckets to give us better visibility into the 15ms-250ms interval
    ranges. We will use this one until we improve the blocking call.
  </summary>
</histogram>

<histogram name="GPU.EstablishGpuChannelSyncTime" units="ms"
    expires_after="2024-02-20">
  <owner>cduvall@chromium.org</owner>
  <owner>jam@chromium.org</owner>
  <summary>
    Measures the time it takes to synchronously establish the GPU channel.
    Logged every time a sync call to EstableGpuChannelSync is made and a channel
    is not already available.
  </summary>
</histogram>

<histogram name="Gpu.GL.ProgramBuildTime" units="ms" expires_after="M82">
  <owner>ccameron@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    The time that elapsed between a call to glCreateProgram and the call to
    query GL_LINK_STATUS via glGetProgramiv in Skia's GrGLInterface. This
    encompasses the creation of the vertex, fragment, and geometry shaders,
    their compilation, and their linking. This is called for every program
    created by Skia via the GrGLInterface.
  </summary>
</histogram>

<histogram name="GPU.GLImplementation" enum="GLImplementation"
    expires_after="2024-03-17">
  <owner>magchen@chromium.org</owner>
  <owner>zmo@chromium.org</owner>
  <summary>
    Records the OpenGL implementation mode. Recorded during GPU process
    initilization.
  </summary>
</histogram>

<histogram name="GPU.GpuCount" units="gpus" expires_after="2023-12-24">
  <owner>zmo@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    The number of GPUs a device has, excluding software renderers. Recorded when
    GPU process launches and sends GPUInfo to browser process.
  </summary>
</histogram>

<histogram name="GPU.GPUInitializationTime.V3" units="ms"
    expires_after="2023-12-10">
  <obsolete>
    Deprecated 2023-06. The metric is replaced by GPU.GPUInitializationTime.V4
    which is fixing the too small UMA buckets of the V3 metric.
  </obsolete>
  <owner>magchen@chromium.org</owner>
  <owner>zmo@chromium.org</owner>
  <summary>
    The time between the GPU process starts and the GPU Info is collected at GPU
    process startup and recorded in browser process when this piece info is sent
    back to browser process. The range is between 5ms and 5s.
  </summary>
</histogram>

<histogram name="GPU.GPUInitializationTime.V4" units="ms"
    expires_after="2024-02-20">
  <owner>magchen@chromium.org</owner>
  <owner>zmo@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    The time between the GPU process start and the collection of GPU info during
    the process's startup phase. The time range is between 5ms and 90s. Emitted
    after the collection of GPU info. Reported for all clients.

    This metric is similar to GPU.GPUInitializationTime.V3, but there are two
    main differences. First, the range for GPU.GPUInitializationTime.V4 is
    capped at 90s while the range of the other metric is capped at 5s. Second,
    this metric is emitted earlier in the execution because this metric is
    recorded at the same time as trace events which require the timestamp
    marking the start and end of the GPU initialization to be in scope, whereas
    V3 only requires the time spent.
  </summary>
</histogram>

<histogram name="GPU.GPUProcessExitCode" enum="GPUProcessExitCode"
    expires_after="2024-03-17">
  <owner>zmo@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    Counts for the exit codes returned by the GPU process when it terminated.
  </summary>
</histogram>

<histogram name="GPU.GPUProcessInitialized" enum="BooleanSuccess"
    expires_after="2021-01-03">
  <owner>vmiura@chromium.org</owner>
  <summary>
    Whether the GPU process successfully initialized or failed and then exitted
    normally.
  </summary>
</histogram>

<histogram name="GPU.GPUProcessLaunchTime" units="ms"
    expires_after="2024-03-17">
  <owner>vmiura@chromium.org</owner>
  <summary>
    Startup time of the GPU process as measured by the GPU process host.
  </summary>
</histogram>

<histogram name="GPU.GPUProcessTerminationOrigin" enum="GpuTerminationOrigin"
    expires_after="never">
<!-- expires-never: For monitoring unexpected shifts in GPU process exit statuses. -->

  <owner>jonross@chromium.org</owner>
  <owner>msisov@igalia.com</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    The reason a GPU process is terminated. It works only when
    TERMINATION_STATUS_PROCESS_WAS_KILLED TerminationStatus is set. The goal of
    this histogram is to get spikes of the above mentioned case when
    Ozone/Wayland terminates the GPU process due to invalid data it received if
    any. NOTE: this metric was expired from 2019-08-14 to 2022-11-30 and was
    brought back by crrev.com/c/4040947.
  </summary>
</histogram>

<histogram name="GPU.GPUProcessTerminationStatus2" enum="GpuTerminationStatus"
    expires_after="2024-03-17">
  <owner>vmiura@chromium.org</owner>
  <summary>
    Counts for each time the GPU Process Host detects the process dies.
  </summary>
</histogram>

<histogram name="GPU.HardwareAccelerationModeEnabled" enum="BooleanEnabled"
    expires_after="2024-02-20">
  <owner>zmo@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    Records if GPU hardware acceleration is explicitly disabled by the user.
    Recorded when the browser process launches.

    Warning: this histogram was expired from 2022-01-30 to 2022-04-29; data may
    be missing.
  </summary>
</histogram>

<histogram name="GPU.HasDiscreteGpu" enum="HasDiscreteGpu"
    expires_after="2023-08-27">
  <owner>zmo@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    Records whether the system has a discrete GPU, collected in the info
    collection GPU process, once per UMA ping. This is Windows platform only.

    Warning: this histogram was expired from 2020-04-24 to 2022-04-29; data may
    be missing.
  </summary>
</histogram>

<histogram name="GPU.InitializeOneOffMediumTime" units="ms"
    expires_after="2023-09-17">
  <owner>jonahr@google.com</owner>
  <owner>angle-team@google.com</owner>
  <summary>
    The time that the GPU process spends in initializing the GL surface, and
    collecting graphics information. Records times up to three minutes.
  </summary>
</histogram>

<histogram name="GPU.IntelGpuGeneration" enum="IntelGpuGeneration"
    expires_after="2024-03-17">
  <owner>zmo@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    Records the highest Intel GPU generation of the system using the GPU info
    collected at GPU process startup time, once per UMA ping.
  </summary>
</histogram>

<histogram name="GPU.IntelGpuSeriesType" enum="IntelGpuSeriesType"
    expires_after="2024-03-17">
  <owner>sunnyps@chromium.org</owner>
  <owner>zmo@chromium.org</owner>
  <summary>
    Records user device's GPU series type. Only recorded on Windows platform at
    GPU process launch time. Only meaningful with Intel GPUs.
  </summary>
</histogram>

<histogram name="GPU.IOSurface.CATransactionTimeUs" units="microseconds"
    expires_after="2024-02-25">
  <owner>magchen@chromium.org</owner>
  <owner>ccameron@chromium.org</owner>
  <summary>
    The time that it took to update the CALayer tree and commit the transaction.
    This is often affected by IOSurface paging. This metric is only collected on
    Mac, which only has high-resolution clocks.
  </summary>
</histogram>

<histogram name="GPU.IOSurface.CreateTime" units="ms"
    expires_after="2022-07-03">
  <owner>ccameron@chromium.org</owner>
  <summary>
    The time that it took for a call to IOSurfaceCreate to complete.
  </summary>
</histogram>

<histogram name="GPU.IOSurface.GLFlushTime" units="ms" expires_after="M85">
  <owner>ccameron@chromium.org</owner>
  <summary>
    The time that it took for a call to glFlush to complete. This is often
    affected by IOSurface paging.
  </summary>
</histogram>

<histogram name="Gpu.Mac.BackpressureUs" units="microseconds"
    expires_after="2024-02-25">
  <owner>magchen@chromium.org</owner>
  <owner>ccameron@chromium.org</owner>
  <summary>
    The time that the GPU's main CPU thread spends waiting for previous frames'
    GPU work to complete. Recorded at every frame. This metric is only collected
    on Mac, which only has high-resolution clocks.
  </summary>
</histogram>

<histogram name="GPU.MaxMSAASampleCount" units="samples"
    expires_after="2020-07-06">
  <owner>senorblanco@chromium.org</owner>
  <summary>
    The maximum number of multisampled anti-aliasing (MSAA) samples per pixel
    that the user's GPU can render.
  </summary>
</histogram>

<histogram name="GPU.Memory.Device" units="MB" expires_after="2024-08-30">
  <owner>cduvall@chromium.org</owner>
  <owner>swarm-team@google.com</owner>
  <summary>
    The GPU memory reported by the system as the
    &quot;szDisplayMemoryEnglish&quot; property from DxDiagnostics. This is only
    reported on Windows after a 2 minute delay after startup.
  </summary>
</histogram>

<histogram name="Gpu.Metal.ReadWriteTextureSupport"
    enum="MetalReadWriteTextureSupportTier" expires_after="2024-02-25">
  <owner>cwallez@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    Read-write textures are not always supported on Metal. This histograms is
    meant to gather information so that the WebGPU W3C group can decide whether
    to require support for this feature. The reported tier is the best tier that
    was found on the system. Meaning that if only one of the GPUs support
    read-write textures, a non-zero tier will be reported. The histogram is
    recorded at GPU process startup time.
  </summary>
</histogram>

<histogram name="Gpu.Metal.TestShaderCompileTime" units="ms"
    expires_after="M85">
  <owner>ccameron@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    Compiling a MTLLibrary will sometimes hang forever. When initializing the
    gpu process, a test shader is compiled to see if the MTLCompilerService is
    responding or not. This records the time that it took for the compile to
    succeeded, up to 1 minute. After 1 minute, a timeout sentinel value of 3
    minutes is reported.
  </summary>
</histogram>

<histogram name="Gpu.Metal.TestShaderLinkTime" units="ms" expires_after="M85">
  <owner>ccameron@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    Linking a MTLRenderPipelineState will sometimes hang forever. When
    initializing the GPU process, a test shader is compiled to see if the
    MTLCompilerService is responding or not. This records the time that it took
    for the compile to succeeded, up to 1 minute. After 1 minute, a timeout
    sentinel value of 3 minutes is reported.
  </summary>
</histogram>

<histogram name="Gpu.MetalShaderCache.LoadTime" units="microseconds"
    expires_after="2023-12-17">
  <owner>sky@chromium.org</owner>
  <owner>angle-team@google.com</owner>
  <summary>
    The amount of time (in microseconds) the gpu process takes to load the metal
    shader lib cache. Logged after loading completes on a background thread.
  </summary>
</histogram>

<histogram name="Gpu.MetalShaderCache.NumEntriesInCache" units="count"
    expires_after="2024-02-20">
  <owner>sky@chromium.org</owner>
  <owner>angle-team@google.com</owner>
  <summary>
    The number of shader programs in the metal shader lib cache. Logged after
    loading of the metal shader lib cache completes.
  </summary>
</histogram>

<histogram name="Gpu.MetalShaderCache.WaitTime" units="microseconds"
    expires_after="2024-02-20">
  <owner>sky@chromium.org</owner>
  <owner>angle-team@google.com</owner>
  <summary>
    The amount of time (in microseconds) the gpu process main thread is blocked
    waiting for the metal shader lib cache to load.
  </summary>
</histogram>

<histogram name="GPU.MultiGpu.AMD" enum="AMDDeviceId"
    expires_after="2023-01-01">
  <owner>zmo@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    AMD device IDs from multi-gpu devices. Recorded when GPU process launches
    and sends GPUInfo to browser process.
  </summary>
</histogram>

<histogram name="GPU.MultiGpu.Nvidia" enum="NvidiaDeviceId"
    expires_after="2023-04-16">
  <owner>zmo@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    Nvidia device IDs from multi-gpu devices. Recorded when GPU process launches
    and sends GPUInfo to browser process.
  </summary>
</histogram>

<histogram name="GPU.MultipleSwapsDelta" units="%" expires_after="2024-02-11">
  <owner>jonross@chromium.org</owner>
  <owner>chrome-gpu-metrics@google.com</owner>
  <summary>
    Time delta between swaps, when there are multiple successful swaps in the
    same vsync. The delta is reported as a percentage of vsync interval. This
    can be recorded every time we present a frame.
  </summary>
</histogram>

<histogram name="GPU.Nvidia{Extension}.{State}.SetStreamExt" enum="Hresult"
    expires_after="2024-03-03">
  <owner>magchen@chromium.org</owner>
  <owner>zmo@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    Records HRESULT when setting the video processor stream extension for Nvidia
    {Extension} to {State}. This metric is recorded every frame when processing
    video streams in DirectComposition.
  </summary>
  <token key="Extension">
    <variant name="VpSuperResolution" summary="RTX SuperResolution"/>
    <variant name="VpTrueHDR" summary="RTX TrueHDR"/>
  </token>
  <token key="State">
    <variant name="Off" summary="off"/>
    <variant name="On" summary="on"/>
  </token>
</histogram>

<histogram name="GPU.OopRaster.GlyphCacheMiss"
    enum="OopRasterGlyphCacheMissType" expires_after="2023-04-23">
  <owner>khushalsagar@chromium.org</owner>
  <owner>penghuang@chromium.org</owner>
  <summary>
    During OutOfProcess(Oop) raster, the renderer generates and sends the
    requisite glyph data for rasterizing a tile with the serialized paint
    commands. If the data for any glyph is missing, the GPU process attempts to
    use a fallback glyph from the cache. This records each time we encounter a
    cache miss on the GPU and whether we could use a fallback.
  </summary>
</histogram>

<histogram name="GPU.Output.HDR" enum="Boolean" expires_after="2024-03-17">
  <owner>hubbe@chromium.org</owner>
  <owner>cassew@chromium.org</owner>
  <owner>media-dev-uma@chromium.org</owner>
  <summary>
    Records if any connected monitor is HDR capable. Recorded when the gpu
    process starts. Only recorded on Windows as of M-61. If monitor enumeration
    fails, this metric will not be provided.
  </summary>
</histogram>

<histogram name="Gpu.OutputSurface.ScheduleOverlaysUs" units="microseconds"
    expires_after="2024-02-25">
  <owner>magchen@chromium.org</owner>
  <owner>ccameron@chromium.org</owner>
  <summary>
    The time that the GPU's main CPU thread spends producing pending CALayer
    tree on Mac. Recorded when Skia output surface schedules overlays at every
    frame. This metric is only collected on Mac, which only has high-resolution
    clocks.
  </summary>
</histogram>

<histogram name="GPU.PaintOpReader.DeserializationError"
    enum="PaintOpDeserializationError" expires_after="2024-03-24">
  <owner>junov@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    Records the reason why the deserialization of a PaintOp failed. Recorded in
    PaintOpReader::Read* methods when the decoding a paint op fails. These
    failures are typically caused by an invalid or unexpected state or invalid
    serialized data.
  </summary>
</histogram>

<histogram name="GPU.PassthroughDoLinkProgramTime" units="ms"
    expires_after="2023-11-19">
  <owner>jonahr@google.com</owner>
  <owner>angle-team@google.com</owner>
  <summary>
    The time we spend in GLES2DecoderPassthroughImpl::DoLinkProgram. Related to
    how much time we spend compiling shaders during startup. Expired in June
    2022, and revived in M106. Data may be incomplete for the period during
    which the histogram was expired.
  </summary>
</histogram>

<histogram name="GPU.ProcessLifetimeEvents.HardwareAccelerated"
    enum="GPUProcessLifetimeEvent" expires_after="2024-03-17">
  <owner>vmiura@chromium.org</owner>
  <summary>
    Recorded once for every GPU process launch and crash when GPU process is
    started for hardware accelerated GPU compositing and/or WebGL. Crash buckets
    are based on crash count for disabling features. With OOP-D enabled the
    display compositor also runs in the GPU process.
  </summary>
</histogram>

<histogram name="GPU.ProcessLifetimeEvents.SwiftShader"
    enum="GPUProcessLifetimeEvent" expires_after="2024-03-17">
  <owner>vmiura@chromium.org</owner>
  <summary>
    Recorded once for every GPU process launch and crash when GPU process is
    started for SwiftShader WebGL. Crash buckets are based on crash count for
    disabling features. With OOP-D enabled the display compositor with software
    compositing will also run as part of the GPU process.
  </summary>
</histogram>

<histogram name="GPU.ProgramCache.CacheHit" enum="BooleanSuccess"
    expires_after="2023-09-17">
  <owner>jonahr@google.com</owner>
  <owner>angle-team@google.com</owner>
  <summary>
    If a successfully linked program was found in the GPU program cache during a
    program link call. Expired in June 2022, and revived in M106. Data may be
    incomplete for the period during which the histogram was expired.
  </summary>
</histogram>

<histogram name="GPU.ProgramCache.CompilationCacheHitTime" units="microseconds"
    expires_after="M85">
  <owner>vmiura@chromium.org</owner>
  <summary>
    The time to check the program cache that we've already compiled the shader.

    Warning: This metric may include reports from clients with low-resolution
    clocks (i.e. on Windows, ref. |TimeTicks::IsHighResolution()|). Such reports
    will cause this metric to have an abnormal distribution. When considering
    revising this histogram, see UMA_HISTOGRAM_CUSTOM_MICROSECONDS_TIMES for the
    solution.
  </summary>
</histogram>

<histogram name="GPU.ProgramCache.CompilationCacheMissTime"
    units="microseconds" expires_after="M85">
  <owner>vmiura@chromium.org</owner>
  <summary>
    The time to compile a shader.

    Warning: This metric may include reports from clients with low-resolution
    clocks (i.e. on Windows, ref. |TimeTicks::IsHighResolution()|). Such reports
    will cause this metric to have an abnormal distribution. When considering
    revising this histogram, see UMA_HISTOGRAM_CUSTOM_MICROSECONDS_TIMES for the
    solution.
  </summary>
</histogram>

<histogram name="GPU.RasterDecoder.TimeToFlush" units="microseconds"
    expires_after="2024-02-20">
  <owner>sky@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    Time it takes for RasterDecoderImpl::FlushSurfaces() to complete. Recorded
    for the first 100 flushes.
  </summary>
</histogram>

<histogram name="Gpu.Rasterization.Raster.MSAASampleCountLog2" units="count"
    expires_after="2024-02-04">
  <owner>penghuang@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    log2() of MSAA sample count of a raster task. Value is in [log2(1),log2(64)]
    or [0,6] range. If log2() of the MSAA sample count is 0 (MSAA sample count
    is 1), it means MSAA is disabled.
  </summary>
</histogram>

<histogram name="GPU.ReportOnlyModeStatusAtHang" enum="BooleanEnabled"
    expires_after="2024-02-20">
  <owner>spvw@chromium.org</owner>
  <owner>chrome-catan@google.com</owner>
  <summary>
    Records whether report only mode is enabled at GPU process watchdog hang
    time. Currently, we are not seeing any of the hangs/crashes reported by
    report-only mode, despite the experiment rolling out.

    General Catan investigation: https://crbug.com/1350257

    Report only feature: https://crbug.com/1356196

    Part of a performance investigation that Catan is doing into GPU startup
    time.
  </summary>
</histogram>

<histogram name="GPU.Scheduler.TaskDependencyTime" units="microseconds"
    expires_after="2022-08-07">
  <owner>berlu@chromium.org</owner>
  <owner>chrome-gpu-metrics@google.com</owner>
  <summary>
    Records the wall time taken spent by each GPU scheduler task waiting on it's
    dependencies to resolve. The time delta starts when the waiting fence is
    added and finishes when the last fence is removed. Only recorded for clients
    with high resolution clocks.
  </summary>
</histogram>

<histogram name="GPU.Scheduler.TaskSchedulingDelayTime" units="microseconds"
    expires_after="2022-12-11">
  <owner>berlu@chromium.org</owner>
  <owner>chrome-gpu-metrics@google.com</owner>
  <summary>
    Records the wall time taken spent by each GPU scheduler task waiting on to
    be scheduled once all its dependencies have been resolved. The time delta
    starts when the last waiting fence is passed and stops when the tasks starts
    running. If the schedulers is working properly, for a high priority task,
    this metric should be minimal. Only recorded for clients with high
    resolution clocks.
  </summary>
</histogram>

<histogram name="GPU.Scheduler.ThreadSuspendedTime" units="microseconds"
    expires_after="2022-12-11">
  <owner>berlu@chromium.org</owner>
  <owner>chrome-gpu-metrics@google.com</owner>
  <summary>
    Records the wall time taken between calls to schedule the task run and the
    actual run of the task. Ideally this should always be as close to 0 as
    possible. Only recorded for clients with high resolution clocks.
  </summary>
</histogram>

<histogram name="GPU.setIsAcceleratedCompositingActive"
    enum="GPUsetIsAcceleratedCompositingActive" expires_after="M85">
  <owner>vmiura@chromium.org</owner>
  <summary>
    Counts activation and deactivation of accelerated compositing.
  </summary>
</histogram>

<histogram name="GPU.SharedImage.BackingType" enum="SharedImageBackingType"
    expires_after="2024-06-01">
  <owner>kylechar@chromium.org</owner>
  <owner>chrome-gpu-metrics@google.com</owner>
  <summary>
    Records the type of each SharedImageBacking that's initialized/registered.
  </summary>
</histogram>

<histogram name="GPU.SharedImage.ContentConsumed" enum="BooleanMatched"
    expires_after="2024-02-11">
  <owner>penghuang@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    Whether or not the content of a SharedImage is consumed. False indicates the
    content of a SharedImage is never used due to destroying the SharedImage or
    writing new content to it before using it.
  </summary>
</histogram>

<histogram name="GPU.SharedImage.FormatPixmapSupport"
    enum="FormatPixmapSupport" expires_after="2024-02-04">
  <owner>vasilyt@chromium.org</owner>
  <owner>hitawala@chromium.org</owner>
  <summary>
    Tracks which formats can be supported for creating SharedImages with real
    GpuMemoryBuffers on Ozone based platforms. Result is an enum that represents
    multiplanar buffer formats in order of possible support eg. NV12, YV12 and
    whether they can be used on platform that supports native pixmaps. This is
    logged once per gpu process launch.
  </summary>
</histogram>

<histogram name="GPU.SharedImage.IsNewMultiplanarFormat" units="Boolean"
    expires_after="2024-02-04">
  <owner>hitawala@chromium.org</owner>
  <owner>vasilyt@chromium.org</owner>
  <summary>
    Tracks the multiplanar format used for creating shared image with
    GpuMemoryBuffers. Result is a bool that checks if the format is a new
    multiplanar shared image format or legacy multiplanar buffer format. This is
    logged once per CreateSharedImage with GpuMemoryBuffer call.
  </summary>
</histogram>

<histogram name="GPU.SharedImage.IsRG88HardwareGMBSupported" units="Boolean"
    expires_after="2024-06-04">
  <owner>hitawala@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    Tracks if shared images are created with hardware GpuMemoryBuffers of RG88
    format on Ozone based platforms. Result is a bool that reports if RG88
    format is supported for creating shared images with hardware GMBs. This is
    logged once per gpu process launch.
  </summary>
</histogram>

<histogram name="GPU.SoftwareRendering" enum="BooleanSoftwareRendering"
    expires_after="2024-03-17">
  <owner>zmo@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    Collects whether Chrome uses software renderer or hardware GPU 20 seconds
    after Chrome starts, and records this value once per UMA ping. This value is
    not re-collected at each recording time because GPU process could crash for
    various reasons and fall back to software rendering. This value is intended
    to reflect device capabilities rather than the current state.
  </summary>
</histogram>

<histogram name="GPU.Stage3DFieldTrial" enum="BooleanEnabled"
    expires_after="M85">
  <owner>vmiura@chromium.org</owner>
  <summary>
    Records whether a client was selected for the Stage3D on XP field trial or
    not.
  </summary>
</histogram>

<histogram name="GPU.SupportsDX12" enum="BooleanSupported"
    expires_after="2024-03-03">
  <owner>magchen@chromium.org</owner>
  <owner>zmo@chromium.org</owner>
  <summary>
    This metric shows whether the GPU supports D3D12. It is recorded in the
    browser process 120 seconds after the browser launch.
  </summary>
</histogram>

<histogram name="GPU.SwapTimeUs" units="microseconds"
    expires_after="2022-12-11">
  <owner>vasilyt@chromium.org</owner>
  <owner>backer@chromium.org</owner>
  <summary>
    This is logged once per frame if the output surface provides timing
    information. It measures the time of SwapBuffers call. Only reported when
    there is single surface swap in the same vsync interval. Only reported for
    platforms supporting high resolution clocks.
  </summary>
</histogram>

<histogram name="GPU.TransferCache.EntryFound" enum="BooleanYesNo"
    expires_after="2024-01-31">
  <owner>boliu@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    Whether a transfer cache entry is found when trying to retrieve it. Recorded
    on every transfer cache look up.
  </summary>
</histogram>

<histogram name="GPU.TransferCache.MaxHistoricalTimeSinceLastUse" units="ms"
    expires_after="2024-01-31">
  <owner>boliu@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    When a transfer cache is found, record max historical time between reuses.
    Recorded on every successful transfer cache look up.
  </summary>
</histogram>

<histogram name="GPU.TransferCache.ReusedTimes" units="Reuses"
    expires_after="2024-01-31">
  <owner>boliu@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    When a transfer cache entry is deleted, record how many times it was used.
    Recorded when an entry is deleted.
  </summary>
</histogram>

<histogram name="GPU.TransferCache.TimeSinceLastUse" units="ms"
    expires_after="2024-01-31">
  <owner>boliu@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    When a transfer cache is found, record the time since last use. Recorded on
    every successful transfer cache look up.
  </summary>
</histogram>

<histogram name="GPU.TransferCache.TimeSinceLastUseOnDelete" units="ms"
    expires_after="2024-01-31">
  <owner>boliu@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    When a transfer cache entry is deleted, record the last time the entry was
    used. Recorded when an entry is deleted.
  </summary>
</histogram>

<histogram name="GPU.VideoProcessorBlt.{Extension}.{State}" enum="Hresult"
    expires_after="2024-03-03">
  <owner>magchen@chromium.org</owner>
  <owner>zmo@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    Records HRESULT for VideoProcessorBlt. This metric is recorded when
    processing a video stream in DirectComposition with {Extension} {State}.
  </summary>
  <token key="Extension">
    <variant name="VpAutoHDR" summary="Video Processor Auto HDR"/>
    <variant name="VpSuperResolution"
        summary="Video Processor Super Resolution"/>
  </token>
  <token key="State">
    <variant name="Off" summary="off"/>
    <variant name="On" summary="on"/>
    <variant name="RetryOffAfterError" summary="retry off after blt error"/>
  </token>
</histogram>

<histogram name="GPU.Vulkan.ExtMemoryBudgetSupported" units="BooleanSupported"
    expires_after="2024-02-04">
  <owner>vikassoni@chromium.org</owner>
  <owner>penghuang@chromium.org</owner>
  <owner>vasilyt@chromium.org</owner>
  <summary>
    Whether the extension VK_EXT_memory_budget is supported or not. Recorded
    once during every gpu process initialization.
  </summary>
</histogram>

<histogram name="GPU.Vulkan.PipelineCache.LoadCacheHit" enum="BooleanCacheHit"
    expires_after="2022-05-08">
  <owner>backer@chromium.org</owner>
  <owner>penghuang@chromium.org</owner>
  <owner>vasilyt@chromium.org</owner>
  <summary>
    Shows if we had a vkPipelineCache entry in cache when skia requested it.
    Recorded each time skia loads vkPipelineCache entry from the GrShaderCache.
  </summary>
</histogram>

<histogram name="GPU.Vulkan.PipelineCache.PopulatedCacheUsage"
    enum="VkPipelinePopulatedCacheEntryUsage" expires_after="2021-10-31">
  <owner>backer@chromium.org</owner>
  <owner>penghuang@chromium.org</owner>
  <owner>vasilyt@chromium.org</owner>
  <summary>
    Shows if the populated from disk cache entry was used by skia or discarded
    and why. Recorded when cache entry that was read from disk is either loaded
    by skia, overwriten by skia or discarded by GrShaderCache.
  </summary>
</histogram>

<histogram name="GPU.Vulkan.PipelineCache.Size" units="KB"
    expires_after="2022-05-08">
  <owner>backer@chromium.org</owner>
  <owner>penghuang@chromium.org</owner>
  <owner>vasilyt@chromium.org</owner>
  <summary>
    Size of stored VkPipelineCache in kb. Recorded every time we store a
    pipeline cache item. Currently happens when gpu goes idle after we stored or
    loaded new shader.
  </summary>
</histogram>

<histogram name="GPU.Vulkan.PipelineCache.StoreDuration" units="microseconds"
    expires_after="2022-05-08">
  <owner>backer@chromium.org</owner>
  <owner>penghuang@chromium.org</owner>
  <owner>vasilyt@chromium.org</owner>
  <summary>
    Duration of storeVkPipelineCacheData in Skia, this includes chromium side
    GrShaderCache::store. Recorded even if data didn't fit into the cache. Only
    reported for platforms supporting high resolution clocks.
  </summary>
</histogram>

<histogram name="GPU.Vulkan.PipelineCache.vkCreateGraphicsPipelines"
    units="microseconds" expires_after="2023-12-10">
  <owner>penghuang@chromium.org</owner>
  <owner>vasilyt@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    Duration of vkCreateGraphicsPipelines call. Recorded every time Skia creates
    graphics pipeline. Only reported for platforms supporting high resolution
    clocks.
  </summary>
</histogram>

<histogram name="GPU.WaitForVBlankErrorCode" enum="WaitForVBlankErrorCode"
    expires_after="M85">
  <owner>stanisc@chromium.org</owner>
  <summary>
    Whether WaitForVBlank operation has been successful or failed with one of
    the errors prompting a backup delay based v-sync mechanism. Recorded each
    time a new GPU v-sync signal is generated.
  </summary>
</histogram>

<histogram name="GPU.WatchdogThread.Event{ThreadType}"
    enum="GpuWatchdogThreadEvent" expires_after="2024-10-01">
  <owner>magchen@chromium.org</owner>
  <owner>zmo@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    Recorded for each time the GPU watchdog thread starts, crashes and ends.
  </summary>
  <token key="ThreadType">
    <variant name=""/>
    <variant name=".compositor"/>
    <variant name=".main"/>
  </token>
</histogram>

<histogram name="GPU.WatchdogThread.Timeout{WatchdogStage}{ThreadType}"
    enum="GpuWatchdogTimeoutEvent" expires_after="2024-10-01">
  <owner>magchen@chromium.org</owner>
  <owner>zmo@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    Recorded timeout events when the GPU watchdog enters OnWatchdogTimeout.
  </summary>
  <token key="WatchdogStage">
    <variant name=""/>
    <variant name=".Foregrounded"/>
    <variant name=".Init"/>
    <variant name=".Normal"/>
    <variant name=".PowerResume"/>
  </token>
  <token key="ThreadType">
    <variant name=""/>
    <variant name=".compositor"/>
    <variant name=".main"/>
  </token>
</histogram>

<histogram name="GPU.WebGLDisplayType" enum="EGLDisplayType"
    expires_after="2024-03-24">
  <owner>geofflang@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    Types of EGL displays used to back WebGL contexts. Recorded at context
    creation time in the GPU process.
  </summary>
</histogram>

<histogram name="GPU.WebGLDisplayTypeLarge" enum="EGLDisplayType"
    expires_after="2023-08-27">
  <owner>geofflang@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    Types of EGL displays used to back large (area &gt;= 128*128) WebGL
    contexts. Recorded at context creation time in the GPU process.
  </summary>
</histogram>

<histogram name="GPU.WebGPU.Create{Module}Success" enum="Boolean"
    expires_after="2024-02-20">
  <owner>enga@chromium.org</owner>
  <owner>mdb.webgpu-dev-team@google.com</owner>
  <summary>
    Tracks whether a call to Create{Module} was successful, excluding when the
    result is found in frontend cache.
  </summary>
  <token key="Module" variants="WebGPUModule"/>
</histogram>

<histogram name="GPU.WebGPU.Create{Module}US" units="microseconds"
    expires_after="2024-02-20">
  <owner>enga@chromium.org</owner>
  <owner>mdb.webgpu-dev-team@google.com</owner>
  <summary>
    Tracks the amount of time in microseconds it takes for a call to
    Create{Module} to complete, excluding when the result is found in frontend
    cache. Recorded only for clients that support high-resolution clocks.
  </summary>
  <token key="Module" variants="WebGPUModule"/>
</histogram>

<histogram name="GPU.WebGPU.HasGpuAdapter" enum="Boolean"
    expires_after="2024-02-21">
  <owner>cduvall@chromium.org</owner>
  <owner>mdb.webgpu-dev-team@google.com</owner>
  <summary>
    Records whether WebGPU has any GPU adapters available. This is recorded
    during GPU process startup.
  </summary>
</histogram>

<histogram name="GPU.WebGPU.MaxStorageBufferBindingSize.{AdapterType}"
    units="MB" expires_after="2024-02-21">
  <owner>cduvall@chromium.org</owner>
  <owner>mdb.webgpu-dev-team@google.com</owner>
  <summary>
    Records the maximum storage buffer binding size if {AdapterType} GPU is
    available. This is recorded during GPU process startup.
  </summary>
  <token key="AdapterType" variants="WebGPUAdapterType"/>
</histogram>

<histogram name="GPU.WebGPU.MaxTextureDimension2D.{AdapterType}"
    units="dimensions" expires_after="2024-02-21">
  <owner>cduvall@chromium.org</owner>
  <owner>mdb.webgpu-dev-team@google.com</owner>
  <summary>
    Records the maximum 2D texture dimensions if {AdapterType} GPU is available.
    This is recorded during GPU process startup.
  </summary>
  <token key="AdapterType" variants="WebGPUAdapterType"/>
</histogram>

<histogram name="GPU.WebGPU.Support" enum="WebGPUSupport"
    expires_after="2024-02-04">
  <owner>cwallez@google.com</owner>
  <owner>enga@google.com</owner>
  <owner>kainino@google.com</owner>
  <summary>
    WebGPU support level. Recorded on GPU info collection a couple minutes after
    browser startup. Compatibility mode support means that WebGPU is supported
    on a non-core backend like OpenGLES. Core backends can always support
    compatibility mode so compat-on-core-adapter is not reported in this metric.
    Supported means at least one adapter of that type was available. Blocklisted
    means all adapters of that type were blocklisted. None means that no
    adapters of that type were available. Software adapters are considered as
    None in this metric.
  </summary>
</histogram>

<histogram name="GPU.WebGPU.{Cacheable}.CacheHit" units="microseconds"
    expires_after="2024-01-25">
  <owner>lokokung@google.com</owner>
  <owner>mdb.webgpu-dev-team@google.com</owner>
  <summary>
    Tracks the amount of time in microseconds it takes for a cached call to
    {Cacheable} to complete without error when we have a cache hit. This
    includes the load time from the cache and time to deserialize the result.
    Recorded only for clients that support high-resolution clocks.
  </summary>
  <token key="Cacheable" variants="WebGPUCacheable"/>
</histogram>

<histogram name="GPU.WebGPU.{Cacheable}.CacheMiss" units="microseconds"
    expires_after="2024-01-25">
  <owner>lokokung@google.com</owner>
  <owner>mdb.webgpu-dev-team@google.com</owner>
  <summary>
    Tracks the amount of time in microseconds it takes for a cached call to
    {Cacheable} to complete without error when we have a cache miss. This
    includes the time necessary to create the results of {Cacheable} from
    scratch, but does not include the time taken to write the results back into
    the cache. Recorded only for clients that support high-resolution clocks.
  </summary>
  <token key="Cacheable" variants="WebGPUCacheable"/>
</histogram>

<histogram name="GPU.WebGraphicsContext3D_Init_CanLoseContext"
    enum="GPUWebGraphicsContext3D_Init_CanLoseContext" expires_after="M85">
  <owner>vmiura@chromium.org</owner>
  <summary>
    Counts of context initialization that succeed or fail based on combinations
    of attributes requiring canRecoverFromContextLoss and devices that report
    can_lose_context. Failing Init is desired when a device can not guarantee it
    won't fail for a user that can not handle failures, e.g. DX9 on WinXP used
    by Canvas2D'
  </summary>
</histogram>

<histogram name="GPU.WinSAT.GamingScore" units="units" expires_after="M85">
  <owner>vmiura@chromium.org</owner>
  <summary>
    The WinSAT (Windows System Assessment Tool) gaming graphics score. It is in
    the range 1.0-5.9 on Vista, 1.0-7.9 on Win7 and 1.0-9.9 on Win8. 0
    represents a failure to get the score. This is collected each time Chrome is
    launched.
  </summary>
</histogram>

<histogram name="GPU.WinSAT.GamingScore2" units="units" expires_after="M85">
  <owner>vmiura@chromium.org</owner>
  <summary>
    The WinSAT (Windows System Assessment Tool) gaming graphics score, scaled by
    10x. It is in the range 10-59 on Vista, 10-79 on Win7 and 10-99 on Win8. 0
    represents a failure to get the score. This is collected each time Chrome is
    launched.
  </summary>
</histogram>

<histogram name="GPU.WinSAT.GraphicsScore" units="units" expires_after="M85">
  <owner>vmiura@chromium.org</owner>
  <summary>
    The WinSAT (Windows System Assessment Tool) graphics score. It is in the
    range 1.0-5.9 on Vista, 1.0-7.9 on Win7 and 1.0-9.9 on Win8. 0 represents a
    failure to get the score. This is collected each time Chrome is launched.
  </summary>
</histogram>

<histogram name="GPU.WinSAT.GraphicsScore2" units="units" expires_after="M85">
  <owner>vmiura@chromium.org</owner>
  <summary>
    The WinSAT (Windows System Assessment Tool) graphics score, scaled by 10x.
    It is in the range 10-59 on Vista, 10-79 on Win7 and 10-99 on Win8. 0
    represents a failure to get the score. This is collected each time Chrome is
    launched.
  </summary>
</histogram>

<histogram name="GPU.WinSAT.HasResults" enum="BooleanSuccess"
    expires_after="M85">
  <owner>vmiura@chromium.org</owner>
  <summary>
    A boolean representing whether or not we succeeded in getting the system's
    WinSAT scores. This is collected each time Chrome is launched.
  </summary>
</histogram>

<histogram name="GPU.WinSAT.OverallScore" units="units" expires_after="M85">
  <owner>vmiura@chromium.org</owner>
  <summary>
    The WinSAT (Windows System Assessment Tool) overall system score. This is
    the minimum of all the individual subscores. It is in the range 1.0-5.9 on
    Vista, 1.0-7.9 on Win7 and 1.0-9.9 on Win8. 0 represents a failure to get
    the score. This is collected each time Chrome is launched.
  </summary>
</histogram>

<histogram name="GPU.WinSAT.OverallScore2" units="units" expires_after="M85">
  <owner>vmiura@chromium.org</owner>
  <summary>
    The WinSAT (Windows System Assessment Tool) overall system score, scaled by
    10x. This is the minimum of all the individual subscores. It is in the range
    10-59 on Vista, 10-79 on Win7 and 10-99 on Win8. 0 represents a failure to
    get the score. This is collected each time Chrome is launched.
  </summary>
</histogram>

<histogram name="GPU.WinSAT.ReadResultsFileTime" units="microseconds"
    expires_after="M85">
  <owner>vmiura@chromium.org</owner>
  <summary>
    The amount of time it takes to read the WinSAT results. This is collected
    each time Chrome is launched.

    Warning: This metric may include reports from clients with low-resolution
    clocks (i.e. on Windows, ref. |TimeTicks::IsHighResolution()|). Such reports
    will cause this metric to have an abnormal distribution. When considering
    revising this histogram, see UMA_HISTOGRAM_CUSTOM_MICROSECONDS_TIMES for the
    solution.
  </summary>
</histogram>

<histogram name="Viz.BeginFrameSource.Accuracy.AverageDelta"
    units="microseconds" expires_after="2024-03-17">
  <owner>magchen@chromium.org</owner>
  <owner>ccameron@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    The average time delta between the expected BeginFrame time and the actual
    time of BeginFrame on Mac. Each recorded number is an average result of 3600
    frames. It's recorded every 3600 frames when OnBeginFrame or OnTimerTick is
    called.

    This metric is only for Mac clients with high-resolution clocks.
  </summary>
</histogram>

<histogram name="Viz.DelegatedCompositing.Status" enum="DelegatedStatus"
    expires_after="2024-02-04">
  <owner>petermcneeley@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    An enum status result for attempted delegated compositing (success or
    failure reason) recorded every drawn frame. Currently only recorded for
    LaCros delegated compositing.
  </summary>
</histogram>

<histogram name="Viz.DisplayCompositor.OverlayNumProposedCandidates"
    units="units" expires_after="2024-03-17">
  <owner>petermcneeley@chromium.org</owner>
  <owner>khaslett@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    A count of the number of proposed overlay candidates available for overlay
    selection. Recorded every time a frame is rendered by the display
    compositor.
  </summary>
</histogram>

<histogram name="Viz.DisplayCompositor.OverlayQuadMaterial"
    enum="OverlayQuadMaterial" expires_after="2023-06-09">
  <owner>petermcneeley@chromium.org</owner>
  <owner>khaslett@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    Quad material for current promoted overlay, per frame. Recorded every time a
    frame is rendered by the display compositor.
  </summary>
</histogram>

<histogram name="Viz.DisplayCompositor.OverlayStrategy"
    enum="OverlayStrategies" expires_after="2024-02-11">
  <owner>khaslett@chromium.org</owner>
  <owner>kylechar@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    Overlay strategies used to promote Hardware Overlays, once or more per
    frame. Recorded every time a frame is rendered by the display compositor, or
    once per overlay promoted if multiple were promoted.
  </summary>
</histogram>

<histogram name="Viz.DisplayCompositor.OverlaySwitchInterval" units="ms"
    expires_after="2024-02-20">
  <owner>petermcneeley@chromium.org</owner>
  <owner>khaslett@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    The time, in milliseconds, since the change in overlay selection. Recorded
    every time a frame is rendered by the display compositor.
  </summary>
</histogram>

<histogram name="Viz.DisplayCompositor.RootDamageRect.Overlay"
    enum="BooleanOverlayDamageRect" expires_after="2024-03-17">
  <owner>magchen@chromium.org</owner>
  <owner>zmo@chromium.org</owner>
  <summary>
    Any root damage excluding overlay damage in the current frame?
  </summary>
</histogram>

<histogram name="Viz.DisplayCompositor.RootDamageRect.Underlay"
    enum="UnderlayDamageRect" expires_after="2024-10-01">
  <owner>magchen@chromium.org</owner>
  <owner>zmo@chromium.org</owner>
  <summary>
    The root damage type excluding underlay damage in the current frame.
  </summary>
</histogram>

<histogram name="Viz.ExternalBeginFrameSourceMac.DisplayLink"
    enum="DisplayLinkCreateResult" expires_after="2024-03-24">
  <owner>magchen@chromium.org</owner>
  <owner>ccameron@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    The result of creating CVDisplaylink in ExternalBeginFrameSourceMac. If
    successful, BeginFrameSource is driven by HW VSync instead of timer. This
    histogram does not include the data from DelayBasedBeginFrameSourceMac. It's
    recorded each time a DisplayLink is created during
    RootCompositorFrameSinkImpl/ExternalBeginFrameSourceMac creation or during
    the monitor change in the existing ExternalBeginFrameSourceMac.
  </summary>
</histogram>

<histogram name="Viz.FileDescriptorTracking.TimeToCompute" units="microseconds"
    expires_after="2024-06-09">
  <owner>petermcneeley@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    Time spent computing the number of active File Descriptors. This is logged
    once every 5 minutes as the cost of this computation is estimated to be at
    least 1ms. Currently only recorded for LaCros delegated compositing.

    Warning: This metric does not include reports from clients with
    low-resolution clocks.
  </summary>
</histogram>

<histogram name="Viz.FileDescriptorTracking.{FdStat}" units="units"
    expires_after="2024-06-09">
  <owner>petermcneeley@chromium.org</owner>
  <owner>graphics-dev@chromium.org</owner>
  <summary>
    {FdStat} File Descriptors for the GPU process. This is logged once every 5
    minutes as the cost of this computation is estimated to be at least 1ms.
    Currently only recorded for LaCros delegated compositing.
  </summary>
  <token key="FdStat">
    <variant name="NumActive" summary="Current number of active"/>
    <variant name="NumSoftMax" summary="Maximum number of"/>
    <variant name="PercentageUsed" summary="Percentage of in use"/>
  </token>
</histogram>

<histogram name="Viz.FrameSink.GpuBusyDuration" units="microseconds"
    expires_after="2024-04-11">
  <owner>sashamcintosh@chromium.org</owner>
  <owner>chromeos-gfx@chromium.org</owner>
  <summary>
    The time that a begin frame is throttled due to max pending swaps. Recorded
    when draw and swap executes (only when a frame is throttled). Refer to
    BeginFrameSource::SetIsGpuBusy for details.

    Warning: This metric does not include reports from clients with
    low-resolution clocks.
  </summary>
</histogram>

<histogram name="Viz.FrameSinkVideoCapturer.CaptureDuration" units="ms"
    expires_after="2023-07-15">
  <owner>bialpio@chromium.org</owner>
  <owner>media-capture-dev@chromium.org</owner>
  <summary>
    The time it took from when FrameSinkVideoCapturerImpl sent a request for
    frame capture until the result becomes available to the capturer.

    Format-agnostic version of
    `Viz.FrameSinkVideoCapturer.[NV12/I420].CaptureDuration` histograms.
  </summary>
</histogram>

<histogram name="Viz.FrameSinkVideoCapturer.CaptureSucceeded"
    enum="BooleanSuccess" expires_after="2023-07-15">
  <owner>bialpio@chromium.org</owner>
  <owner>media-capture-dev@chromium.org</owner>
  <summary>
    Whether a capture initiated by FrameSinkVideoCapturerImpl succeeded.

    Format-agnostic version of
    `Viz.FrameSinkVideoCapturer.[NV12/I420].CaptureSucceeded` histograms.
  </summary>
</histogram>

<histogram name="Viz.FrameSinkVideoCapturer.FrameResurrected" enum="Boolean"
    expires_after="2023-07-15">
  <owner>bialpio@chromium.org</owner>
  <owner>media-capture-dev@chromium.org</owner>
  <summary>
    True if the capturer has used a resurrected video frame, thus avoiding
    having to reserve it from a frame pool, false otherwise.
  </summary>
</histogram>

<histogram name="Viz.FrameSinkVideoCapturer.I420.CaptureDuration" units="ms"
    expires_after="2024-03-24">
  <owner>bialpio@chromium.org</owner>
  <owner>media-capture-dev@chromium.org</owner>
  <summary>
    The time it took from when FrameSinkVideoCapturerImpl sent a request for an
    I420 readback until the result comes back and ReadI420Planes successfully
    finishes.

    Warning: this histogram was expired from 2021-03-07 to 2022-03-10; data may
    be missing.
  </summary>
</histogram>

<histogram name="Viz.FrameSinkVideoCapturer.I420.CaptureSucceeded"
    enum="BooleanSuccess" expires_after="2024-03-24">
  <owner>bialpio@chromium.org</owner>
  <owner>media-capture-dev@chromium.org</owner>
  <summary>
    Whether an I420 readback initiated by FrameSinkVideoCapturerImpl succeeded.

    Warning: this histogram was expired from 2020-12-31 to 2022-03-10; data may
    be missing.
  </summary>
</histogram>

<histogram name="Viz.FrameSinkVideoCapturer.I420.TotalDuration" units="ms"
    expires_after="2024-03-24">
  <owner>bialpio@chromium.org</owner>
  <owner>media-capture-dev@chromium.org</owner>
  <summary>
    The time it took from when FrameSinkVideoCapturerImpl decided that a new
    I420 frame needs to be produced to the moment when it was ready to deliver
    it. This encompasses the `Viz.FrameSinkVideoCapturer.I420.CaptureDuration`
    time, but also includes time taken to render video capture overlays.
  </summary>
</histogram>

<histogram name="Viz.FrameSinkVideoCapturer.NV12.CaptureDuration" units="ms"
    expires_after="2023-07-15">
  <owner>bialpio@chromium.org</owner>
  <owner>media-capture-dev@chromium.org</owner>
  <summary>
    The time it took from when FrameSinkVideoCapturerImpl sent a request for an
    NV12 copy until the result comes back.

    Note: The histogram logging was adjusted in M102 to align with how
    `Viz.FrameSinkVideoCapturer.[RGBA/I420].CaptureDuration` histograms behave.
    After the change, this histogram also started including the time taken to
    set the color space on a video frame.
  </summary>
</histogram>

<histogram name="Viz.FrameSinkVideoCapturer.NV12.CaptureSucceeded"
    enum="BooleanSuccess" expires_after="2023-07-15">
  <owner>bialpio@chromium.org</owner>
  <owner>media-capture-dev@chromium.org</owner>
  <summary>
    Whether an NV12 capture initiated by FrameSinkVideoCapturerImpl succeeded.
  </summary>
</histogram>

<histogram name="Viz.FrameSinkVideoCapturer.NV12.TotalDuration" units="ms"
    expires_after="2023-07-15">
  <owner>bialpio@chromium.org</owner>
  <owner>media-capture-dev@chromium.org</owner>
  <summary>
    The time it took from when FrameSinkVideoCapturerImpl decided that a new
    NV12 frame needs to be produced to the moment when it was ready to deliver
    it. This encompasses the `Viz.FrameSinkVideoCapturer.NV12.CaptureDuration`
    time.
  </summary>
</histogram>

<histogram name="Viz.FrameSinkVideoCapturer.ReserveFrameDuration" units="ms"
    expires_after="2023-07-15">
  <owner>bialpio@chromium.org</owner>
  <owner>media-capture-dev@chromium.org</owner>
  <summary>
    The time it took for a frame pool to reserve a video frame that would then
    have its contents populated by the capturer. Will be logged only when
    `Viz.FrameSinkVideoCapturer.FrameResurrected` is false.
  </summary>
</histogram>

<histogram name="Viz.FrameSinkVideoCapturer.RGBA.CaptureDuration" units="ms"
    expires_after="2023-07-15">
  <owner>jonross@chromium.org</owner>
  <owner>bialpio@chromium.org</owner>
  <owner>viz-team-wat@google.com</owner>
  <summary>
    The time it took from when FrameSinkVideoCapturerImpl sent a request for an
    RGBA readback until the result comes back and ReadRGBAPlane successfully
    finishes.
  </summary>
</histogram>

<histogram name="Viz.FrameSinkVideoCapturer.TotalDuration" units="ms"
    expires_after="2023-07-15">
  <owner>bialpio@chromium.org</owner>
  <owner>media-capture-dev@chromium.org</owner>
  <summary>
    The time it took from when FrameSinkVideoCapturerImpl decided that a new
    frame needs to be produced to the moment when it was ready to deliver it.
    This encompasses the `Viz.FrameSinkVideoCapturer.CaptureDuration` time, but
    also includes time taken to render video capture overlays.

    Format-agnostic version of
    `Viz.FrameSinkVideoCapturer.[NV12/I420].TotalDuration` histograms.
  </summary>
</histogram>

</histograms>

</histogram-configuration>
