From c30a6232df03e1efbd9f3b226777b07e087a1122 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 12 Oct 2020 14:27:29 +0200 Subject: BASELINE: Update Chromium to 85.0.4183.140 Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen --- chromium/ui/gl/dc_layer_tree.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'chromium/ui/gl/dc_layer_tree.cc') diff --git a/chromium/ui/gl/dc_layer_tree.cc b/chromium/ui/gl/dc_layer_tree.cc index b97cf126264..f3548fbca02 100644 --- a/chromium/ui/gl/dc_layer_tree.cc +++ b/chromium/ui/gl/dc_layer_tree.cc @@ -4,8 +4,10 @@ #include "ui/gl/dc_layer_tree.h" +#include "base/metrics/histogram_functions.h" #include "base/trace_event/trace_event.h" #include "ui/gl/direct_composition_child_surface_win.h" +#include "ui/gl/direct_composition_surface_win.h" #include "ui/gl/swap_chain_presenter.h" namespace gl { @@ -63,6 +65,8 @@ bool DCLayerTree::InitializeVideoProcessor(const gfx::Size& input_size, // This can fail if the D3D device is "Microsoft Basic Display Adapter". if (FAILED(d3d11_device_.As(&video_device_))) { DLOG(ERROR) << "Failed to retrieve video device from D3D11 device"; + DCHECK(false); + DirectCompositionSurfaceWin::DisableOverlays(); return false; } DCHECK(video_device_); @@ -97,17 +101,27 @@ bool DCLayerTree::InitializeVideoProcessor(const gfx::Size& input_size, desc.Usage = D3D11_VIDEO_USAGE_PLAYBACK_NORMAL; HRESULT hr = video_device_->CreateVideoProcessorEnumerator( &desc, &video_processor_enumerator_); + base::UmaHistogramSparse( + "GPU.DirectComposition.CreateVideoProcessorEnumerator", hr); if (FAILED(hr)) { DLOG(ERROR) << "CreateVideoProcessorEnumerator failed with error 0x" << std::hex << hr; + // It might fail again next time. Disable overlay support so + // overlay processor will stop sending down overlay frames. + DirectCompositionSurfaceWin::DisableOverlays(); return false; } hr = video_device_->CreateVideoProcessor(video_processor_enumerator_.Get(), 0, &video_processor_); + base::UmaHistogramSparse( + "GPU.DirectComposition.VideoDeviceCreateVideoProcessor", hr); if (FAILED(hr)) { DLOG(ERROR) << "CreateVideoProcessor failed with error 0x" << std::hex << hr; + // It might fail again next time. Disable overlay support so + // overlay processor will stop sending down overlay frames. + DirectCompositionSurfaceWin::DisableOverlays(); return false; } -- cgit v1.2.1