diff options
Diffstat (limited to 'chromium/ui/gl')
71 files changed, 1504 insertions, 1038 deletions
diff --git a/chromium/ui/gl/BUILD.gn b/chromium/ui/gl/BUILD.gn index a3bc53748ce..b815fda06ed 100644 --- a/chromium/ui/gl/BUILD.gn +++ b/chromium/ui/gl/BUILD.gn @@ -5,6 +5,7 @@ import("//build/buildflag_header.gni") import("//build/config/chrome_build.gni") import("//build/config/chromecast_build.gni") +import("//build/config/chromeos/ui_mode.gni") import("//build/config/linux/pkg_config.gni") import("//build/config/ozone.gni") import("//build/config/ui.gni") @@ -30,6 +31,7 @@ buildflag_header("buildflags") { "ENABLE_SWIFTSHADER=$enable_swiftshader", "USE_DAWN=$use_dawn", "USE_STATIC_ANGLE=$use_static_angle", + "USE_OPENGL_APITRACE=$enable_opengl_apitrace", ] } @@ -165,6 +167,7 @@ component("gl") { deps = [ ":buildflags", "//base/third_party/dynamic_annotations", + "//build:chromeos_buildflags", # ANGLE includes are used cross-platform. "//third_party/angle:includes", @@ -510,6 +513,14 @@ static_library("test_support") { if (use_ozone) { deps += [ "//ui/ozone" ] } + + # If the run-time search path isn't set properly when we use ANGLE with its + # Vulkan backend, it may end up finding the system libvulkan.so rather than + # the one built in the output directory + if ((is_linux || is_chromeos) && !is_component_build) { + all_dependent_configs = + [ "//build/config/gcc:rpath_for_built_shared_libraries" ] + } } source_set("run_all_unittests") { @@ -579,7 +590,7 @@ test("gl_unittests") { sources += [ "gl_image_ahardwarebuffer_unittest.cc" ] } - if (is_linux) { + if (is_linux || is_chromeos_lacros) { sources += [ "gl_image_native_pixmap_unittest.cc" ] } diff --git a/chromium/ui/gl/DIR_METADATA b/chromium/ui/gl/DIR_METADATA new file mode 100644 index 00000000000..e353adfc5e6 --- /dev/null +++ b/chromium/ui/gl/DIR_METADATA @@ -0,0 +1,4 @@ +monorail: { + component: "Internals>GPU>Internals" +} +team_email: "graphics-dev@chromium.org" diff --git a/chromium/ui/gl/OWNERS b/chromium/ui/gl/OWNERS index cb9ad84e7fd..1f6eeb27894 100644 --- a/chromium/ui/gl/OWNERS +++ b/chromium/ui/gl/OWNERS @@ -6,7 +6,7 @@ per-file *gl_image*=dcastagna@chromium.org per-file *_ozone*=alexst@chromium.org per-file *_ozone*=dnicoara@chromium.org per-file *_ozone*=spang@chromium.org -per-file *surface_control*=khushalsagar@chromium.org +per-file *surface_control*=vasilyt@chromium.org -# COMPONENT: Internals>GPU>Internals -# TEAM: graphics-dev@chromium.org +# For Windows Direct Composition and Swap Chain +magchen@chromium.org diff --git a/chromium/ui/gl/angle_platform_impl.cc b/chromium/ui/gl/angle_platform_impl.cc index 980a7ba99e9..5401759f349 100644 --- a/chromium/ui/gl/angle_platform_impl.cc +++ b/chromium/ui/gl/angle_platform_impl.cc @@ -155,9 +155,9 @@ bool InitializePlatform(EGLDisplay display) { if (!angle_get_platform(static_cast<EGLDisplayType>(display), g_PlatformMethodNames, g_NumPlatformMethods, nullptr, &platformMethods)) - platformMethods->currentTime = ANGLEPlatformImpl_currentTime; - platformMethods->addTraceEvent = ANGLEPlatformImpl_addTraceEvent; + return false; platformMethods->currentTime = ANGLEPlatformImpl_currentTime; + platformMethods->addTraceEvent = ANGLEPlatformImpl_addTraceEvent; platformMethods->getTraceCategoryEnabledFlag = ANGLEPlatformImpl_getTraceCategoryEnabledFlag; platformMethods->histogramBoolean = ANGLEPlatformImpl_histogramBoolean; diff --git a/chromium/ui/gl/dc_layer_tree.cc b/chromium/ui/gl/dc_layer_tree.cc index 139613b65d1..760dc2ffb55 100644 --- a/chromium/ui/gl/dc_layer_tree.cc +++ b/chromium/ui/gl/dc_layer_tree.cc @@ -12,19 +12,51 @@ #include "ui/gl/direct_composition_surface_win.h" #include "ui/gl/swap_chain_presenter.h" +// Required for SFINAE to check if these Win10 types exist. +struct IDCompositionInkTrailDevice; + namespace gl { namespace { bool SizeContains(const gfx::Size& a, const gfx::Size& b) { return gfx::Rect(a).Contains(gfx::Rect(b)); } + +// SFINAE used to enable building before Delegated Ink types are available in +// the Win10 SDK. +// TODO(1171374) : Remove this when the types are available in the Win10 SDK. +template <typename InkTrailDevice, typename = void> +struct DelegatedInk { + public: + static bool IsSupported( + const Microsoft::WRL::ComPtr<IDCompositionDevice2>& dcomp_device) { + return false; + } +}; + +template <typename InkTrailDevice> +struct DelegatedInk<InkTrailDevice, decltype(typeid(InkTrailDevice), void())> { + public: + static bool IsSupported( + const Microsoft::WRL::ComPtr<IDCompositionDevice2>& dcomp_device) { + Microsoft::WRL::ComPtr<InkTrailDevice> ink_trail_device; + HRESULT hr = dcomp_device.As(&ink_trail_device); + return hr == S_OK; + } +}; + } // namespace +VideoProcessorWrapper::VideoProcessorWrapper() = default; +VideoProcessorWrapper::~VideoProcessorWrapper() = default; +VideoProcessorWrapper::VideoProcessorWrapper(VideoProcessorWrapper&& other) = + default; +VideoProcessorWrapper& VideoProcessorWrapper::operator=( + VideoProcessorWrapper&& other) = default; + DCLayerTree::DCLayerTree(bool disable_nv12_dynamic_textures, - bool disable_vp_scaling, - bool reset_vp_when_colorspace_changes) + bool disable_vp_scaling) : disable_nv12_dynamic_textures_(disable_nv12_dynamic_textures), - disable_vp_scaling_(disable_vp_scaling), - reset_vp_when_colorspace_changes_(reset_vp_when_colorspace_changes) {} + disable_vp_scaling_(disable_vp_scaling) {} DCLayerTree::~DCLayerTree() = default; @@ -65,49 +97,42 @@ bool DCLayerTree::Initialize( return true; } -bool DCLayerTree::InitializeVideoProcessor( +VideoProcessorWrapper* DCLayerTree::InitializeVideoProcessor( const gfx::Size& input_size, const gfx::Size& output_size, - const gfx::ColorSpace& input_color_space, - const gfx::ColorSpace& output_color_space, - Microsoft::WRL::ComPtr<IDXGISwapChain1> swap_chain, - bool is_yuv_swapchain) { - if (!video_device_) { + bool is_hdr_output) { + VideoProcessorWrapper& video_processor_wrapper = + GetOrCreateVideoProcessor(is_hdr_output); + + if (!video_processor_wrapper.video_device) { // This can fail if the D3D device is "Microsoft Basic Display Adapter". - if (FAILED(d3d11_device_.As(&video_device_))) { + if (FAILED(d3d11_device_.As(&video_processor_wrapper.video_device))) { DLOG(ERROR) << "Failed to retrieve video device from D3D11 device"; DCHECK(false); DirectCompositionSurfaceWin::DisableOverlays(); - return false; + return nullptr; } - DCHECK(video_device_); + DCHECK(video_processor_wrapper.video_device); Microsoft::WRL::ComPtr<ID3D11DeviceContext> context; d3d11_device_->GetImmediateContext(&context); DCHECK(context); - context.As(&video_context_); - DCHECK(video_context_); + context.As(&video_processor_wrapper.video_context); + DCHECK(video_processor_wrapper.video_context); } - bool colorspace_changed = !(input_color_space == video_input_color_space_ && - output_color_space == video_output_color_space_ && - is_yuv_video_output_ == is_yuv_swapchain); - if (video_processor_ && SizeContains(video_input_size_, input_size) && - SizeContains(video_output_size_, output_size) && - !(colorspace_changed && reset_vp_when_colorspace_changes_)) { - if (colorspace_changed) { - SetColorSpaceForVideoProcessor(input_color_space, output_color_space, - std::move(swap_chain), is_yuv_swapchain); - } - return true; - } + if (video_processor_wrapper.video_processor && + SizeContains(video_processor_wrapper.video_input_size, input_size) && + SizeContains(video_processor_wrapper.video_output_size, output_size)) + return &video_processor_wrapper; + TRACE_EVENT2("gpu", "DCLayerTree::InitializeVideoProcessor", "input_size", input_size.ToString(), "output_size", output_size.ToString()); - video_input_size_ = input_size; - video_output_size_ = output_size; + video_processor_wrapper.video_input_size = input_size; + video_processor_wrapper.video_output_size = output_size; - video_processor_.Reset(); - video_processor_enumerator_.Reset(); + video_processor_wrapper.video_processor.Reset(); + video_processor_wrapper.video_processor_enumerator.Reset(); D3D11_VIDEO_PROCESSOR_CONTENT_DESC desc = {}; desc.InputFrameFormat = D3D11_VIDEO_FRAME_FORMAT_PROGRESSIVE; desc.InputFrameRate.Numerator = 60; @@ -119,8 +144,9 @@ bool DCLayerTree::InitializeVideoProcessor( desc.OutputWidth = output_size.width(); desc.OutputHeight = output_size.height(); desc.Usage = D3D11_VIDEO_USAGE_PLAYBACK_NORMAL; - HRESULT hr = video_device_->CreateVideoProcessorEnumerator( - &desc, &video_processor_enumerator_); + HRESULT hr = + video_processor_wrapper.video_device->CreateVideoProcessorEnumerator( + &desc, &video_processor_wrapper.video_processor_enumerator); base::UmaHistogramSparse( "GPU.DirectComposition.CreateVideoProcessorEnumerator", hr); if (FAILED(hr)) { @@ -129,11 +155,11 @@ bool DCLayerTree::InitializeVideoProcessor( // It might fail again next time. Disable overlay support so // overlay processor will stop sending down overlay frames. DirectCompositionSurfaceWin::DisableOverlays(); - return false; + return nullptr; } - - hr = video_device_->CreateVideoProcessor(video_processor_enumerator_.Get(), 0, - &video_processor_); + hr = video_processor_wrapper.video_device->CreateVideoProcessor( + video_processor_wrapper.video_processor_enumerator.Get(), 0, + &video_processor_wrapper.video_processor); base::UmaHistogramSparse( "GPU.DirectComposition.VideoDeviceCreateVideoProcessor", hr); if (FAILED(hr)) { @@ -142,55 +168,21 @@ bool DCLayerTree::InitializeVideoProcessor( // It might fail again next time. Disable overlay support so // overlay processor will stop sending down overlay frames. DirectCompositionSurfaceWin::DisableOverlays(); - return false; + return nullptr; } // Auto stream processing (the default) can hurt power consumption. - video_context_->VideoProcessorSetStreamAutoProcessingMode( - video_processor_.Get(), 0, FALSE); - SetColorSpaceForVideoProcessor(input_color_space, output_color_space, - std::move(swap_chain), is_yuv_swapchain); - return true; + video_processor_wrapper.video_context + ->VideoProcessorSetStreamAutoProcessingMode( + video_processor_wrapper.video_processor.Get(), 0, FALSE); + return &video_processor_wrapper; } -void DCLayerTree::SetColorSpaceForVideoProcessor( - const gfx::ColorSpace& input_color_space, - const gfx::ColorSpace& output_color_space, - Microsoft::WRL::ComPtr<IDXGISwapChain1> swap_chain, - bool is_yuv_swapchain) { - Microsoft::WRL::ComPtr<IDXGISwapChain3> swap_chain3; - Microsoft::WRL::ComPtr<ID3D11VideoContext1> context1; - if (SUCCEEDED(swap_chain.As(&swap_chain3)) && - SUCCEEDED(video_context_.As(&context1))) { - DCHECK(swap_chain3); - DCHECK(context1); - // Set input color space. - context1->VideoProcessorSetStreamColorSpace1( - video_processor_.Get(), 0, - gfx::ColorSpaceWin::GetDXGIColorSpace(input_color_space)); - // Set output color space. - DXGI_COLOR_SPACE_TYPE output_dxgi_color_space = - gfx::ColorSpaceWin::GetDXGIColorSpace(output_color_space, - /*force_yuv=*/is_yuv_swapchain); - - if (SUCCEEDED(swap_chain3->SetColorSpace1(output_dxgi_color_space))) { - context1->VideoProcessorSetOutputColorSpace1(video_processor_.Get(), - output_dxgi_color_space); - } - } else { - // This can't handle as many different types of color spaces, so use it - // only if ID3D11VideoContext1 isn't available. - D3D11_VIDEO_PROCESSOR_COLOR_SPACE src_d3d11_color_space = - gfx::ColorSpaceWin::GetD3D11ColorSpace(input_color_space); - video_context_->VideoProcessorSetStreamColorSpace(video_processor_.Get(), 0, - &src_d3d11_color_space); - D3D11_VIDEO_PROCESSOR_COLOR_SPACE output_d3d11_color_space = - gfx::ColorSpaceWin::GetD3D11ColorSpace(output_color_space); - video_context_->VideoProcessorSetOutputColorSpace( - video_processor_.Get(), &output_d3d11_color_space); - } - video_input_color_space_ = input_color_space; - video_output_color_space_ = output_color_space; - is_yuv_video_output_ = is_yuv_swapchain; +VideoProcessorWrapper& DCLayerTree::GetOrCreateVideoProcessor(bool is_hdr) { + VideoProcessorType video_processor_type = + is_hdr ? VideoProcessorType::kHDR : VideoProcessorType::kSDR; + return video_processor_map_ + .try_emplace(video_processor_type, VideoProcessorWrapper()) + .first->second; } Microsoft::WRL::ComPtr<IDXGISwapChain1> @@ -335,4 +327,8 @@ void DCLayerTree::SetFrameRate(float frame_rate) { video_swap_chains_[ii]->SetFrameRate(frame_rate); } +bool DCLayerTree::SupportsDelegatedInk() { + return DelegatedInk<IDCompositionInkTrailDevice>::IsSupported(dcomp_device_); +} + } // namespace gl diff --git a/chromium/ui/gl/dc_layer_tree.h b/chromium/ui/gl/dc_layer_tree.h index 90109a3efbb..ec7d925d928 100644 --- a/chromium/ui/gl/dc_layer_tree.h +++ b/chromium/ui/gl/dc_layer_tree.h @@ -12,6 +12,7 @@ #include <memory> +#include "base/containers/flat_map.h" #include "ui/gfx/color_space_win.h" #include "ui/gfx/geometry/size.h" #include "ui/gl/dc_renderer_layer_params.h" @@ -22,15 +23,41 @@ namespace gl { class DirectCompositionChildSurfaceWin; class SwapChainPresenter; +enum class VideoProcessorType { kSDR, kHDR }; + +// Cache video processor and its size. +struct VideoProcessorWrapper { + VideoProcessorWrapper(); + ~VideoProcessorWrapper(); + VideoProcessorWrapper(VideoProcessorWrapper&& other); + VideoProcessorWrapper& operator=(VideoProcessorWrapper&& other); + VideoProcessorWrapper(const VideoProcessorWrapper&) = delete; + VideoProcessorWrapper& operator=(VideoProcessorWrapper& other) = delete; + + // Input and output size of video processor . + gfx::Size video_input_size; + gfx::Size video_output_size; + + // The video processor is cached so SwapChains don't have to recreate it + // whenever they're created. + Microsoft::WRL::ComPtr<ID3D11VideoDevice> video_device; + Microsoft::WRL::ComPtr<ID3D11VideoContext> video_context; + Microsoft::WRL::ComPtr<ID3D11VideoProcessor> video_processor; + Microsoft::WRL::ComPtr<ID3D11VideoProcessorEnumerator> + video_processor_enumerator; +}; + // DCLayerTree manages a tree of direct composition visuals, and associated // swap chains for given overlay layers. It maintains a list of pending layers // submitted using ScheduleDCLayer() that are presented and committed in // CommitAndClearPendingOverlays(). class DCLayerTree { public: - DCLayerTree(bool disable_nv12_dynamic_textures, - bool disable_vp_scaling, - bool reset_vp_when_colorspace_changes); + using VideoProcessorMap = + base::flat_map<VideoProcessorType, VideoProcessorWrapper>; + + DCLayerTree(bool disable_nv12_dynamic_textures, bool disable_vp_scaling); + ~DCLayerTree(); // Returns true on success. @@ -50,13 +77,9 @@ class DCLayerTree { // at least given input and output size. The video processor is shared across // layers so the same one can be reused if it's large enough. Returns true on // success. - bool InitializeVideoProcessor( - const gfx::Size& input_size, - const gfx::Size& output_size, - const gfx::ColorSpace& input_color_space, - const gfx::ColorSpace& output_color_space, - Microsoft::WRL::ComPtr<IDXGISwapChain1> swap_chain, - bool is_yuv_swapchain); + VideoProcessorWrapper* InitializeVideoProcessor(const gfx::Size& input_size, + const gfx::Size& output_size, + bool is_hdr_output); void SetNeedsRebuildVisualTree() { needs_rebuild_visual_tree_ = true; } @@ -66,22 +89,7 @@ class DCLayerTree { bool disable_vp_scaling() const { return disable_vp_scaling_; } - const Microsoft::WRL::ComPtr<ID3D11VideoDevice>& video_device() const { - return video_device_; - } - - const Microsoft::WRL::ComPtr<ID3D11VideoContext>& video_context() const { - return video_context_; - } - - const Microsoft::WRL::ComPtr<ID3D11VideoProcessor>& video_processor() const { - return video_processor_; - } - - const Microsoft::WRL::ComPtr<ID3D11VideoProcessorEnumerator>& - video_processor_enumerator() const { - return video_processor_enumerator_; - } + VideoProcessorWrapper& GetOrCreateVideoProcessor(bool is_hdr); Microsoft::WRL::ComPtr<IDXGISwapChain1> GetLayerSwapChainForTesting( size_t index) const; @@ -99,38 +107,24 @@ class DCLayerTree { HWND window() const { return window_; } - private: - void SetColorSpaceForVideoProcessor( - const gfx::ColorSpace& input_color_space, - const gfx::ColorSpace& output_color_space, - Microsoft::WRL::ComPtr<IDXGISwapChain1> swap_chain, - bool is_yuv_swapchain); + bool SupportsDelegatedInk(); + private: const bool disable_nv12_dynamic_textures_; const bool disable_vp_scaling_; - const bool reset_vp_when_colorspace_changes_; HWND window_; Microsoft::WRL::ComPtr<ID3D11Device> d3d11_device_; Microsoft::WRL::ComPtr<IDCompositionDevice2> dcomp_device_; Microsoft::WRL::ComPtr<IDCompositionTarget> dcomp_target_; - // The video processor is cached so SwapChains don't have to recreate it - // whenever they're created. - Microsoft::WRL::ComPtr<ID3D11VideoDevice> video_device_; - Microsoft::WRL::ComPtr<ID3D11VideoContext> video_context_; - Microsoft::WRL::ComPtr<ID3D11VideoProcessor> video_processor_; - Microsoft::WRL::ComPtr<ID3D11VideoProcessorEnumerator> - video_processor_enumerator_; - - // Current video processor input and output size. - gfx::Size video_input_size_; - gfx::Size video_output_size_; + // Store video processor for SDR/HDR mode separately, which could avoid + // problem in (http://crbug.com/1121061). + VideoProcessorMap video_processor_map_; // Current video processor input and output colorspace. gfx::ColorSpace video_input_color_space_; gfx::ColorSpace video_output_color_space_; - bool is_yuv_video_output_ = false; // Set to true if a direct composition visual tree needs rebuild. bool needs_rebuild_visual_tree_ = false; diff --git a/chromium/ui/gl/direct_composition_child_surface_win.cc b/chromium/ui/gl/direct_composition_child_surface_win.cc index e53dea9f034..d8380cd7360 100644 --- a/chromium/ui/gl/direct_composition_child_surface_win.cc +++ b/chromium/ui/gl/direct_composition_child_surface_win.cc @@ -23,6 +23,7 @@ #include "ui/gl/direct_composition_surface_win.h" #include "ui/gl/egl_util.h" #include "ui/gl/gl_angle_util_win.h" +#include "ui/gl/gl_bindings.h" #include "ui/gl/gl_context.h" #include "ui/gl/gl_surface_egl.h" #include "ui/gl/gl_switches.h" diff --git a/chromium/ui/gl/direct_composition_surface_win.cc b/chromium/ui/gl/direct_composition_surface_win.cc index 2d6e985dda7..cbc5c013068 100644 --- a/chromium/ui/gl/direct_composition_surface_win.cc +++ b/chromium/ui/gl/direct_composition_surface_win.cc @@ -20,6 +20,8 @@ #include "ui/gl/dc_layer_tree.h" #include "ui/gl/direct_composition_child_surface_win.h" #include "ui/gl/gl_angle_util_win.h" +#include "ui/gl/gl_bindings.h" +#include "ui/gl/gl_features.h" #include "ui/gl/gl_implementation.h" #include "ui/gl/gl_switches.h" #include "ui/gl/gpu_switching_manager.h" @@ -40,6 +42,8 @@ bool g_supports_overlays = false; bool g_decode_swap_chain_disabled = false; // Whether to force the nv12 overlay support. bool g_force_nv12_overlay_support = false; +// Whether software overlays have been disabled. +bool g_disable_sw_overlays = false; // The lock to guard g_overlay_caps_valid and g_supports_overlays. base::Lock& GetOverlayLock() { @@ -57,6 +61,12 @@ void SetSupportsOverlays(bool support) { g_supports_overlays = support; } +bool SupportsSoftwareOverlays() { + return base::FeatureList::IsEnabled( + features::kDirectCompositionSoftwareOverlays) && + !g_disable_sw_overlays; +} + bool OverlayCapsValid() { base::AutoLock auto_lock(GetOverlayLock()); return g_overlay_caps_valid; @@ -251,8 +261,7 @@ void GetGpuDriverOverlayInfo(bool* supports_overlays, base::UmaHistogramBoolean("GPU.DirectComposition.HardwareOverlaysSupported", *supports_overlays); - if (*supports_overlays || !base::FeatureList::IsEnabled( - features::kDirectCompositionSoftwareOverlays)) { + if (*supports_overlays || !SupportsSoftwareOverlays()) { return; } @@ -359,10 +368,9 @@ DirectCompositionSurfaceWin::DirectCompositionSurfaceWin( settings.use_angle_texture_offset, settings.max_pending_frames, settings.force_root_surface_full_damage)), - layer_tree_(std::make_unique<DCLayerTree>( - settings.disable_nv12_dynamic_textures, - settings.disable_vp_scaling, - settings.reset_vp_when_colorspace_changes)) { + layer_tree_( + std::make_unique<DCLayerTree>(settings.disable_nv12_dynamic_textures, + settings.disable_vp_scaling)) { ui::GpuSwitchingManager::GetInstance()->AddObserver(this); } @@ -464,6 +472,11 @@ void DirectCompositionSurfaceWin::DisableOverlays() { } // static +void DirectCompositionSurfaceWin::DisableSoftwareOverlays() { + g_disable_sw_overlays = true; +} + +// static void DirectCompositionSurfaceWin::InvalidateOverlayCaps() { SetOverlayCapsValid(false); } @@ -473,9 +486,7 @@ bool DirectCompositionSurfaceWin::AreScaledOverlaysSupported() { UpdateOverlaySupport(); if (g_overlay_format_used == DXGI_FORMAT_NV12) { return (g_nv12_overlay_support_flags & DXGI_OVERLAY_SUPPORT_FLAG_SCALING) || - (SupportsOverlays() && - base::FeatureList::IsEnabled( - features::kDirectCompositionSoftwareOverlays)); + (SupportsOverlays() && SupportsSoftwareOverlays()); } else if (g_overlay_format_used == DXGI_FORMAT_YUY2) { return !!(g_yuy2_overlay_support_flags & DXGI_OVERLAY_SUPPORT_FLAG_SCALING); } else { @@ -653,8 +664,7 @@ bool DirectCompositionSurfaceWin::IsSwapChainTearingSupported() { // static bool DirectCompositionSurfaceWin::AllowTearing() { // Swap chain tearing is used only if vsync is disabled explicitly. - return base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kDisableGpuVsync) && + return !features::UseGpuVsync() && DirectCompositionSurfaceWin::IsSwapChainTearingSupported(); } @@ -860,6 +870,10 @@ void DirectCompositionSurfaceWin::OnDisplayMetricsChanged() { UpdateMonitorInfo(); } +bool DirectCompositionSurfaceWin::SupportsDelegatedInk() { + return layer_tree_->SupportsDelegatedInk(); +} + scoped_refptr<base::TaskRunner> DirectCompositionSurfaceWin::GetWindowTaskRunnerForTesting() { return child_window_.GetTaskRunnerForTesting(); diff --git a/chromium/ui/gl/direct_composition_surface_win.h b/chromium/ui/gl/direct_composition_surface_win.h index a86764207a2..03da756a3f4 100644 --- a/chromium/ui/gl/direct_composition_surface_win.h +++ b/chromium/ui/gl/direct_composition_surface_win.h @@ -35,7 +35,6 @@ class GL_EXPORT DirectCompositionSurfaceWin : public GLSurfaceEGL, bool disable_vp_scaling = false; size_t max_pending_frames = 2; bool use_angle_texture_offset = false; - bool reset_vp_when_colorspace_changes = false; bool force_root_surface_full_damage = false; }; @@ -63,6 +62,9 @@ class GL_EXPORT DirectCompositionSurfaceWin : public GLSurfaceEGL, // current GPU process' lifetime. static void DisableOverlays(); + // Similar to the above but disables software overlay support. + static void DisableSoftwareOverlays(); + // Indicate the overlay caps are invalid. static void InvalidateOverlayCaps(); @@ -150,6 +152,8 @@ class GL_EXPORT DirectCompositionSurfaceWin : public GLSurfaceEGL, void OnDisplayRemoved() override; void OnDisplayMetricsChanged() override; + bool SupportsDelegatedInk() override; + HWND window() const { return window_; } scoped_refptr<base::TaskRunner> GetWindowTaskRunnerForTesting(); diff --git a/chromium/ui/gl/direct_composition_surface_win_unittest.cc b/chromium/ui/gl/direct_composition_surface_win_unittest.cc index df97d0b1f5a..1f575daeda8 100644 --- a/chromium/ui/gl/direct_composition_surface_win_unittest.cc +++ b/chromium/ui/gl/direct_composition_surface_win_unittest.cc @@ -26,6 +26,7 @@ #include "ui/gl/dc_renderer_layer_params.h" #include "ui/gl/direct_composition_child_surface_win.h" #include "ui/gl/gl_angle_util_win.h" +#include "ui/gl/gl_bindings.h" #include "ui/gl/gl_context.h" #include "ui/gl/gl_image_d3d.h" #include "ui/gl/gl_image_dxgi.h" @@ -949,7 +950,8 @@ TEST_F(DirectCompositionPixelTest, YUY2SwapChain) { // CreateSwapChainForCompositionSurfaceHandle fails with YUY2 format on // Win10/AMD bot (Radeon RX550). See https://crbug.com/967860. if (context_ && context_->GetVersionInfo() && - context_->GetVersionInfo()->driver_vendor == "ANGLE (AMD)") + context_->GetVersionInfo()->driver_vendor.find("AMD") != + std::string::npos) return; // Swap chain size is overridden to content rect size only if scaled overlays @@ -1163,6 +1165,11 @@ TEST_F(DirectCompositionPixelTest, ResizeVideoLayer) { TEST_F(DirectCompositionPixelTest, SwapChainImage) { if (!surface_) return; + // Fails on AMD RX 5500 XT. https://crbug.com/1152565. + if (context_ && context_->GetVersionInfo() && + context_->GetVersionInfo()->driver_vendor.find("AMD") != + std::string::npos) + return; Microsoft::WRL::ComPtr<ID3D11Device> d3d11_device = QueryD3D11DeviceObjectFromANGLE(); diff --git a/chromium/ui/gl/features.gni b/chromium/ui/gl/features.gni index 6d4973d40bb..7fbcd0d8175 100644 --- a/chromium/ui/gl/features.gni +++ b/chromium/ui/gl/features.gni @@ -2,9 +2,13 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//build/config/chromecast_build.gni") +import("//build/config/chromeos/ui_mode.gni") +import("//build/config/chromeos/ui_mode.gni") +import("//build/util/version.gni") + declare_args() { # Should ANGLE be linked statically? - # False by default, enabling currently supported only on Android use_static_angle = false # Should EGL support be compiled? @@ -23,7 +27,7 @@ declare_args() { declare_args() { enable_swiftshader = (is_win || is_linux || is_chromeos || - (is_mac && use_egl) || is_chromeos || is_fuchsia) && + (is_mac && use_egl) || is_chromeos_ash || is_fuchsia) && (target_cpu == "x86" || target_cpu == "x64" || target_cpu == "arm" || target_cpu == "arm64" || target_cpu == "mipsel" || target_cpu == "mips64el") diff --git a/chromium/ui/gl/generate_bindings.py b/chromium/ui/gl/generate_bindings.py index a6f5b1d757b..0713478139a 100755 --- a/chromium/ui/gl/generate_bindings.py +++ b/chromium/ui/gl/generate_bindings.py @@ -3418,7 +3418,7 @@ void DriverEGL::InitializeExtensionBindings() { file.write('%s Trace%sApi::%sFn(%s) {\n' % (return_type, set_name.upper(), function_name, arguments)) argument_names = MakeArgNames(arguments) - file.write(' TRACE_EVENT_BINARY_EFFICIENT0("gpu", "Trace%sAPI::%s")\n' % + file.write(' TRACE_EVENT_BINARY_EFFICIENT0("gpu", "Trace%sAPI::%s");\n' % (set_name.upper(), function_name)) if return_type == 'void': file.write(' %s_api_->%sFn(%s);\n' % diff --git a/chromium/ui/gl/gl_angle_util_win.cc b/chromium/ui/gl/gl_angle_util_win.cc index ef04c3977bd..4545ea30250 100644 --- a/chromium/ui/gl/gl_angle_util_win.cc +++ b/chromium/ui/gl/gl_angle_util_win.cc @@ -9,6 +9,7 @@ #include "base/trace_event/trace_event.h" #include "third_party/angle/include/EGL/egl.h" #include "third_party/angle/include/EGL/eglext.h" +#include "ui/gl/gl_bindings.h" #include "ui/gl/gl_surface_egl.h" namespace gl { @@ -23,7 +24,7 @@ void* QueryDeviceObjectFromANGLE(int object_type) { egl_display = gl::GLSurfaceEGL::GetHardwareDisplay(); } - if (!gl::GLSurfaceEGL::HasEGLExtension("EGL_EXT_device_query")) + if (!gl::GLSurfaceEGL::HasEGLClientExtension("EGL_EXT_device_query")) return nullptr; PFNEGLQUERYDISPLAYATTRIBEXTPROC QueryDisplayAttribEXT = nullptr; diff --git a/chromium/ui/gl/gl_bindings_autogen_egl.cc b/chromium/ui/gl/gl_bindings_autogen_egl.cc index 43135771bd0..95f23832039 100644 --- a/chromium/ui/gl/gl_bindings_autogen_egl.cc +++ b/chromium/ui/gl/gl_bindings_autogen_egl.cc @@ -891,14 +891,14 @@ EGLint EGLApiBase::eglWaitSyncKHRFn(EGLDisplay dpy, } EGLBoolean TraceEGLApi::eglBindAPIFn(EGLenum api) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglBindAPI") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglBindAPI"); return egl_api_->eglBindAPIFn(api); } EGLBoolean TraceEGLApi::eglBindTexImageFn(EGLDisplay dpy, EGLSurface surface, EGLint buffer) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglBindTexImage") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglBindTexImage"); return egl_api_->eglBindTexImageFn(dpy, surface, buffer); } @@ -907,7 +907,7 @@ EGLBoolean TraceEGLApi::eglChooseConfigFn(EGLDisplay dpy, EGLConfig* configs, EGLint config_size, EGLint* num_config) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglChooseConfig") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglChooseConfig"); return egl_api_->eglChooseConfigFn(dpy, attrib_list, configs, config_size, num_config); } @@ -916,14 +916,14 @@ EGLint TraceEGLApi::eglClientWaitSyncKHRFn(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglClientWaitSyncKHR") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglClientWaitSyncKHR"); return egl_api_->eglClientWaitSyncKHRFn(dpy, sync, flags, timeout); } EGLBoolean TraceEGLApi::eglCopyBuffersFn(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglCopyBuffers") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglCopyBuffers"); return egl_api_->eglCopyBuffersFn(dpy, surface, target); } @@ -931,7 +931,7 @@ EGLContext TraceEGLApi::eglCreateContextFn(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint* attrib_list) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglCreateContext") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglCreateContext"); return egl_api_->eglCreateContextFn(dpy, config, share_context, attrib_list); } @@ -940,7 +940,7 @@ EGLImageKHR TraceEGLApi::eglCreateImageKHRFn(EGLDisplay dpy, EGLenum target, EGLClientBuffer buffer, const EGLint* attrib_list) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglCreateImageKHR") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglCreateImageKHR"); return egl_api_->eglCreateImageKHRFn(dpy, ctx, target, buffer, attrib_list); } @@ -950,8 +950,8 @@ EGLSurface TraceEGLApi::eglCreatePbufferFromClientBufferFn( void* buffer, EGLConfig config, const EGLint* attrib_list) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceEGLAPI::eglCreatePbufferFromClientBuffer") + TRACE_EVENT_BINARY_EFFICIENT0( + "gpu", "TraceEGLAPI::eglCreatePbufferFromClientBuffer"); return egl_api_->eglCreatePbufferFromClientBufferFn(dpy, buftype, buffer, config, attrib_list); } @@ -959,7 +959,7 @@ EGLSurface TraceEGLApi::eglCreatePbufferFromClientBufferFn( EGLSurface TraceEGLApi::eglCreatePbufferSurfaceFn(EGLDisplay dpy, EGLConfig config, const EGLint* attrib_list) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglCreatePbufferSurface") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglCreatePbufferSurface"); return egl_api_->eglCreatePbufferSurfaceFn(dpy, config, attrib_list); } @@ -967,13 +967,13 @@ EGLSurface TraceEGLApi::eglCreatePixmapSurfaceFn(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint* attrib_list) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglCreatePixmapSurface") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglCreatePixmapSurface"); return egl_api_->eglCreatePixmapSurfaceFn(dpy, config, pixmap, attrib_list); } EGLStreamKHR TraceEGLApi::eglCreateStreamKHRFn(EGLDisplay dpy, const EGLint* attrib_list) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglCreateStreamKHR") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglCreateStreamKHR"); return egl_api_->eglCreateStreamKHRFn(dpy, attrib_list); } @@ -982,7 +982,7 @@ EGLBoolean TraceEGLApi::eglCreateStreamProducerD3DTextureANGLEFn( EGLStreamKHR stream, EGLAttrib* attrib_list) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceEGLAPI::eglCreateStreamProducerD3DTextureANGLE") + "gpu", "TraceEGLAPI::eglCreateStreamProducerD3DTextureANGLE"); return egl_api_->eglCreateStreamProducerD3DTextureANGLEFn(dpy, stream, attrib_list); } @@ -990,7 +990,7 @@ EGLBoolean TraceEGLApi::eglCreateStreamProducerD3DTextureANGLEFn( EGLSyncKHR TraceEGLApi::eglCreateSyncKHRFn(EGLDisplay dpy, EGLenum type, const EGLint* attrib_list) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglCreateSyncKHR") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglCreateSyncKHR"); return egl_api_->eglCreateSyncKHRFn(dpy, type, attrib_list); } @@ -998,48 +998,49 @@ EGLSurface TraceEGLApi::eglCreateWindowSurfaceFn(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint* attrib_list) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglCreateWindowSurface") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglCreateWindowSurface"); return egl_api_->eglCreateWindowSurfaceFn(dpy, config, win, attrib_list); } EGLint TraceEGLApi::eglDebugMessageControlKHRFn(EGLDEBUGPROCKHR callback, const EGLAttrib* attrib_list) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglDebugMessageControlKHR") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", + "TraceEGLAPI::eglDebugMessageControlKHR"); return egl_api_->eglDebugMessageControlKHRFn(callback, attrib_list); } EGLBoolean TraceEGLApi::eglDestroyContextFn(EGLDisplay dpy, EGLContext ctx) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglDestroyContext") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglDestroyContext"); return egl_api_->eglDestroyContextFn(dpy, ctx); } EGLBoolean TraceEGLApi::eglDestroyImageKHRFn(EGLDisplay dpy, EGLImageKHR image) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglDestroyImageKHR") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglDestroyImageKHR"); return egl_api_->eglDestroyImageKHRFn(dpy, image); } EGLBoolean TraceEGLApi::eglDestroyStreamKHRFn(EGLDisplay dpy, EGLStreamKHR stream) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglDestroyStreamKHR") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglDestroyStreamKHR"); return egl_api_->eglDestroyStreamKHRFn(dpy, stream); } EGLBoolean TraceEGLApi::eglDestroySurfaceFn(EGLDisplay dpy, EGLSurface surface) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglDestroySurface") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglDestroySurface"); return egl_api_->eglDestroySurfaceFn(dpy, surface); } EGLBoolean TraceEGLApi::eglDestroySyncKHRFn(EGLDisplay dpy, EGLSyncKHR sync) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglDestroySyncKHR") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglDestroySyncKHR"); return egl_api_->eglDestroySyncKHRFn(dpy, sync); } EGLint TraceEGLApi::eglDupNativeFenceFDANDROIDFn(EGLDisplay dpy, EGLSyncKHR sync) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceEGLAPI::eglDupNativeFenceFDANDROID") + "TraceEGLAPI::eglDupNativeFenceFDANDROID"); return egl_api_->eglDupNativeFenceFDANDROIDFn(dpy, sync); } @@ -1048,7 +1049,7 @@ EGLBoolean TraceEGLApi::eglExportDMABUFImageMESAFn(EGLDisplay dpy, int* fds, EGLint* strides, EGLint* offsets) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglExportDMABUFImageMESA") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglExportDMABUFImageMESA"); return egl_api_->eglExportDMABUFImageMESAFn(dpy, image, fds, strides, offsets); } @@ -1060,7 +1061,7 @@ EGLBoolean TraceEGLApi::eglExportDMABUFImageQueryMESAFn( int* num_planes, EGLuint64KHR* modifiers) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceEGLAPI::eglExportDMABUFImageQueryMESA") + "TraceEGLAPI::eglExportDMABUFImageQueryMESA"); return egl_api_->eglExportDMABUFImageQueryMESAFn(dpy, image, fourcc, num_planes, modifiers); } @@ -1072,7 +1073,7 @@ EGLBoolean TraceEGLApi::eglGetCompositorTimingANDROIDFn( EGLint* names, EGLnsecsANDROID* values) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceEGLAPI::eglGetCompositorTimingANDROID") + "TraceEGLAPI::eglGetCompositorTimingANDROID"); return egl_api_->eglGetCompositorTimingANDROIDFn(dpy, surface, numTimestamps, names, values); } @@ -1082,7 +1083,7 @@ EGLBoolean TraceEGLApi::eglGetCompositorTimingSupportedANDROIDFn( EGLSurface surface, EGLint timestamp) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceEGLAPI::eglGetCompositorTimingSupportedANDROID") + "gpu", "TraceEGLAPI::eglGetCompositorTimingSupportedANDROID"); return egl_api_->eglGetCompositorTimingSupportedANDROIDFn(dpy, surface, timestamp); } @@ -1091,7 +1092,7 @@ EGLBoolean TraceEGLApi::eglGetConfigAttribFn(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglGetConfigAttrib") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglGetConfigAttrib"); return egl_api_->eglGetConfigAttribFn(dpy, config, attribute, value); } @@ -1099,32 +1100,32 @@ EGLBoolean TraceEGLApi::eglGetConfigsFn(EGLDisplay dpy, EGLConfig* configs, EGLint config_size, EGLint* num_config) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglGetConfigs") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglGetConfigs"); return egl_api_->eglGetConfigsFn(dpy, configs, config_size, num_config); } EGLContext TraceEGLApi::eglGetCurrentContextFn(void) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglGetCurrentContext") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglGetCurrentContext"); return egl_api_->eglGetCurrentContextFn(); } EGLDisplay TraceEGLApi::eglGetCurrentDisplayFn(void) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglGetCurrentDisplay") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglGetCurrentDisplay"); return egl_api_->eglGetCurrentDisplayFn(); } EGLSurface TraceEGLApi::eglGetCurrentSurfaceFn(EGLint readdraw) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglGetCurrentSurface") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglGetCurrentSurface"); return egl_api_->eglGetCurrentSurfaceFn(readdraw); } EGLDisplay TraceEGLApi::eglGetDisplayFn(EGLNativeDisplayType display_id) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglGetDisplay") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglGetDisplay"); return egl_api_->eglGetDisplayFn(display_id); } EGLint TraceEGLApi::eglGetErrorFn(void) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglGetError") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglGetError"); return egl_api_->eglGetErrorFn(); } @@ -1136,7 +1137,7 @@ EGLBoolean TraceEGLApi::eglGetFrameTimestampsANDROIDFn( EGLint* timestamps, EGLnsecsANDROID* values) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceEGLAPI::eglGetFrameTimestampsANDROID") + "TraceEGLAPI::eglGetFrameTimestampsANDROID"); return egl_api_->eglGetFrameTimestampsANDROIDFn( dpy, surface, frameId, numTimestamps, timestamps, values); } @@ -1146,7 +1147,7 @@ EGLBoolean TraceEGLApi::eglGetFrameTimestampSupportedANDROIDFn( EGLSurface surface, EGLint timestamp) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceEGLAPI::eglGetFrameTimestampSupportedANDROID") + "gpu", "TraceEGLAPI::eglGetFrameTimestampSupportedANDROID"); return egl_api_->eglGetFrameTimestampSupportedANDROIDFn(dpy, surface, timestamp); } @@ -1155,35 +1156,35 @@ EGLBoolean TraceEGLApi::eglGetMscRateANGLEFn(EGLDisplay dpy, EGLSurface surface, EGLint* numerator, EGLint* denominator) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglGetMscRateANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglGetMscRateANGLE"); return egl_api_->eglGetMscRateANGLEFn(dpy, surface, numerator, denominator); } EGLClientBuffer TraceEGLApi::eglGetNativeClientBufferANDROIDFn( const struct AHardwareBuffer* ahardwarebuffer) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceEGLAPI::eglGetNativeClientBufferANDROID") + "TraceEGLAPI::eglGetNativeClientBufferANDROID"); return egl_api_->eglGetNativeClientBufferANDROIDFn(ahardwarebuffer); } EGLBoolean TraceEGLApi::eglGetNextFrameIdANDROIDFn(EGLDisplay dpy, EGLSurface surface, EGLuint64KHR* frameId) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglGetNextFrameIdANDROID") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglGetNextFrameIdANDROID"); return egl_api_->eglGetNextFrameIdANDROIDFn(dpy, surface, frameId); } EGLDisplay TraceEGLApi::eglGetPlatformDisplayFn(EGLenum platform, void* native_display, const EGLAttrib* attrib_list) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglGetPlatformDisplay") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglGetPlatformDisplay"); return egl_api_->eglGetPlatformDisplayFn(platform, native_display, attrib_list); } __eglMustCastToProperFunctionPointerType TraceEGLApi::eglGetProcAddressFn( const char* procname) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglGetProcAddress") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglGetProcAddress"); return egl_api_->eglGetProcAddressFn(procname); } @@ -1191,7 +1192,7 @@ EGLBoolean TraceEGLApi::eglGetSyncAttribKHRFn(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglGetSyncAttribKHR") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglGetSyncAttribKHR"); return egl_api_->eglGetSyncAttribKHRFn(dpy, sync, attribute, value); } @@ -1200,12 +1201,12 @@ EGLBoolean TraceEGLApi::eglGetSyncValuesCHROMIUMFn(EGLDisplay dpy, EGLuint64CHROMIUM* ust, EGLuint64CHROMIUM* msc, EGLuint64CHROMIUM* sbc) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglGetSyncValuesCHROMIUM") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglGetSyncValuesCHROMIUM"); return egl_api_->eglGetSyncValuesCHROMIUMFn(dpy, surface, ust, msc, sbc); } void TraceEGLApi::eglHandleGPUSwitchANGLEFn(EGLDisplay dpy) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglHandleGPUSwitchANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglHandleGPUSwitchANGLE"); egl_api_->eglHandleGPUSwitchANGLEFn(dpy); } @@ -1213,14 +1214,14 @@ EGLBoolean TraceEGLApi::eglImageFlushExternalEXTFn( EGLDisplay dpy, EGLImageKHR image, const EGLAttrib* attrib_list) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglImageFlushExternalEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglImageFlushExternalEXT"); return egl_api_->eglImageFlushExternalEXTFn(dpy, image, attrib_list); } EGLBoolean TraceEGLApi::eglInitializeFn(EGLDisplay dpy, EGLint* major, EGLint* minor) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglInitialize") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglInitialize"); return egl_api_->eglInitializeFn(dpy, major, minor); } @@ -1228,7 +1229,7 @@ EGLint TraceEGLApi::eglLabelObjectKHRFn(EGLDisplay display, EGLenum objectType, EGLObjectKHR object, EGLLabelKHR label) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglLabelObjectKHR") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglLabelObjectKHR"); return egl_api_->eglLabelObjectKHRFn(display, objectType, object, label); } @@ -1236,7 +1237,7 @@ EGLBoolean TraceEGLApi::eglMakeCurrentFn(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglMakeCurrent") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglMakeCurrent"); return egl_api_->eglMakeCurrentFn(dpy, draw, read, ctx); } @@ -1246,12 +1247,12 @@ EGLBoolean TraceEGLApi::eglPostSubBufferNVFn(EGLDisplay dpy, EGLint y, EGLint width, EGLint height) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglPostSubBufferNV") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglPostSubBufferNV"); return egl_api_->eglPostSubBufferNVFn(dpy, surface, x, y, width, height); } EGLenum TraceEGLApi::eglQueryAPIFn(void) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglQueryAPI") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglQueryAPI"); return egl_api_->eglQueryAPIFn(); } @@ -1259,25 +1260,25 @@ EGLBoolean TraceEGLApi::eglQueryContextFn(EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglQueryContext") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglQueryContext"); return egl_api_->eglQueryContextFn(dpy, ctx, attribute, value); } EGLBoolean TraceEGLApi::eglQueryDebugKHRFn(EGLint attribute, EGLAttrib* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglQueryDebugKHR") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglQueryDebugKHR"); return egl_api_->eglQueryDebugKHRFn(attribute, value); } EGLBoolean TraceEGLApi::eglQueryDevicesEXTFn(EGLint max_devices, EGLDeviceEXT* devices, EGLint* num_devices) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglQueryDevicesEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglQueryDevicesEXT"); return egl_api_->eglQueryDevicesEXTFn(max_devices, devices, num_devices); } const char* TraceEGLApi::eglQueryDeviceStringEXTFn(EGLDeviceEXT device, EGLint name) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglQueryDeviceStringEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglQueryDeviceStringEXT"); return egl_api_->eglQueryDeviceStringEXTFn(device, name); } @@ -1285,7 +1286,7 @@ EGLBoolean TraceEGLApi::eglQueryDisplayAttribANGLEFn(EGLDisplay dpy, EGLint attribute, EGLAttrib* value) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceEGLAPI::eglQueryDisplayAttribANGLE") + "TraceEGLAPI::eglQueryDisplayAttribANGLE"); return egl_api_->eglQueryDisplayAttribANGLEFn(dpy, attribute, value); } @@ -1293,7 +1294,7 @@ EGLBoolean TraceEGLApi::eglQueryStreamKHRFn(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglQueryStreamKHR") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglQueryStreamKHR"); return egl_api_->eglQueryStreamKHRFn(dpy, stream, attribute, value); } @@ -1301,19 +1302,19 @@ EGLBoolean TraceEGLApi::eglQueryStreamu64KHRFn(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglQueryStreamu64KHR") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglQueryStreamu64KHR"); return egl_api_->eglQueryStreamu64KHRFn(dpy, stream, attribute, value); } const char* TraceEGLApi::eglQueryStringFn(EGLDisplay dpy, EGLint name) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglQueryString") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglQueryString"); return egl_api_->eglQueryStringFn(dpy, name); } const char* TraceEGLApi::eglQueryStringiANGLEFn(EGLDisplay dpy, EGLint name, EGLint index) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglQueryStringiANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglQueryStringiANGLE"); return egl_api_->eglQueryStringiANGLEFn(dpy, name, index); } @@ -1321,7 +1322,7 @@ EGLBoolean TraceEGLApi::eglQuerySurfaceFn(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglQuerySurface") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglQuerySurface"); return egl_api_->eglQuerySurfaceFn(dpy, surface, attribute, value); } @@ -1330,7 +1331,7 @@ EGLBoolean TraceEGLApi::eglQuerySurfacePointerANGLEFn(EGLDisplay dpy, EGLint attribute, void** value) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceEGLAPI::eglQuerySurfacePointerANGLE") + "TraceEGLAPI::eglQuerySurfacePointerANGLE"); return egl_api_->eglQuerySurfacePointerANGLEFn(dpy, surface, attribute, value); } @@ -1338,26 +1339,26 @@ EGLBoolean TraceEGLApi::eglQuerySurfacePointerANGLEFn(EGLDisplay dpy, void TraceEGLApi::eglReacquireHighPowerGPUANGLEFn(EGLDisplay dpy, EGLContext ctx) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceEGLAPI::eglReacquireHighPowerGPUANGLE") + "TraceEGLAPI::eglReacquireHighPowerGPUANGLE"); egl_api_->eglReacquireHighPowerGPUANGLEFn(dpy, ctx); } void TraceEGLApi::eglReleaseHighPowerGPUANGLEFn(EGLDisplay dpy, EGLContext ctx) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceEGLAPI::eglReleaseHighPowerGPUANGLE") + "TraceEGLAPI::eglReleaseHighPowerGPUANGLE"); egl_api_->eglReleaseHighPowerGPUANGLEFn(dpy, ctx); } EGLBoolean TraceEGLApi::eglReleaseTexImageFn(EGLDisplay dpy, EGLSurface surface, EGLint buffer) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglReleaseTexImage") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglReleaseTexImage"); return egl_api_->eglReleaseTexImageFn(dpy, surface, buffer); } EGLBoolean TraceEGLApi::eglReleaseThreadFn(void) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglReleaseThread") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglReleaseThread"); return egl_api_->eglReleaseThreadFn(); } @@ -1365,7 +1366,7 @@ void TraceEGLApi::eglSetBlobCacheFuncsANDROIDFn(EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceEGLAPI::eglSetBlobCacheFuncsANDROID") + "TraceEGLAPI::eglSetBlobCacheFuncsANDROID"); egl_api_->eglSetBlobCacheFuncsANDROIDFn(dpy, set, get); } @@ -1373,14 +1374,14 @@ EGLBoolean TraceEGLApi::eglStreamAttribKHRFn(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglStreamAttribKHR") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglStreamAttribKHR"); return egl_api_->eglStreamAttribKHRFn(dpy, stream, attribute, value); } EGLBoolean TraceEGLApi::eglStreamConsumerAcquireKHRFn(EGLDisplay dpy, EGLStreamKHR stream) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceEGLAPI::eglStreamConsumerAcquireKHR") + "TraceEGLAPI::eglStreamConsumerAcquireKHR"); return egl_api_->eglStreamConsumerAcquireKHRFn(dpy, stream); } @@ -1389,7 +1390,7 @@ EGLBoolean TraceEGLApi::eglStreamConsumerGLTextureExternalAttribsNVFn( EGLStreamKHR stream, EGLAttrib* attrib_list) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceEGLAPI::eglStreamConsumerGLTextureExternalAttribsNV") + "gpu", "TraceEGLAPI::eglStreamConsumerGLTextureExternalAttribsNV"); return egl_api_->eglStreamConsumerGLTextureExternalAttribsNVFn(dpy, stream, attrib_list); } @@ -1398,14 +1399,14 @@ EGLBoolean TraceEGLApi::eglStreamConsumerGLTextureExternalKHRFn( EGLDisplay dpy, EGLStreamKHR stream) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceEGLAPI::eglStreamConsumerGLTextureExternalKHR") + "gpu", "TraceEGLAPI::eglStreamConsumerGLTextureExternalKHR"); return egl_api_->eglStreamConsumerGLTextureExternalKHRFn(dpy, stream); } EGLBoolean TraceEGLApi::eglStreamConsumerReleaseKHRFn(EGLDisplay dpy, EGLStreamKHR stream) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceEGLAPI::eglStreamConsumerReleaseKHR") + "TraceEGLAPI::eglStreamConsumerReleaseKHR"); return egl_api_->eglStreamConsumerReleaseKHRFn(dpy, stream); } @@ -1415,7 +1416,7 @@ EGLBoolean TraceEGLApi::eglStreamPostD3DTextureANGLEFn( void* texture, const EGLAttrib* attrib_list) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceEGLAPI::eglStreamPostD3DTextureANGLE") + "TraceEGLAPI::eglStreamPostD3DTextureANGLE"); return egl_api_->eglStreamPostD3DTextureANGLEFn(dpy, stream, texture, attrib_list); } @@ -1424,12 +1425,12 @@ EGLBoolean TraceEGLApi::eglSurfaceAttribFn(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglSurfaceAttrib") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglSurfaceAttrib"); return egl_api_->eglSurfaceAttribFn(dpy, surface, attribute, value); } EGLBoolean TraceEGLApi::eglSwapBuffersFn(EGLDisplay dpy, EGLSurface surface) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglSwapBuffers") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglSwapBuffers"); return egl_api_->eglSwapBuffersFn(dpy, surface); } @@ -1438,39 +1439,39 @@ EGLBoolean TraceEGLApi::eglSwapBuffersWithDamageKHRFn(EGLDisplay dpy, EGLint* rects, EGLint n_rects) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceEGLAPI::eglSwapBuffersWithDamageKHR") + "TraceEGLAPI::eglSwapBuffersWithDamageKHR"); return egl_api_->eglSwapBuffersWithDamageKHRFn(dpy, surface, rects, n_rects); } EGLBoolean TraceEGLApi::eglSwapIntervalFn(EGLDisplay dpy, EGLint interval) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglSwapInterval") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglSwapInterval"); return egl_api_->eglSwapIntervalFn(dpy, interval); } EGLBoolean TraceEGLApi::eglTerminateFn(EGLDisplay dpy) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglTerminate") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglTerminate"); return egl_api_->eglTerminateFn(dpy); } EGLBoolean TraceEGLApi::eglWaitClientFn(void) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglWaitClient") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglWaitClient"); return egl_api_->eglWaitClientFn(); } EGLBoolean TraceEGLApi::eglWaitGLFn(void) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglWaitGL") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglWaitGL"); return egl_api_->eglWaitGLFn(); } EGLBoolean TraceEGLApi::eglWaitNativeFn(EGLint engine) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglWaitNative") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglWaitNative"); return egl_api_->eglWaitNativeFn(engine); } EGLint TraceEGLApi::eglWaitSyncKHRFn(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglWaitSyncKHR") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglWaitSyncKHR"); return egl_api_->eglWaitSyncKHRFn(dpy, sync, flags); } diff --git a/chromium/ui/gl/gl_bindings_autogen_gl.cc b/chromium/ui/gl/gl_bindings_autogen_gl.cc index 4fe60eec01e..fe40cf0cf32 100644 --- a/chromium/ui/gl/gl_bindings_autogen_gl.cc +++ b/chromium/ui/gl/gl_bindings_autogen_gl.cc @@ -6402,46 +6402,46 @@ void GLApiBase::glWindowRectanglesEXTFn(GLenum mode, } void TraceGLApi::glActiveShaderProgramFn(GLuint pipeline, GLuint program) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glActiveShaderProgram") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glActiveShaderProgram"); gl_api_->glActiveShaderProgramFn(pipeline, program); } void TraceGLApi::glActiveTextureFn(GLenum texture) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glActiveTexture") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glActiveTexture"); gl_api_->glActiveTextureFn(texture); } void TraceGLApi::glAttachShaderFn(GLuint program, GLuint shader) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glAttachShader") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glAttachShader"); gl_api_->glAttachShaderFn(program, shader); } void TraceGLApi::glBeginQueryFn(GLenum target, GLuint id) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBeginQuery") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBeginQuery"); gl_api_->glBeginQueryFn(target, id); } void TraceGLApi::glBeginTransformFeedbackFn(GLenum primitiveMode) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBeginTransformFeedback") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBeginTransformFeedback"); gl_api_->glBeginTransformFeedbackFn(primitiveMode); } void TraceGLApi::glBindAttribLocationFn(GLuint program, GLuint index, const char* name) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindAttribLocation") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindAttribLocation"); gl_api_->glBindAttribLocationFn(program, index, name); } void TraceGLApi::glBindBufferFn(GLenum target, GLuint buffer) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindBuffer") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindBuffer"); gl_api_->glBindBufferFn(target, buffer); } void TraceGLApi::glBindBufferBaseFn(GLenum target, GLuint index, GLuint buffer) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindBufferBase") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindBufferBase"); gl_api_->glBindBufferBaseFn(target, index, buffer); } @@ -6450,14 +6450,14 @@ void TraceGLApi::glBindBufferRangeFn(GLenum target, GLuint buffer, GLintptr offset, GLsizeiptr size) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindBufferRange") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindBufferRange"); gl_api_->glBindBufferRangeFn(target, index, buffer, offset, size); } void TraceGLApi::glBindFragDataLocationFn(GLuint program, GLuint colorNumber, const char* name) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindFragDataLocation") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindFragDataLocation"); gl_api_->glBindFragDataLocationFn(program, colorNumber, name); } @@ -6466,7 +6466,7 @@ void TraceGLApi::glBindFragDataLocationIndexedFn(GLuint program, GLuint index, const char* name) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glBindFragDataLocationIndexed") + "TraceGLAPI::glBindFragDataLocationIndexed"); gl_api_->glBindFragDataLocationIndexedFn(program, colorNumber, index, name); } @@ -6474,12 +6474,12 @@ void TraceGLApi::glBindFragmentInputLocationCHROMIUMFn(GLuint program, GLint location, const char* name) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceGLAPI::glBindFragmentInputLocationCHROMIUM") + "gpu", "TraceGLAPI::glBindFragmentInputLocationCHROMIUM"); gl_api_->glBindFragmentInputLocationCHROMIUMFn(program, location, name); } void TraceGLApi::glBindFramebufferEXTFn(GLenum target, GLuint framebuffer) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindFramebufferEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindFramebufferEXT"); gl_api_->glBindFramebufferEXTFn(target, framebuffer); } @@ -6490,33 +6490,33 @@ void TraceGLApi::glBindImageTextureEXTFn(GLuint index, GLint layer, GLenum access, GLint format) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindImageTextureEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindImageTextureEXT"); gl_api_->glBindImageTextureEXTFn(index, texture, level, layered, layer, access, format); } void TraceGLApi::glBindProgramPipelineFn(GLuint pipeline) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindProgramPipeline") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindProgramPipeline"); gl_api_->glBindProgramPipelineFn(pipeline); } void TraceGLApi::glBindRenderbufferEXTFn(GLenum target, GLuint renderbuffer) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindRenderbufferEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindRenderbufferEXT"); gl_api_->glBindRenderbufferEXTFn(target, renderbuffer); } void TraceGLApi::glBindSamplerFn(GLuint unit, GLuint sampler) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindSampler") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindSampler"); gl_api_->glBindSamplerFn(unit, sampler); } void TraceGLApi::glBindTextureFn(GLenum target, GLuint texture) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindTexture") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindTexture"); gl_api_->glBindTextureFn(target, texture); } void TraceGLApi::glBindTransformFeedbackFn(GLenum target, GLuint id) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindTransformFeedback") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindTransformFeedback"); gl_api_->glBindTransformFeedbackFn(target, id); } @@ -6524,12 +6524,12 @@ void TraceGLApi::glBindUniformLocationCHROMIUMFn(GLuint program, GLint location, const char* name) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glBindUniformLocationCHROMIUM") + "TraceGLAPI::glBindUniformLocationCHROMIUM"); gl_api_->glBindUniformLocationCHROMIUMFn(program, location, name); } void TraceGLApi::glBindVertexArrayOESFn(GLuint array) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindVertexArrayOES") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindVertexArrayOES"); gl_api_->glBindVertexArrayOESFn(array); } @@ -6537,12 +6537,12 @@ void TraceGLApi::glBindVertexBufferFn(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindVertexBuffer") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBindVertexBuffer"); gl_api_->glBindVertexBufferFn(bindingindex, buffer, offset, stride); } void TraceGLApi::glBlendBarrierKHRFn(void) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBlendBarrierKHR") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBlendBarrierKHR"); gl_api_->glBlendBarrierKHRFn(); } @@ -6550,22 +6550,22 @@ void TraceGLApi::glBlendColorFn(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBlendColor") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBlendColor"); gl_api_->glBlendColorFn(red, green, blue, alpha); } void TraceGLApi::glBlendEquationFn(GLenum mode) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBlendEquation") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBlendEquation"); gl_api_->glBlendEquationFn(mode); } void TraceGLApi::glBlendEquationiOESFn(GLuint buf, GLenum mode) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBlendEquationiOES") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBlendEquationiOES"); gl_api_->glBlendEquationiOESFn(buf, mode); } void TraceGLApi::glBlendEquationSeparateFn(GLenum modeRGB, GLenum modeAlpha) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBlendEquationSeparate") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBlendEquationSeparate"); gl_api_->glBlendEquationSeparateFn(modeRGB, modeAlpha); } @@ -6573,17 +6573,17 @@ void TraceGLApi::glBlendEquationSeparateiOESFn(GLuint buf, GLenum modeRGB, GLenum modeAlpha) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glBlendEquationSeparateiOES") + "TraceGLAPI::glBlendEquationSeparateiOES"); gl_api_->glBlendEquationSeparateiOESFn(buf, modeRGB, modeAlpha); } void TraceGLApi::glBlendFuncFn(GLenum sfactor, GLenum dfactor) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBlendFunc") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBlendFunc"); gl_api_->glBlendFuncFn(sfactor, dfactor); } void TraceGLApi::glBlendFunciOESFn(GLuint buf, GLenum sfactor, GLenum dfactor) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBlendFunciOES") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBlendFunciOES"); gl_api_->glBlendFunciOESFn(buf, sfactor, dfactor); } @@ -6591,7 +6591,7 @@ void TraceGLApi::glBlendFuncSeparateFn(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBlendFuncSeparate") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBlendFuncSeparate"); gl_api_->glBlendFuncSeparateFn(srcRGB, dstRGB, srcAlpha, dstAlpha); } @@ -6600,7 +6600,7 @@ void TraceGLApi::glBlendFuncSeparateiOESFn(GLuint buf, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBlendFuncSeparateiOES") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBlendFuncSeparateiOES"); gl_api_->glBlendFuncSeparateiOESFn(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); } @@ -6614,7 +6614,7 @@ void TraceGLApi::glBlitFramebufferFn(GLint srcX0, GLint dstY1, GLbitfield mask, GLenum filter) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBlitFramebuffer") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBlitFramebuffer"); gl_api_->glBlitFramebufferFn(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); } @@ -6623,7 +6623,7 @@ void TraceGLApi::glBufferDataFn(GLenum target, GLsizeiptr size, const void* data, GLenum usage) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBufferData") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBufferData"); gl_api_->glBufferDataFn(target, size, data, usage); } @@ -6631,18 +6631,18 @@ void TraceGLApi::glBufferSubDataFn(GLenum target, GLintptr offset, GLsizeiptr size, const void* data) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBufferSubData") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glBufferSubData"); gl_api_->glBufferSubDataFn(target, offset, size, data); } GLenum TraceGLApi::glCheckFramebufferStatusEXTFn(GLenum target) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glCheckFramebufferStatusEXT") + "TraceGLAPI::glCheckFramebufferStatusEXT"); return gl_api_->glCheckFramebufferStatusEXTFn(target); } void TraceGLApi::glClearFn(GLbitfield mask) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClear") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClear"); gl_api_->glClearFn(mask); } @@ -6650,28 +6650,28 @@ void TraceGLApi::glClearBufferfiFn(GLenum buffer, GLint drawbuffer, const GLfloat depth, GLint stencil) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClearBufferfi") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClearBufferfi"); gl_api_->glClearBufferfiFn(buffer, drawbuffer, depth, stencil); } void TraceGLApi::glClearBufferfvFn(GLenum buffer, GLint drawbuffer, const GLfloat* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClearBufferfv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClearBufferfv"); gl_api_->glClearBufferfvFn(buffer, drawbuffer, value); } void TraceGLApi::glClearBufferivFn(GLenum buffer, GLint drawbuffer, const GLint* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClearBufferiv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClearBufferiv"); gl_api_->glClearBufferivFn(buffer, drawbuffer, value); } void TraceGLApi::glClearBufferuivFn(GLenum buffer, GLint drawbuffer, const GLuint* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClearBufferuiv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClearBufferuiv"); gl_api_->glClearBufferuivFn(buffer, drawbuffer, value); } @@ -6679,22 +6679,22 @@ void TraceGLApi::glClearColorFn(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClearColor") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClearColor"); gl_api_->glClearColorFn(red, green, blue, alpha); } void TraceGLApi::glClearDepthFn(GLclampd depth) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClearDepth") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClearDepth"); gl_api_->glClearDepthFn(depth); } void TraceGLApi::glClearDepthfFn(GLclampf depth) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClearDepthf") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClearDepthf"); gl_api_->glClearDepthfFn(depth); } void TraceGLApi::glClearStencilFn(GLint s) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClearStencil") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClearStencil"); gl_api_->glClearStencilFn(s); } @@ -6703,7 +6703,7 @@ void TraceGLApi::glClearTexImageFn(GLuint texture, GLenum format, GLenum type, const GLvoid* data) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClearTexImage") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClearTexImage"); gl_api_->glClearTexImageFn(texture, level, format, type, data); } @@ -6718,7 +6718,7 @@ void TraceGLApi::glClearTexSubImageFn(GLuint texture, GLenum format, GLenum type, const GLvoid* data) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClearTexSubImage") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClearTexSubImage"); gl_api_->glClearTexSubImageFn(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); } @@ -6726,14 +6726,14 @@ void TraceGLApi::glClearTexSubImageFn(GLuint texture, GLenum TraceGLApi::glClientWaitSyncFn(GLsync sync, GLbitfield flags, GLuint64 timeout) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClientWaitSync") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClientWaitSync"); return gl_api_->glClientWaitSyncFn(sync, flags, timeout); } GLenum TraceGLApi::glClientWaitSyncAPPLEFn(GLsync sync, GLbitfield flags, GLuint64 timeout) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClientWaitSyncAPPLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glClientWaitSyncAPPLE"); return gl_api_->glClientWaitSyncAPPLEFn(sync, flags, timeout); } @@ -6741,7 +6741,7 @@ void TraceGLApi::glColorMaskFn(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glColorMask") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glColorMask"); gl_api_->glColorMaskFn(red, green, blue, alpha); } @@ -6750,12 +6750,12 @@ void TraceGLApi::glColorMaskiOESFn(GLuint buf, GLboolean green, GLboolean blue, GLboolean alpha) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glColorMaskiOES") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glColorMaskiOES"); gl_api_->glColorMaskiOESFn(buf, red, green, blue, alpha); } void TraceGLApi::glCompileShaderFn(GLuint shader) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCompileShader") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCompileShader"); gl_api_->glCompileShaderFn(shader); } @@ -6767,7 +6767,7 @@ void TraceGLApi::glCompressedTexImage2DFn(GLenum target, GLint border, GLsizei imageSize, const void* data) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCompressedTexImage2D") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCompressedTexImage2D"); gl_api_->glCompressedTexImage2DFn(target, level, internalformat, width, height, border, imageSize, data); } @@ -6781,8 +6781,8 @@ void TraceGLApi::glCompressedTexImage2DRobustANGLEFn(GLenum target, GLsizei imageSize, GLsizei dataSize, const void* data) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glCompressedTexImage2DRobustANGLE") + TRACE_EVENT_BINARY_EFFICIENT0( + "gpu", "TraceGLAPI::glCompressedTexImage2DRobustANGLE"); gl_api_->glCompressedTexImage2DRobustANGLEFn(target, level, internalformat, width, height, border, imageSize, dataSize, data); @@ -6797,7 +6797,7 @@ void TraceGLApi::glCompressedTexImage3DFn(GLenum target, GLint border, GLsizei imageSize, const void* data) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCompressedTexImage3D") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCompressedTexImage3D"); gl_api_->glCompressedTexImage3DFn(target, level, internalformat, width, height, depth, border, imageSize, data); } @@ -6812,8 +6812,8 @@ void TraceGLApi::glCompressedTexImage3DRobustANGLEFn(GLenum target, GLsizei imageSize, GLsizei dataSize, const void* data) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glCompressedTexImage3DRobustANGLE") + TRACE_EVENT_BINARY_EFFICIENT0( + "gpu", "TraceGLAPI::glCompressedTexImage3DRobustANGLE"); gl_api_->glCompressedTexImage3DRobustANGLEFn(target, level, internalformat, width, height, depth, border, imageSize, dataSize, data); @@ -6828,7 +6828,7 @@ void TraceGLApi::glCompressedTexSubImage2DFn(GLenum target, GLenum format, GLsizei imageSize, const void* data) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCompressedTexSubImage2D") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCompressedTexSubImage2D"); gl_api_->glCompressedTexSubImage2DFn(target, level, xoffset, yoffset, width, height, format, imageSize, data); } @@ -6844,7 +6844,7 @@ void TraceGLApi::glCompressedTexSubImage2DRobustANGLEFn(GLenum target, GLsizei dataSize, const void* data) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceGLAPI::glCompressedTexSubImage2DRobustANGLE") + "gpu", "TraceGLAPI::glCompressedTexSubImage2DRobustANGLE"); gl_api_->glCompressedTexSubImage2DRobustANGLEFn( target, level, xoffset, yoffset, width, height, format, imageSize, dataSize, data); @@ -6861,7 +6861,7 @@ void TraceGLApi::glCompressedTexSubImage3DFn(GLenum target, GLenum format, GLsizei imageSize, const void* data) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCompressedTexSubImage3D") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCompressedTexSubImage3D"); gl_api_->glCompressedTexSubImage3DFn(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); @@ -6880,7 +6880,7 @@ void TraceGLApi::glCompressedTexSubImage3DRobustANGLEFn(GLenum target, GLsizei dataSize, const void* data) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceGLAPI::glCompressedTexSubImage3DRobustANGLE") + "gpu", "TraceGLAPI::glCompressedTexSubImage3DRobustANGLE"); gl_api_->glCompressedTexSubImage3DRobustANGLEFn( target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, dataSize, data); @@ -6891,7 +6891,7 @@ void TraceGLApi::glCopyBufferSubDataFn(GLenum readTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCopyBufferSubData") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCopyBufferSubData"); gl_api_->glCopyBufferSubDataFn(readTarget, writeTarget, readOffset, writeOffset, size); } @@ -6910,7 +6910,7 @@ void TraceGLApi::glCopySubTextureCHROMIUMFn(GLuint sourceId, GLboolean unpackFlipY, GLboolean unpackPremultiplyAlpha, GLboolean unpackUnmultiplyAlpha) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCopySubTextureCHROMIUM") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCopySubTextureCHROMIUM"); gl_api_->glCopySubTextureCHROMIUMFn( sourceId, sourceLevel, destTarget, destId, destLevel, xoffset, yoffset, x, y, width, height, unpackFlipY, unpackPremultiplyAlpha, @@ -6925,7 +6925,7 @@ void TraceGLApi::glCopyTexImage2DFn(GLenum target, GLsizei width, GLsizei height, GLint border) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCopyTexImage2D") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCopyTexImage2D"); gl_api_->glCopyTexImage2DFn(target, level, internalformat, x, y, width, height, border); } @@ -6938,7 +6938,7 @@ void TraceGLApi::glCopyTexSubImage2DFn(GLenum target, GLint y, GLsizei width, GLsizei height) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCopyTexSubImage2D") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCopyTexSubImage2D"); gl_api_->glCopyTexSubImage2DFn(target, level, xoffset, yoffset, x, y, width, height); } @@ -6952,7 +6952,7 @@ void TraceGLApi::glCopyTexSubImage3DFn(GLenum target, GLint y, GLsizei width, GLsizei height) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCopyTexSubImage3D") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCopyTexSubImage3D"); gl_api_->glCopyTexSubImage3DFn(target, level, xoffset, yoffset, zoffset, x, y, width, height); } @@ -6967,14 +6967,14 @@ void TraceGLApi::glCopyTextureCHROMIUMFn(GLuint sourceId, GLboolean unpackFlipY, GLboolean unpackPremultiplyAlpha, GLboolean unpackUnmultiplyAlpha) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCopyTextureCHROMIUM") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCopyTextureCHROMIUM"); gl_api_->glCopyTextureCHROMIUMFn( sourceId, sourceLevel, destTarget, destId, destLevel, internalFormat, destType, unpackFlipY, unpackPremultiplyAlpha, unpackUnmultiplyAlpha); } void TraceGLApi::glCoverageModulationNVFn(GLenum components) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCoverageModulationNV") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCoverageModulationNV"); gl_api_->glCoverageModulationNVFn(components); } @@ -6985,14 +6985,15 @@ void TraceGLApi::glCoverFillPathInstancedNVFn(GLsizei numPaths, GLenum coverMode, GLenum transformType, const GLfloat* transformValues) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCoverFillPathInstancedNV") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", + "TraceGLAPI::glCoverFillPathInstancedNV"); gl_api_->glCoverFillPathInstancedNVFn(numPaths, pathNameType, paths, pathBase, coverMode, transformType, transformValues); } void TraceGLApi::glCoverFillPathNVFn(GLuint path, GLenum coverMode) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCoverFillPathNV") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCoverFillPathNV"); gl_api_->glCoverFillPathNVFn(path, coverMode); } @@ -7005,47 +7006,47 @@ void TraceGLApi::glCoverStrokePathInstancedNVFn( GLenum transformType, const GLfloat* transformValues) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glCoverStrokePathInstancedNV") + "TraceGLAPI::glCoverStrokePathInstancedNV"); gl_api_->glCoverStrokePathInstancedNVFn(numPaths, pathNameType, paths, pathBase, coverMode, transformType, transformValues); } void TraceGLApi::glCoverStrokePathNVFn(GLuint name, GLenum coverMode) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCoverStrokePathNV") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCoverStrokePathNV"); gl_api_->glCoverStrokePathNVFn(name, coverMode); } void TraceGLApi::glCreateMemoryObjectsEXTFn(GLsizei n, GLuint* memoryObjects) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCreateMemoryObjectsEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCreateMemoryObjectsEXT"); gl_api_->glCreateMemoryObjectsEXTFn(n, memoryObjects); } GLuint TraceGLApi::glCreateProgramFn(void) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCreateProgram") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCreateProgram"); return gl_api_->glCreateProgramFn(); } GLuint TraceGLApi::glCreateShaderFn(GLenum type) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCreateShader") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCreateShader"); return gl_api_->glCreateShaderFn(type); } GLuint TraceGLApi::glCreateShaderProgramvFn(GLenum type, GLsizei count, const char* const* strings) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCreateShaderProgramv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCreateShaderProgramv"); return gl_api_->glCreateShaderProgramvFn(type, count, strings); } void TraceGLApi::glCullFaceFn(GLenum mode) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCullFace") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glCullFace"); gl_api_->glCullFaceFn(mode); } void TraceGLApi::glDebugMessageCallbackFn(GLDEBUGPROC callback, const void* userParam) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDebugMessageCallback") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDebugMessageCallback"); gl_api_->glDebugMessageCallbackFn(callback, userParam); } @@ -7055,7 +7056,7 @@ void TraceGLApi::glDebugMessageControlFn(GLenum source, GLsizei count, const GLuint* ids, GLboolean enabled) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDebugMessageControl") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDebugMessageControl"); gl_api_->glDebugMessageControlFn(source, type, severity, count, ids, enabled); } @@ -7065,175 +7066,177 @@ void TraceGLApi::glDebugMessageInsertFn(GLenum source, GLenum severity, GLsizei length, const char* buf) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDebugMessageInsert") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDebugMessageInsert"); gl_api_->glDebugMessageInsertFn(source, type, id, severity, length, buf); } void TraceGLApi::glDeleteBuffersARBFn(GLsizei n, const GLuint* buffers) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteBuffersARB") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteBuffersARB"); gl_api_->glDeleteBuffersARBFn(n, buffers); } void TraceGLApi::glDeleteFencesAPPLEFn(GLsizei n, const GLuint* fences) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteFencesAPPLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteFencesAPPLE"); gl_api_->glDeleteFencesAPPLEFn(n, fences); } void TraceGLApi::glDeleteFencesNVFn(GLsizei n, const GLuint* fences) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteFencesNV") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteFencesNV"); gl_api_->glDeleteFencesNVFn(n, fences); } void TraceGLApi::glDeleteFramebuffersEXTFn(GLsizei n, const GLuint* framebuffers) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteFramebuffersEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteFramebuffersEXT"); gl_api_->glDeleteFramebuffersEXTFn(n, framebuffers); } void TraceGLApi::glDeleteMemoryObjectsEXTFn(GLsizei n, const GLuint* memoryObjects) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteMemoryObjectsEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteMemoryObjectsEXT"); gl_api_->glDeleteMemoryObjectsEXTFn(n, memoryObjects); } void TraceGLApi::glDeletePathsNVFn(GLuint path, GLsizei range) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeletePathsNV") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeletePathsNV"); gl_api_->glDeletePathsNVFn(path, range); } void TraceGLApi::glDeleteProgramFn(GLuint program) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteProgram") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteProgram"); gl_api_->glDeleteProgramFn(program); } void TraceGLApi::glDeleteProgramPipelinesFn(GLsizei n, const GLuint* pipelines) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteProgramPipelines") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteProgramPipelines"); gl_api_->glDeleteProgramPipelinesFn(n, pipelines); } void TraceGLApi::glDeleteQueriesFn(GLsizei n, const GLuint* ids) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteQueries") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteQueries"); gl_api_->glDeleteQueriesFn(n, ids); } void TraceGLApi::glDeleteRenderbuffersEXTFn(GLsizei n, const GLuint* renderbuffers) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteRenderbuffersEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteRenderbuffersEXT"); gl_api_->glDeleteRenderbuffersEXTFn(n, renderbuffers); } void TraceGLApi::glDeleteSamplersFn(GLsizei n, const GLuint* samplers) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteSamplers") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteSamplers"); gl_api_->glDeleteSamplersFn(n, samplers); } void TraceGLApi::glDeleteSemaphoresEXTFn(GLsizei n, const GLuint* semaphores) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteSemaphoresEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteSemaphoresEXT"); gl_api_->glDeleteSemaphoresEXTFn(n, semaphores); } void TraceGLApi::glDeleteShaderFn(GLuint shader) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteShader") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteShader"); gl_api_->glDeleteShaderFn(shader); } void TraceGLApi::glDeleteSyncFn(GLsync sync) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteSync") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteSync"); gl_api_->glDeleteSyncFn(sync); } void TraceGLApi::glDeleteSyncAPPLEFn(GLsync sync) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteSyncAPPLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteSyncAPPLE"); gl_api_->glDeleteSyncAPPLEFn(sync); } void TraceGLApi::glDeleteTexturesFn(GLsizei n, const GLuint* textures) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteTextures") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteTextures"); gl_api_->glDeleteTexturesFn(n, textures); } void TraceGLApi::glDeleteTransformFeedbacksFn(GLsizei n, const GLuint* ids) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteTransformFeedbacks") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", + "TraceGLAPI::glDeleteTransformFeedbacks"); gl_api_->glDeleteTransformFeedbacksFn(n, ids); } void TraceGLApi::glDeleteVertexArraysOESFn(GLsizei n, const GLuint* arrays) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteVertexArraysOES") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDeleteVertexArraysOES"); gl_api_->glDeleteVertexArraysOESFn(n, arrays); } void TraceGLApi::glDepthFuncFn(GLenum func) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDepthFunc") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDepthFunc"); gl_api_->glDepthFuncFn(func); } void TraceGLApi::glDepthMaskFn(GLboolean flag) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDepthMask") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDepthMask"); gl_api_->glDepthMaskFn(flag); } void TraceGLApi::glDepthRangeFn(GLclampd zNear, GLclampd zFar) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDepthRange") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDepthRange"); gl_api_->glDepthRangeFn(zNear, zFar); } void TraceGLApi::glDepthRangefFn(GLclampf zNear, GLclampf zFar) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDepthRangef") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDepthRangef"); gl_api_->glDepthRangefFn(zNear, zFar); } void TraceGLApi::glDetachShaderFn(GLuint program, GLuint shader) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDetachShader") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDetachShader"); gl_api_->glDetachShaderFn(program, shader); } void TraceGLApi::glDisableFn(GLenum cap) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDisable") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDisable"); gl_api_->glDisableFn(cap); } void TraceGLApi::glDisableExtensionANGLEFn(const char* name) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDisableExtensionANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDisableExtensionANGLE"); gl_api_->glDisableExtensionANGLEFn(name); } void TraceGLApi::glDisableiOESFn(GLenum target, GLuint index) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDisableiOES") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDisableiOES"); gl_api_->glDisableiOESFn(target, index); } void TraceGLApi::glDisableVertexAttribArrayFn(GLuint index) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDisableVertexAttribArray") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", + "TraceGLAPI::glDisableVertexAttribArray"); gl_api_->glDisableVertexAttribArrayFn(index); } void TraceGLApi::glDiscardFramebufferEXTFn(GLenum target, GLsizei numAttachments, const GLenum* attachments) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDiscardFramebufferEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDiscardFramebufferEXT"); gl_api_->glDiscardFramebufferEXTFn(target, numAttachments, attachments); } void TraceGLApi::glDispatchComputeFn(GLuint numGroupsX, GLuint numGroupsY, GLuint numGroupsZ) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDispatchCompute") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDispatchCompute"); gl_api_->glDispatchComputeFn(numGroupsX, numGroupsY, numGroupsZ); } void TraceGLApi::glDispatchComputeIndirectFn(GLintptr indirect) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDispatchComputeIndirect") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDispatchComputeIndirect"); gl_api_->glDispatchComputeIndirectFn(indirect); } void TraceGLApi::glDrawArraysFn(GLenum mode, GLint first, GLsizei count) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDrawArrays") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDrawArrays"); gl_api_->glDrawArraysFn(mode, first, count); } void TraceGLApi::glDrawArraysIndirectFn(GLenum mode, const void* indirect) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDrawArraysIndirect") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDrawArraysIndirect"); gl_api_->glDrawArraysIndirectFn(mode, indirect); } @@ -7241,7 +7244,8 @@ void TraceGLApi::glDrawArraysInstancedANGLEFn(GLenum mode, GLint first, GLsizei count, GLsizei primcount) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDrawArraysInstancedANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", + "TraceGLAPI::glDrawArraysInstancedANGLE"); gl_api_->glDrawArraysInstancedANGLEFn(mode, first, count, primcount); } @@ -7251,18 +7255,18 @@ void TraceGLApi::glDrawArraysInstancedBaseInstanceANGLEFn(GLenum mode, GLsizei primcount, GLuint baseinstance) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceGLAPI::glDrawArraysInstancedBaseInstanceANGLE") + "gpu", "TraceGLAPI::glDrawArraysInstancedBaseInstanceANGLE"); gl_api_->glDrawArraysInstancedBaseInstanceANGLEFn(mode, first, count, primcount, baseinstance); } void TraceGLApi::glDrawBufferFn(GLenum mode) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDrawBuffer") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDrawBuffer"); gl_api_->glDrawBufferFn(mode); } void TraceGLApi::glDrawBuffersARBFn(GLsizei n, const GLenum* bufs) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDrawBuffersARB") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDrawBuffersARB"); gl_api_->glDrawBuffersARBFn(n, bufs); } @@ -7270,14 +7274,14 @@ void TraceGLApi::glDrawElementsFn(GLenum mode, GLsizei count, GLenum type, const void* indices) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDrawElements") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDrawElements"); gl_api_->glDrawElementsFn(mode, count, type, indices); } void TraceGLApi::glDrawElementsIndirectFn(GLenum mode, GLenum type, const void* indirect) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDrawElementsIndirect") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDrawElementsIndirect"); gl_api_->glDrawElementsIndirectFn(mode, type, indirect); } @@ -7287,7 +7291,7 @@ void TraceGLApi::glDrawElementsInstancedANGLEFn(GLenum mode, const void* indices, GLsizei primcount) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glDrawElementsInstancedANGLE") + "TraceGLAPI::glDrawElementsInstancedANGLE"); gl_api_->glDrawElementsInstancedANGLEFn(mode, count, type, indices, primcount); } @@ -7301,7 +7305,7 @@ void TraceGLApi::glDrawElementsInstancedBaseVertexBaseInstanceANGLEFn( GLint baseVertex, GLuint baseInstance) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceGLAPI::glDrawElementsInstancedBaseVertexBaseInstanceANGLE") + "gpu", "TraceGLAPI::glDrawElementsInstancedBaseVertexBaseInstanceANGLE"); gl_api_->glDrawElementsInstancedBaseVertexBaseInstanceANGLEFn( mode, count, type, indices, primcount, baseVertex, baseInstance); } @@ -7312,95 +7316,95 @@ void TraceGLApi::glDrawRangeElementsFn(GLenum mode, GLsizei count, GLenum type, const void* indices) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDrawRangeElements") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glDrawRangeElements"); gl_api_->glDrawRangeElementsFn(mode, start, end, count, type, indices); } void TraceGLApi::glEGLImageTargetRenderbufferStorageOESFn(GLenum target, GLeglImageOES image) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceGLAPI::glEGLImageTargetRenderbufferStorageOES") + "gpu", "TraceGLAPI::glEGLImageTargetRenderbufferStorageOES"); gl_api_->glEGLImageTargetRenderbufferStorageOESFn(target, image); } void TraceGLApi::glEGLImageTargetTexture2DOESFn(GLenum target, GLeglImageOES image) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glEGLImageTargetTexture2DOES") + "TraceGLAPI::glEGLImageTargetTexture2DOES"); gl_api_->glEGLImageTargetTexture2DOESFn(target, image); } void TraceGLApi::glEnableFn(GLenum cap) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glEnable") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glEnable"); gl_api_->glEnableFn(cap); } void TraceGLApi::glEnableiOESFn(GLenum target, GLuint index) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glEnableiOES") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glEnableiOES"); gl_api_->glEnableiOESFn(target, index); } void TraceGLApi::glEnableVertexAttribArrayFn(GLuint index) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glEnableVertexAttribArray") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glEnableVertexAttribArray"); gl_api_->glEnableVertexAttribArrayFn(index); } void TraceGLApi::glEndQueryFn(GLenum target) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glEndQuery") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glEndQuery"); gl_api_->glEndQueryFn(target); } void TraceGLApi::glEndTilingQCOMFn(GLbitfield preserveMask) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glEndTilingQCOM") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glEndTilingQCOM"); gl_api_->glEndTilingQCOMFn(preserveMask); } void TraceGLApi::glEndTransformFeedbackFn(void) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glEndTransformFeedback") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glEndTransformFeedback"); gl_api_->glEndTransformFeedbackFn(); } GLsync TraceGLApi::glFenceSyncFn(GLenum condition, GLbitfield flags) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFenceSync") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFenceSync"); return gl_api_->glFenceSyncFn(condition, flags); } GLsync TraceGLApi::glFenceSyncAPPLEFn(GLenum condition, GLbitfield flags) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFenceSyncAPPLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFenceSyncAPPLE"); return gl_api_->glFenceSyncAPPLEFn(condition, flags); } void TraceGLApi::glFinishFn(void) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFinish") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFinish"); gl_api_->glFinishFn(); } void TraceGLApi::glFinishFenceAPPLEFn(GLuint fence) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFinishFenceAPPLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFinishFenceAPPLE"); gl_api_->glFinishFenceAPPLEFn(fence); } void TraceGLApi::glFinishFenceNVFn(GLuint fence) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFinishFenceNV") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFinishFenceNV"); gl_api_->glFinishFenceNVFn(fence); } void TraceGLApi::glFlushFn(void) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFlush") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFlush"); gl_api_->glFlushFn(); } void TraceGLApi::glFlushMappedBufferRangeFn(GLenum target, GLintptr offset, GLsizeiptr length) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFlushMappedBufferRange") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFlushMappedBufferRange"); gl_api_->glFlushMappedBufferRangeFn(target, offset, length); } void TraceGLApi::glFramebufferParameteriFn(GLenum target, GLenum pname, GLint param) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFramebufferParameteri") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFramebufferParameteri"); gl_api_->glFramebufferParameteriFn(target, pname, param); } @@ -7409,7 +7413,7 @@ void TraceGLApi::glFramebufferRenderbufferEXTFn(GLenum target, GLenum renderbuffertarget, GLuint renderbuffer) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glFramebufferRenderbufferEXT") + "TraceGLAPI::glFramebufferRenderbufferEXT"); gl_api_->glFramebufferRenderbufferEXTFn(target, attachment, renderbuffertarget, renderbuffer); } @@ -7419,7 +7423,7 @@ void TraceGLApi::glFramebufferTexture2DEXTFn(GLenum target, GLenum textarget, GLuint texture, GLint level) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFramebufferTexture2DEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFramebufferTexture2DEXT"); gl_api_->glFramebufferTexture2DEXTFn(target, attachment, textarget, texture, level); } @@ -7431,7 +7435,7 @@ void TraceGLApi::glFramebufferTexture2DMultisampleEXTFn(GLenum target, GLint level, GLsizei samples) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceGLAPI::glFramebufferTexture2DMultisampleEXT") + "gpu", "TraceGLAPI::glFramebufferTexture2DMultisampleEXT"); gl_api_->glFramebufferTexture2DMultisampleEXTFn(target, attachment, textarget, texture, level, samples); } @@ -7441,7 +7445,7 @@ void TraceGLApi::glFramebufferTextureLayerFn(GLenum target, GLuint texture, GLint level, GLint layer) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFramebufferTextureLayer") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFramebufferTextureLayer"); gl_api_->glFramebufferTextureLayerFn(target, attachment, texture, level, layer); } @@ -7453,83 +7457,83 @@ void TraceGLApi::glFramebufferTextureMultiviewOVRFn(GLenum target, GLint baseViewIndex, GLsizei numViews) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glFramebufferTextureMultiviewOVR") + "TraceGLAPI::glFramebufferTextureMultiviewOVR"); gl_api_->glFramebufferTextureMultiviewOVRFn(target, attachment, texture, level, baseViewIndex, numViews); } void TraceGLApi::glFrontFaceFn(GLenum mode) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFrontFace") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glFrontFace"); gl_api_->glFrontFaceFn(mode); } void TraceGLApi::glGenBuffersARBFn(GLsizei n, GLuint* buffers) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenBuffersARB") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenBuffersARB"); gl_api_->glGenBuffersARBFn(n, buffers); } void TraceGLApi::glGenerateMipmapEXTFn(GLenum target) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenerateMipmapEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenerateMipmapEXT"); gl_api_->glGenerateMipmapEXTFn(target); } void TraceGLApi::glGenFencesAPPLEFn(GLsizei n, GLuint* fences) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenFencesAPPLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenFencesAPPLE"); gl_api_->glGenFencesAPPLEFn(n, fences); } void TraceGLApi::glGenFencesNVFn(GLsizei n, GLuint* fences) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenFencesNV") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenFencesNV"); gl_api_->glGenFencesNVFn(n, fences); } void TraceGLApi::glGenFramebuffersEXTFn(GLsizei n, GLuint* framebuffers) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenFramebuffersEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenFramebuffersEXT"); gl_api_->glGenFramebuffersEXTFn(n, framebuffers); } GLuint TraceGLApi::glGenPathsNVFn(GLsizei range) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenPathsNV") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenPathsNV"); return gl_api_->glGenPathsNVFn(range); } GLuint TraceGLApi::glGenProgramPipelinesFn(GLsizei n, GLuint* pipelines) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenProgramPipelines") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenProgramPipelines"); return gl_api_->glGenProgramPipelinesFn(n, pipelines); } void TraceGLApi::glGenQueriesFn(GLsizei n, GLuint* ids) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenQueries") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenQueries"); gl_api_->glGenQueriesFn(n, ids); } void TraceGLApi::glGenRenderbuffersEXTFn(GLsizei n, GLuint* renderbuffers) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenRenderbuffersEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenRenderbuffersEXT"); gl_api_->glGenRenderbuffersEXTFn(n, renderbuffers); } void TraceGLApi::glGenSamplersFn(GLsizei n, GLuint* samplers) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenSamplers") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenSamplers"); gl_api_->glGenSamplersFn(n, samplers); } void TraceGLApi::glGenSemaphoresEXTFn(GLsizei n, GLuint* semaphores) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenSemaphoresEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenSemaphoresEXT"); gl_api_->glGenSemaphoresEXTFn(n, semaphores); } void TraceGLApi::glGenTexturesFn(GLsizei n, GLuint* textures) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenTextures") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenTextures"); gl_api_->glGenTexturesFn(n, textures); } void TraceGLApi::glGenTransformFeedbacksFn(GLsizei n, GLuint* ids) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenTransformFeedbacks") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenTransformFeedbacks"); gl_api_->glGenTransformFeedbacksFn(n, ids); } void TraceGLApi::glGenVertexArraysOESFn(GLsizei n, GLuint* arrays) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenVertexArraysOES") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGenVertexArraysOES"); gl_api_->glGenVertexArraysOESFn(n, arrays); } @@ -7540,7 +7544,7 @@ void TraceGLApi::glGetActiveAttribFn(GLuint program, GLint* size, GLenum* type, char* name) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetActiveAttrib") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetActiveAttrib"); gl_api_->glGetActiveAttribFn(program, index, bufsize, length, size, type, name); } @@ -7552,7 +7556,7 @@ void TraceGLApi::glGetActiveUniformFn(GLuint program, GLint* size, GLenum* type, char* name) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetActiveUniform") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetActiveUniform"); gl_api_->glGetActiveUniformFn(program, index, bufsize, length, size, type, name); } @@ -7561,7 +7565,7 @@ void TraceGLApi::glGetActiveUniformBlockivFn(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetActiveUniformBlockiv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetActiveUniformBlockiv"); gl_api_->glGetActiveUniformBlockivFn(program, uniformBlockIndex, pname, params); } @@ -7574,7 +7578,7 @@ void TraceGLApi::glGetActiveUniformBlockivRobustANGLEFn( GLsizei* length, GLint* params) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceGLAPI::glGetActiveUniformBlockivRobustANGLE") + "gpu", "TraceGLAPI::glGetActiveUniformBlockivRobustANGLE"); gl_api_->glGetActiveUniformBlockivRobustANGLEFn( program, uniformBlockIndex, pname, bufSize, length, params); } @@ -7585,7 +7589,7 @@ void TraceGLApi::glGetActiveUniformBlockNameFn(GLuint program, GLsizei* length, char* uniformBlockName) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glGetActiveUniformBlockName") + "TraceGLAPI::glGetActiveUniformBlockName"); gl_api_->glGetActiveUniformBlockNameFn(program, uniformBlockIndex, bufSize, length, uniformBlockName); } @@ -7595,7 +7599,7 @@ void TraceGLApi::glGetActiveUniformsivFn(GLuint program, const GLuint* uniformIndices, GLenum pname, GLint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetActiveUniformsiv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetActiveUniformsiv"); gl_api_->glGetActiveUniformsivFn(program, uniformCount, uniformIndices, pname, params); } @@ -7604,19 +7608,19 @@ void TraceGLApi::glGetAttachedShadersFn(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetAttachedShaders") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetAttachedShaders"); gl_api_->glGetAttachedShadersFn(program, maxcount, count, shaders); } GLint TraceGLApi::glGetAttribLocationFn(GLuint program, const char* name) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetAttribLocation") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetAttribLocation"); return gl_api_->glGetAttribLocationFn(program, name); } void TraceGLApi::glGetBooleani_vFn(GLenum target, GLuint index, GLboolean* data) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetBooleani_v") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetBooleani_v"); gl_api_->glGetBooleani_vFn(target, index, data); } @@ -7625,12 +7629,13 @@ void TraceGLApi::glGetBooleani_vRobustANGLEFn(GLenum target, GLsizei bufSize, GLsizei* length, GLboolean* data) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetBooleani_vRobustANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", + "TraceGLAPI::glGetBooleani_vRobustANGLE"); gl_api_->glGetBooleani_vRobustANGLEFn(target, index, bufSize, length, data); } void TraceGLApi::glGetBooleanvFn(GLenum pname, GLboolean* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetBooleanv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetBooleanv"); gl_api_->glGetBooleanvFn(pname, params); } @@ -7638,7 +7643,7 @@ void TraceGLApi::glGetBooleanvRobustANGLEFn(GLenum pname, GLsizei bufSize, GLsizei* length, GLboolean* data) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetBooleanvRobustANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetBooleanvRobustANGLE"); gl_api_->glGetBooleanvRobustANGLEFn(pname, bufSize, length, data); } @@ -7648,7 +7653,7 @@ void TraceGLApi::glGetBufferParameteri64vRobustANGLEFn(GLenum target, GLsizei* length, GLint64* params) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceGLAPI::glGetBufferParameteri64vRobustANGLE") + "gpu", "TraceGLAPI::glGetBufferParameteri64vRobustANGLE"); gl_api_->glGetBufferParameteri64vRobustANGLEFn(target, pname, bufSize, length, params); } @@ -7656,7 +7661,7 @@ void TraceGLApi::glGetBufferParameteri64vRobustANGLEFn(GLenum target, void TraceGLApi::glGetBufferParameterivFn(GLenum target, GLenum pname, GLint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetBufferParameteriv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetBufferParameteriv"); gl_api_->glGetBufferParameterivFn(target, pname, params); } @@ -7665,8 +7670,8 @@ void TraceGLApi::glGetBufferParameterivRobustANGLEFn(GLenum target, GLsizei bufSize, GLsizei* length, GLint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glGetBufferParameterivRobustANGLE") + TRACE_EVENT_BINARY_EFFICIENT0( + "gpu", "TraceGLAPI::glGetBufferParameterivRobustANGLE"); gl_api_->glGetBufferParameterivRobustANGLEFn(target, pname, bufSize, length, params); } @@ -7677,7 +7682,7 @@ void TraceGLApi::glGetBufferPointervRobustANGLEFn(GLenum target, GLsizei* length, void** params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glGetBufferPointervRobustANGLE") + "TraceGLAPI::glGetBufferPointervRobustANGLE"); gl_api_->glGetBufferPointervRobustANGLEFn(target, pname, bufSize, length, params); } @@ -7690,23 +7695,23 @@ GLuint TraceGLApi::glGetDebugMessageLogFn(GLuint count, GLenum* severities, GLsizei* lengths, char* messageLog) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetDebugMessageLog") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetDebugMessageLog"); return gl_api_->glGetDebugMessageLogFn(count, bufSize, sources, types, ids, severities, lengths, messageLog); } GLenum TraceGLApi::glGetErrorFn(void) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetError") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetError"); return gl_api_->glGetErrorFn(); } void TraceGLApi::glGetFenceivNVFn(GLuint fence, GLenum pname, GLint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetFenceivNV") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetFenceivNV"); gl_api_->glGetFenceivNVFn(fence, pname, params); } void TraceGLApi::glGetFloatvFn(GLenum pname, GLfloat* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetFloatv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetFloatv"); gl_api_->glGetFloatvFn(pname, params); } @@ -7714,17 +7719,17 @@ void TraceGLApi::glGetFloatvRobustANGLEFn(GLenum pname, GLsizei bufSize, GLsizei* length, GLfloat* data) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetFloatvRobustANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetFloatvRobustANGLE"); gl_api_->glGetFloatvRobustANGLEFn(pname, bufSize, length, data); } GLint TraceGLApi::glGetFragDataIndexFn(GLuint program, const char* name) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetFragDataIndex") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetFragDataIndex"); return gl_api_->glGetFragDataIndexFn(program, name); } GLint TraceGLApi::glGetFragDataLocationFn(GLuint program, const char* name) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetFragDataLocation") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetFragDataLocation"); return gl_api_->glGetFragDataLocationFn(program, name); } @@ -7733,7 +7738,7 @@ void TraceGLApi::glGetFramebufferAttachmentParameterivEXTFn(GLenum target, GLenum pname, GLint* params) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceGLAPI::glGetFramebufferAttachmentParameterivEXT") + "gpu", "TraceGLAPI::glGetFramebufferAttachmentParameterivEXT"); gl_api_->glGetFramebufferAttachmentParameterivEXTFn(target, attachment, pname, params); } @@ -7746,7 +7751,7 @@ void TraceGLApi::glGetFramebufferAttachmentParameterivRobustANGLEFn( GLsizei* length, GLint* params) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceGLAPI::glGetFramebufferAttachmentParameterivRobustANGLE") + "gpu", "TraceGLAPI::glGetFramebufferAttachmentParameterivRobustANGLE"); gl_api_->glGetFramebufferAttachmentParameterivRobustANGLEFn( target, attachment, pname, bufSize, length, params); } @@ -7755,7 +7760,7 @@ void TraceGLApi::glGetFramebufferParameterivFn(GLenum target, GLenum pname, GLint* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glGetFramebufferParameteriv") + "TraceGLAPI::glGetFramebufferParameteriv"); gl_api_->glGetFramebufferParameterivFn(target, pname, params); } @@ -7765,21 +7770,21 @@ void TraceGLApi::glGetFramebufferParameterivRobustANGLEFn(GLenum target, GLsizei* length, GLint* params) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceGLAPI::glGetFramebufferParameterivRobustANGLE") + "gpu", "TraceGLAPI::glGetFramebufferParameterivRobustANGLE"); gl_api_->glGetFramebufferParameterivRobustANGLEFn(target, pname, bufSize, length, params); } GLenum TraceGLApi::glGetGraphicsResetStatusARBFn(void) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glGetGraphicsResetStatusARB") + "TraceGLAPI::glGetGraphicsResetStatusARB"); return gl_api_->glGetGraphicsResetStatusARBFn(); } void TraceGLApi::glGetInteger64i_vFn(GLenum target, GLuint index, GLint64* data) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetInteger64i_v") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetInteger64i_v"); gl_api_->glGetInteger64i_vFn(target, index, data); } @@ -7789,12 +7794,12 @@ void TraceGLApi::glGetInteger64i_vRobustANGLEFn(GLenum target, GLsizei* length, GLint64* data) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glGetInteger64i_vRobustANGLE") + "TraceGLAPI::glGetInteger64i_vRobustANGLE"); gl_api_->glGetInteger64i_vRobustANGLEFn(target, index, bufSize, length, data); } void TraceGLApi::glGetInteger64vFn(GLenum pname, GLint64* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetInteger64v") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetInteger64v"); gl_api_->glGetInteger64vFn(pname, params); } @@ -7802,12 +7807,13 @@ void TraceGLApi::glGetInteger64vRobustANGLEFn(GLenum pname, GLsizei bufSize, GLsizei* length, GLint64* data) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetInteger64vRobustANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", + "TraceGLAPI::glGetInteger64vRobustANGLE"); gl_api_->glGetInteger64vRobustANGLEFn(pname, bufSize, length, data); } void TraceGLApi::glGetIntegeri_vFn(GLenum target, GLuint index, GLint* data) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetIntegeri_v") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetIntegeri_v"); gl_api_->glGetIntegeri_vFn(target, index, data); } @@ -7816,12 +7822,13 @@ void TraceGLApi::glGetIntegeri_vRobustANGLEFn(GLenum target, GLsizei bufSize, GLsizei* length, GLint* data) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetIntegeri_vRobustANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", + "TraceGLAPI::glGetIntegeri_vRobustANGLE"); gl_api_->glGetIntegeri_vRobustANGLEFn(target, index, bufSize, length, data); } void TraceGLApi::glGetIntegervFn(GLenum pname, GLint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetIntegerv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetIntegerv"); gl_api_->glGetIntegervFn(pname, params); } @@ -7829,7 +7836,7 @@ void TraceGLApi::glGetIntegervRobustANGLEFn(GLenum pname, GLsizei bufSize, GLsizei* length, GLint* data) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetIntegervRobustANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetIntegervRobustANGLE"); gl_api_->glGetIntegervRobustANGLEFn(pname, bufSize, length, data); } @@ -7838,7 +7845,7 @@ void TraceGLApi::glGetInternalformativFn(GLenum target, GLenum pname, GLsizei bufSize, GLint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetInternalformativ") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetInternalformativ"); gl_api_->glGetInternalformativFn(target, internalformat, pname, bufSize, params); } @@ -7850,7 +7857,7 @@ void TraceGLApi::glGetInternalformativRobustANGLEFn(GLenum target, GLsizei* length, GLint* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glGetInternalformativRobustANGLE") + "TraceGLAPI::glGetInternalformativRobustANGLE"); gl_api_->glGetInternalformativRobustANGLEFn(target, internalformat, pname, bufSize, length, params); } @@ -7862,7 +7869,7 @@ void TraceGLApi::glGetInternalformatSampleivNVFn(GLenum target, GLsizei bufSize, GLint* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glGetInternalformatSampleivNV") + "TraceGLAPI::glGetInternalformatSampleivNV"); gl_api_->glGetInternalformatSampleivNVFn(target, internalformat, samples, pname, bufSize, params); } @@ -7870,7 +7877,7 @@ void TraceGLApi::glGetInternalformatSampleivNVFn(GLenum target, void TraceGLApi::glGetMultisamplefvFn(GLenum pname, GLuint index, GLfloat* val) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetMultisamplefv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetMultisamplefv"); gl_api_->glGetMultisamplefvFn(pname, index, val); } @@ -7880,7 +7887,7 @@ void TraceGLApi::glGetMultisamplefvRobustANGLEFn(GLenum pname, GLsizei* length, GLfloat* val) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glGetMultisamplefvRobustANGLE") + "TraceGLAPI::glGetMultisamplefvRobustANGLE"); gl_api_->glGetMultisamplefvRobustANGLEFn(pname, index, bufSize, length, val); } @@ -7889,7 +7896,8 @@ void TraceGLApi::glGetnUniformfvRobustANGLEFn(GLuint program, GLsizei bufSize, GLsizei* length, GLfloat* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetnUniformfvRobustANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", + "TraceGLAPI::glGetnUniformfvRobustANGLE"); gl_api_->glGetnUniformfvRobustANGLEFn(program, location, bufSize, length, params); } @@ -7899,7 +7907,8 @@ void TraceGLApi::glGetnUniformivRobustANGLEFn(GLuint program, GLsizei bufSize, GLsizei* length, GLint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetnUniformivRobustANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", + "TraceGLAPI::glGetnUniformivRobustANGLE"); gl_api_->glGetnUniformivRobustANGLEFn(program, location, bufSize, length, params); } @@ -7910,7 +7919,7 @@ void TraceGLApi::glGetnUniformuivRobustANGLEFn(GLuint program, GLsizei* length, GLuint* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glGetnUniformuivRobustANGLE") + "TraceGLAPI::glGetnUniformuivRobustANGLE"); gl_api_->glGetnUniformuivRobustANGLEFn(program, location, bufSize, length, params); } @@ -7920,7 +7929,7 @@ void TraceGLApi::glGetObjectLabelFn(GLenum identifier, GLsizei bufSize, GLsizei* length, char* label) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetObjectLabel") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetObjectLabel"); gl_api_->glGetObjectLabelFn(identifier, name, bufSize, length, label); } @@ -7928,12 +7937,12 @@ void TraceGLApi::glGetObjectPtrLabelFn(void* ptr, GLsizei bufSize, GLsizei* length, char* label) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetObjectPtrLabel") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetObjectPtrLabel"); gl_api_->glGetObjectPtrLabelFn(ptr, bufSize, length, label); } void TraceGLApi::glGetPointervFn(GLenum pname, void** params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetPointerv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetPointerv"); gl_api_->glGetPointervFn(pname, params); } @@ -7942,7 +7951,7 @@ void TraceGLApi::glGetPointervRobustANGLERobustANGLEFn(GLenum pname, GLsizei* length, void** params) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceGLAPI::glGetPointervRobustANGLERobustANGLE") + "gpu", "TraceGLAPI::glGetPointervRobustANGLERobustANGLE"); gl_api_->glGetPointervRobustANGLERobustANGLEFn(pname, bufSize, length, params); } @@ -7952,7 +7961,7 @@ void TraceGLApi::glGetProgramBinaryFn(GLuint program, GLsizei* length, GLenum* binaryFormat, GLvoid* binary) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetProgramBinary") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetProgramBinary"); gl_api_->glGetProgramBinaryFn(program, bufSize, length, binaryFormat, binary); } @@ -7960,7 +7969,7 @@ void TraceGLApi::glGetProgramInfoLogFn(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetProgramInfoLog") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetProgramInfoLog"); gl_api_->glGetProgramInfoLogFn(program, bufsize, length, infolog); } @@ -7968,7 +7977,7 @@ void TraceGLApi::glGetProgramInterfaceivFn(GLuint program, GLenum programInterface, GLenum pname, GLint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetProgramInterfaceiv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetProgramInterfaceiv"); gl_api_->glGetProgramInterfaceivFn(program, programInterface, pname, params); } @@ -7979,13 +7988,13 @@ void TraceGLApi::glGetProgramInterfaceivRobustANGLEFn(GLuint program, GLsizei* length, GLint* params) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceGLAPI::glGetProgramInterfaceivRobustANGLE") + "gpu", "TraceGLAPI::glGetProgramInterfaceivRobustANGLE"); gl_api_->glGetProgramInterfaceivRobustANGLEFn(program, programInterface, pname, bufSize, length, params); } void TraceGLApi::glGetProgramivFn(GLuint program, GLenum pname, GLint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetProgramiv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetProgramiv"); gl_api_->glGetProgramivFn(program, pname, params); } @@ -7994,7 +8003,7 @@ void TraceGLApi::glGetProgramivRobustANGLEFn(GLuint program, GLsizei bufSize, GLsizei* length, GLint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetProgramivRobustANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetProgramivRobustANGLE"); gl_api_->glGetProgramivRobustANGLEFn(program, pname, bufSize, length, params); } @@ -8003,21 +8012,21 @@ void TraceGLApi::glGetProgramPipelineInfoLogFn(GLuint pipeline, GLsizei* length, GLchar* infoLog) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glGetProgramPipelineInfoLog") + "TraceGLAPI::glGetProgramPipelineInfoLog"); gl_api_->glGetProgramPipelineInfoLogFn(pipeline, bufSize, length, infoLog); } void TraceGLApi::glGetProgramPipelineivFn(GLuint pipeline, GLenum pname, GLint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetProgramPipelineiv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetProgramPipelineiv"); gl_api_->glGetProgramPipelineivFn(pipeline, pname, params); } GLuint TraceGLApi::glGetProgramResourceIndexFn(GLuint program, GLenum programInterface, const GLchar* name) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetProgramResourceIndex") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetProgramResourceIndex"); return gl_api_->glGetProgramResourceIndexFn(program, programInterface, name); } @@ -8029,7 +8038,7 @@ void TraceGLApi::glGetProgramResourceivFn(GLuint program, GLsizei bufSize, GLsizei* length, GLint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetProgramResourceiv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetProgramResourceiv"); gl_api_->glGetProgramResourceivFn(program, programInterface, index, propCount, props, bufSize, length, params); } @@ -8038,7 +8047,7 @@ GLint TraceGLApi::glGetProgramResourceLocationFn(GLuint program, GLenum programInterface, const char* name) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glGetProgramResourceLocation") + "TraceGLAPI::glGetProgramResourceLocation"); return gl_api_->glGetProgramResourceLocationFn(program, programInterface, name); } @@ -8049,13 +8058,13 @@ void TraceGLApi::glGetProgramResourceNameFn(GLuint program, GLsizei bufSize, GLsizei* length, GLchar* name) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetProgramResourceName") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetProgramResourceName"); gl_api_->glGetProgramResourceNameFn(program, programInterface, index, bufSize, length, name); } void TraceGLApi::glGetQueryivFn(GLenum target, GLenum pname, GLint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetQueryiv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetQueryiv"); gl_api_->glGetQueryivFn(target, pname, params); } @@ -8064,14 +8073,14 @@ void TraceGLApi::glGetQueryivRobustANGLEFn(GLenum target, GLsizei bufSize, GLsizei* length, GLint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetQueryivRobustANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetQueryivRobustANGLE"); gl_api_->glGetQueryivRobustANGLEFn(target, pname, bufSize, length, params); } void TraceGLApi::glGetQueryObjecti64vFn(GLuint id, GLenum pname, GLint64* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetQueryObjecti64v") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetQueryObjecti64v"); gl_api_->glGetQueryObjecti64vFn(id, pname, params); } @@ -8081,13 +8090,13 @@ void TraceGLApi::glGetQueryObjecti64vRobustANGLEFn(GLuint id, GLsizei* length, GLint64* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glGetQueryObjecti64vRobustANGLE") + "TraceGLAPI::glGetQueryObjecti64vRobustANGLE"); gl_api_->glGetQueryObjecti64vRobustANGLEFn(id, pname, bufSize, length, params); } void TraceGLApi::glGetQueryObjectivFn(GLuint id, GLenum pname, GLint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetQueryObjectiv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetQueryObjectiv"); gl_api_->glGetQueryObjectivFn(id, pname, params); } @@ -8097,14 +8106,14 @@ void TraceGLApi::glGetQueryObjectivRobustANGLEFn(GLuint id, GLsizei* length, GLint* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glGetQueryObjectivRobustANGLE") + "TraceGLAPI::glGetQueryObjectivRobustANGLE"); gl_api_->glGetQueryObjectivRobustANGLEFn(id, pname, bufSize, length, params); } void TraceGLApi::glGetQueryObjectui64vFn(GLuint id, GLenum pname, GLuint64* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetQueryObjectui64v") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetQueryObjectui64v"); gl_api_->glGetQueryObjectui64vFn(id, pname, params); } @@ -8114,7 +8123,7 @@ void TraceGLApi::glGetQueryObjectui64vRobustANGLEFn(GLuint id, GLsizei* length, GLuint64* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glGetQueryObjectui64vRobustANGLE") + "TraceGLAPI::glGetQueryObjectui64vRobustANGLE"); gl_api_->glGetQueryObjectui64vRobustANGLEFn(id, pname, bufSize, length, params); } @@ -8122,7 +8131,7 @@ void TraceGLApi::glGetQueryObjectui64vRobustANGLEFn(GLuint id, void TraceGLApi::glGetQueryObjectuivFn(GLuint id, GLenum pname, GLuint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetQueryObjectuiv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetQueryObjectuiv"); gl_api_->glGetQueryObjectuivFn(id, pname, params); } @@ -8132,7 +8141,7 @@ void TraceGLApi::glGetQueryObjectuivRobustANGLEFn(GLuint id, GLsizei* length, GLuint* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glGetQueryObjectuivRobustANGLE") + "TraceGLAPI::glGetQueryObjectuivRobustANGLE"); gl_api_->glGetQueryObjectuivRobustANGLEFn(id, pname, bufSize, length, params); } @@ -8140,7 +8149,7 @@ void TraceGLApi::glGetRenderbufferParameterivEXTFn(GLenum target, GLenum pname, GLint* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glGetRenderbufferParameterivEXT") + "TraceGLAPI::glGetRenderbufferParameterivEXT"); gl_api_->glGetRenderbufferParameterivEXTFn(target, pname, params); } @@ -8150,7 +8159,7 @@ void TraceGLApi::glGetRenderbufferParameterivRobustANGLEFn(GLenum target, GLsizei* length, GLint* params) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceGLAPI::glGetRenderbufferParameterivRobustANGLE") + "gpu", "TraceGLAPI::glGetRenderbufferParameterivRobustANGLE"); gl_api_->glGetRenderbufferParameterivRobustANGLEFn(target, pname, bufSize, length, params); } @@ -8158,7 +8167,7 @@ void TraceGLApi::glGetRenderbufferParameterivRobustANGLEFn(GLenum target, void TraceGLApi::glGetSamplerParameterfvFn(GLuint sampler, GLenum pname, GLfloat* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetSamplerParameterfv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetSamplerParameterfv"); gl_api_->glGetSamplerParameterfvFn(sampler, pname, params); } @@ -8168,7 +8177,7 @@ void TraceGLApi::glGetSamplerParameterfvRobustANGLEFn(GLuint sampler, GLsizei* length, GLfloat* params) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceGLAPI::glGetSamplerParameterfvRobustANGLE") + "gpu", "TraceGLAPI::glGetSamplerParameterfvRobustANGLE"); gl_api_->glGetSamplerParameterfvRobustANGLEFn(sampler, pname, bufSize, length, params); } @@ -8179,7 +8188,7 @@ void TraceGLApi::glGetSamplerParameterIivRobustANGLEFn(GLuint sampler, GLsizei* length, GLint* params) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceGLAPI::glGetSamplerParameterIivRobustANGLE") + "gpu", "TraceGLAPI::glGetSamplerParameterIivRobustANGLE"); gl_api_->glGetSamplerParameterIivRobustANGLEFn(sampler, pname, bufSize, length, params); } @@ -8190,7 +8199,7 @@ void TraceGLApi::glGetSamplerParameterIuivRobustANGLEFn(GLuint sampler, GLsizei* length, GLuint* params) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceGLAPI::glGetSamplerParameterIuivRobustANGLE") + "gpu", "TraceGLAPI::glGetSamplerParameterIuivRobustANGLE"); gl_api_->glGetSamplerParameterIuivRobustANGLEFn(sampler, pname, bufSize, length, params); } @@ -8198,7 +8207,7 @@ void TraceGLApi::glGetSamplerParameterIuivRobustANGLEFn(GLuint sampler, void TraceGLApi::glGetSamplerParameterivFn(GLuint sampler, GLenum pname, GLint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetSamplerParameteriv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetSamplerParameteriv"); gl_api_->glGetSamplerParameterivFn(sampler, pname, params); } @@ -8208,7 +8217,7 @@ void TraceGLApi::glGetSamplerParameterivRobustANGLEFn(GLuint sampler, GLsizei* length, GLint* params) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceGLAPI::glGetSamplerParameterivRobustANGLE") + "gpu", "TraceGLAPI::glGetSamplerParameterivRobustANGLE"); gl_api_->glGetSamplerParameterivRobustANGLEFn(sampler, pname, bufSize, length, params); } @@ -8217,12 +8226,12 @@ void TraceGLApi::glGetShaderInfoLogFn(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetShaderInfoLog") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetShaderInfoLog"); gl_api_->glGetShaderInfoLogFn(shader, bufsize, length, infolog); } void TraceGLApi::glGetShaderivFn(GLuint shader, GLenum pname, GLint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetShaderiv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetShaderiv"); gl_api_->glGetShaderivFn(shader, pname, params); } @@ -8231,7 +8240,7 @@ void TraceGLApi::glGetShaderivRobustANGLEFn(GLuint shader, GLsizei bufSize, GLsizei* length, GLint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetShaderivRobustANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetShaderivRobustANGLE"); gl_api_->glGetShaderivRobustANGLEFn(shader, pname, bufSize, length, params); } @@ -8239,7 +8248,8 @@ void TraceGLApi::glGetShaderPrecisionFormatFn(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetShaderPrecisionFormat") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", + "TraceGLAPI::glGetShaderPrecisionFormat"); gl_api_->glGetShaderPrecisionFormatFn(shadertype, precisiontype, range, precision); } @@ -8248,17 +8258,17 @@ void TraceGLApi::glGetShaderSourceFn(GLuint shader, GLsizei bufsize, GLsizei* length, char* source) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetShaderSource") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetShaderSource"); gl_api_->glGetShaderSourceFn(shader, bufsize, length, source); } const GLubyte* TraceGLApi::glGetStringFn(GLenum name) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetString") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetString"); return gl_api_->glGetStringFn(name); } const GLubyte* TraceGLApi::glGetStringiFn(GLenum name, GLuint index) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetStringi") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetStringi"); return gl_api_->glGetStringiFn(name, index); } @@ -8267,7 +8277,7 @@ void TraceGLApi::glGetSyncivFn(GLsync sync, GLsizei bufSize, GLsizei* length, GLint* values) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetSynciv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetSynciv"); gl_api_->glGetSyncivFn(sync, pname, bufSize, length, values); } @@ -8275,7 +8285,7 @@ void TraceGLApi::glGetTexLevelParameterfvFn(GLenum target, GLint level, GLenum pname, GLfloat* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetTexLevelParameterfv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetTexLevelParameterfv"); gl_api_->glGetTexLevelParameterfvFn(target, level, pname, params); } @@ -8286,7 +8296,7 @@ void TraceGLApi::glGetTexLevelParameterfvRobustANGLEFn(GLenum target, GLsizei* length, GLfloat* params) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceGLAPI::glGetTexLevelParameterfvRobustANGLE") + "gpu", "TraceGLAPI::glGetTexLevelParameterfvRobustANGLE"); gl_api_->glGetTexLevelParameterfvRobustANGLEFn(target, level, pname, bufSize, length, params); } @@ -8295,7 +8305,7 @@ void TraceGLApi::glGetTexLevelParameterivFn(GLenum target, GLint level, GLenum pname, GLint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetTexLevelParameteriv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetTexLevelParameteriv"); gl_api_->glGetTexLevelParameterivFn(target, level, pname, params); } @@ -8306,7 +8316,7 @@ void TraceGLApi::glGetTexLevelParameterivRobustANGLEFn(GLenum target, GLsizei* length, GLint* params) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceGLAPI::glGetTexLevelParameterivRobustANGLE") + "gpu", "TraceGLAPI::glGetTexLevelParameterivRobustANGLE"); gl_api_->glGetTexLevelParameterivRobustANGLEFn(target, level, pname, bufSize, length, params); } @@ -8314,7 +8324,7 @@ void TraceGLApi::glGetTexLevelParameterivRobustANGLEFn(GLenum target, void TraceGLApi::glGetTexParameterfvFn(GLenum target, GLenum pname, GLfloat* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetTexParameterfv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetTexParameterfv"); gl_api_->glGetTexParameterfvFn(target, pname, params); } @@ -8324,7 +8334,7 @@ void TraceGLApi::glGetTexParameterfvRobustANGLEFn(GLenum target, GLsizei* length, GLfloat* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glGetTexParameterfvRobustANGLE") + "TraceGLAPI::glGetTexParameterfvRobustANGLE"); gl_api_->glGetTexParameterfvRobustANGLEFn(target, pname, bufSize, length, params); } @@ -8335,7 +8345,7 @@ void TraceGLApi::glGetTexParameterIivRobustANGLEFn(GLenum target, GLsizei* length, GLint* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glGetTexParameterIivRobustANGLE") + "TraceGLAPI::glGetTexParameterIivRobustANGLE"); gl_api_->glGetTexParameterIivRobustANGLEFn(target, pname, bufSize, length, params); } @@ -8346,7 +8356,7 @@ void TraceGLApi::glGetTexParameterIuivRobustANGLEFn(GLenum target, GLsizei* length, GLuint* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glGetTexParameterIuivRobustANGLE") + "TraceGLAPI::glGetTexParameterIuivRobustANGLE"); gl_api_->glGetTexParameterIuivRobustANGLEFn(target, pname, bufSize, length, params); } @@ -8354,7 +8364,7 @@ void TraceGLApi::glGetTexParameterIuivRobustANGLEFn(GLenum target, void TraceGLApi::glGetTexParameterivFn(GLenum target, GLenum pname, GLint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetTexParameteriv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetTexParameteriv"); gl_api_->glGetTexParameterivFn(target, pname, params); } @@ -8364,7 +8374,7 @@ void TraceGLApi::glGetTexParameterivRobustANGLEFn(GLenum target, GLsizei* length, GLint* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glGetTexParameterivRobustANGLE") + "TraceGLAPI::glGetTexParameterivRobustANGLE"); gl_api_->glGetTexParameterivRobustANGLEFn(target, pname, bufSize, length, params); } @@ -8377,7 +8387,7 @@ void TraceGLApi::glGetTransformFeedbackVaryingFn(GLuint program, GLenum* type, char* name) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glGetTransformFeedbackVarying") + "TraceGLAPI::glGetTransformFeedbackVarying"); gl_api_->glGetTransformFeedbackVaryingFn(program, index, bufSize, length, size, type, name); } @@ -8387,20 +8397,20 @@ void TraceGLApi::glGetTranslatedShaderSourceANGLEFn(GLuint shader, GLsizei* length, char* source) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glGetTranslatedShaderSourceANGLE") + "TraceGLAPI::glGetTranslatedShaderSourceANGLE"); gl_api_->glGetTranslatedShaderSourceANGLEFn(shader, bufsize, length, source); } GLuint TraceGLApi::glGetUniformBlockIndexFn(GLuint program, const char* uniformBlockName) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetUniformBlockIndex") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetUniformBlockIndex"); return gl_api_->glGetUniformBlockIndexFn(program, uniformBlockName); } void TraceGLApi::glGetUniformfvFn(GLuint program, GLint location, GLfloat* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetUniformfv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetUniformfv"); gl_api_->glGetUniformfvFn(program, location, params); } @@ -8409,7 +8419,7 @@ void TraceGLApi::glGetUniformfvRobustANGLEFn(GLuint program, GLsizei bufSize, GLsizei* length, GLfloat* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetUniformfvRobustANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetUniformfvRobustANGLE"); gl_api_->glGetUniformfvRobustANGLEFn(program, location, bufSize, length, params); } @@ -8418,7 +8428,7 @@ void TraceGLApi::glGetUniformIndicesFn(GLuint program, GLsizei uniformCount, const char* const* uniformNames, GLuint* uniformIndices) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetUniformIndices") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetUniformIndices"); gl_api_->glGetUniformIndicesFn(program, uniformCount, uniformNames, uniformIndices); } @@ -8426,7 +8436,7 @@ void TraceGLApi::glGetUniformIndicesFn(GLuint program, void TraceGLApi::glGetUniformivFn(GLuint program, GLint location, GLint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetUniformiv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetUniformiv"); gl_api_->glGetUniformivFn(program, location, params); } @@ -8435,20 +8445,20 @@ void TraceGLApi::glGetUniformivRobustANGLEFn(GLuint program, GLsizei bufSize, GLsizei* length, GLint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetUniformivRobustANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetUniformivRobustANGLE"); gl_api_->glGetUniformivRobustANGLEFn(program, location, bufSize, length, params); } GLint TraceGLApi::glGetUniformLocationFn(GLuint program, const char* name) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetUniformLocation") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetUniformLocation"); return gl_api_->glGetUniformLocationFn(program, name); } void TraceGLApi::glGetUniformuivFn(GLuint program, GLint location, GLuint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetUniformuiv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetUniformuiv"); gl_api_->glGetUniformuivFn(program, location, params); } @@ -8457,7 +8467,8 @@ void TraceGLApi::glGetUniformuivRobustANGLEFn(GLuint program, GLsizei bufSize, GLsizei* length, GLuint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetUniformuivRobustANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", + "TraceGLAPI::glGetUniformuivRobustANGLE"); gl_api_->glGetUniformuivRobustANGLEFn(program, location, bufSize, length, params); } @@ -8465,7 +8476,7 @@ void TraceGLApi::glGetUniformuivRobustANGLEFn(GLuint program, void TraceGLApi::glGetVertexAttribfvFn(GLuint index, GLenum pname, GLfloat* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetVertexAttribfv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetVertexAttribfv"); gl_api_->glGetVertexAttribfvFn(index, pname, params); } @@ -8475,7 +8486,7 @@ void TraceGLApi::glGetVertexAttribfvRobustANGLEFn(GLuint index, GLsizei* length, GLfloat* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glGetVertexAttribfvRobustANGLE") + "TraceGLAPI::glGetVertexAttribfvRobustANGLE"); gl_api_->glGetVertexAttribfvRobustANGLEFn(index, pname, bufSize, length, params); } @@ -8486,7 +8497,7 @@ void TraceGLApi::glGetVertexAttribIivRobustANGLEFn(GLuint index, GLsizei* length, GLint* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glGetVertexAttribIivRobustANGLE") + "TraceGLAPI::glGetVertexAttribIivRobustANGLE"); gl_api_->glGetVertexAttribIivRobustANGLEFn(index, pname, bufSize, length, params); } @@ -8497,7 +8508,7 @@ void TraceGLApi::glGetVertexAttribIuivRobustANGLEFn(GLuint index, GLsizei* length, GLuint* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glGetVertexAttribIuivRobustANGLE") + "TraceGLAPI::glGetVertexAttribIuivRobustANGLE"); gl_api_->glGetVertexAttribIuivRobustANGLEFn(index, pname, bufSize, length, params); } @@ -8505,7 +8516,7 @@ void TraceGLApi::glGetVertexAttribIuivRobustANGLEFn(GLuint index, void TraceGLApi::glGetVertexAttribivFn(GLuint index, GLenum pname, GLint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetVertexAttribiv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetVertexAttribiv"); gl_api_->glGetVertexAttribivFn(index, pname, params); } @@ -8515,7 +8526,7 @@ void TraceGLApi::glGetVertexAttribivRobustANGLEFn(GLuint index, GLsizei* length, GLint* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glGetVertexAttribivRobustANGLE") + "TraceGLAPI::glGetVertexAttribivRobustANGLE"); gl_api_->glGetVertexAttribivRobustANGLEFn(index, pname, bufSize, length, params); } @@ -8523,7 +8534,7 @@ void TraceGLApi::glGetVertexAttribivRobustANGLEFn(GLuint index, void TraceGLApi::glGetVertexAttribPointervFn(GLuint index, GLenum pname, void** pointer) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetVertexAttribPointerv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glGetVertexAttribPointerv"); gl_api_->glGetVertexAttribPointervFn(index, pname, pointer); } @@ -8533,13 +8544,13 @@ void TraceGLApi::glGetVertexAttribPointervRobustANGLEFn(GLuint index, GLsizei* length, void** pointer) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceGLAPI::glGetVertexAttribPointervRobustANGLE") + "gpu", "TraceGLAPI::glGetVertexAttribPointervRobustANGLE"); gl_api_->glGetVertexAttribPointervRobustANGLEFn(index, pname, bufSize, length, pointer); } void TraceGLApi::glHintFn(GLenum target, GLenum mode) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glHint") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glHint"); gl_api_->glHintFn(target, mode); } @@ -8547,7 +8558,7 @@ void TraceGLApi::glImportMemoryFdEXTFn(GLuint memory, GLuint64 size, GLenum handleType, GLint fd) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glImportMemoryFdEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glImportMemoryFdEXT"); gl_api_->glImportMemoryFdEXTFn(memory, size, handleType, fd); } @@ -8556,7 +8567,7 @@ void TraceGLApi::glImportMemoryWin32HandleEXTFn(GLuint memory, GLenum handleType, void* handle) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glImportMemoryWin32HandleEXT") + "TraceGLAPI::glImportMemoryWin32HandleEXT"); gl_api_->glImportMemoryWin32HandleEXTFn(memory, size, handleType, handle); } @@ -8565,14 +8576,14 @@ void TraceGLApi::glImportMemoryZirconHandleANGLEFn(GLuint memory, GLenum handleType, GLuint handle) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glImportMemoryZirconHandleANGLE") + "TraceGLAPI::glImportMemoryZirconHandleANGLE"); gl_api_->glImportMemoryZirconHandleANGLEFn(memory, size, handleType, handle); } void TraceGLApi::glImportSemaphoreFdEXTFn(GLuint semaphore, GLenum handleType, GLint fd) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glImportSemaphoreFdEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glImportSemaphoreFdEXT"); gl_api_->glImportSemaphoreFdEXTFn(semaphore, handleType, fd); } @@ -8580,7 +8591,7 @@ void TraceGLApi::glImportSemaphoreWin32HandleEXTFn(GLuint semaphore, GLenum handleType, void* handle) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glImportSemaphoreWin32HandleEXT") + "TraceGLAPI::glImportSemaphoreWin32HandleEXT"); gl_api_->glImportSemaphoreWin32HandleEXTFn(semaphore, handleType, handle); } @@ -8588,19 +8599,19 @@ void TraceGLApi::glImportSemaphoreZirconHandleANGLEFn(GLuint semaphore, GLenum handleType, GLuint handle) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceGLAPI::glImportSemaphoreZirconHandleANGLE") + "gpu", "TraceGLAPI::glImportSemaphoreZirconHandleANGLE"); gl_api_->glImportSemaphoreZirconHandleANGLEFn(semaphore, handleType, handle); } void TraceGLApi::glInsertEventMarkerEXTFn(GLsizei length, const char* marker) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glInsertEventMarkerEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glInsertEventMarkerEXT"); gl_api_->glInsertEventMarkerEXTFn(length, marker); } void TraceGLApi::glInvalidateFramebufferFn(GLenum target, GLsizei numAttachments, const GLenum* attachments) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glInvalidateFramebuffer") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glInvalidateFramebuffer"); gl_api_->glInvalidateFramebufferFn(target, numAttachments, attachments); } @@ -8611,118 +8622,119 @@ void TraceGLApi::glInvalidateSubFramebufferFn(GLenum target, GLint y, GLint width, GLint height) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glInvalidateSubFramebuffer") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", + "TraceGLAPI::glInvalidateSubFramebuffer"); gl_api_->glInvalidateSubFramebufferFn(target, numAttachments, attachments, x, y, width, height); } void TraceGLApi::glInvalidateTextureANGLEFn(GLenum target) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glInvalidateTextureANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glInvalidateTextureANGLE"); gl_api_->glInvalidateTextureANGLEFn(target); } GLboolean TraceGLApi::glIsBufferFn(GLuint buffer) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsBuffer") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsBuffer"); return gl_api_->glIsBufferFn(buffer); } GLboolean TraceGLApi::glIsEnabledFn(GLenum cap) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsEnabled") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsEnabled"); return gl_api_->glIsEnabledFn(cap); } GLboolean TraceGLApi::glIsEnablediOESFn(GLenum target, GLuint index) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsEnablediOES") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsEnablediOES"); return gl_api_->glIsEnablediOESFn(target, index); } GLboolean TraceGLApi::glIsFenceAPPLEFn(GLuint fence) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsFenceAPPLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsFenceAPPLE"); return gl_api_->glIsFenceAPPLEFn(fence); } GLboolean TraceGLApi::glIsFenceNVFn(GLuint fence) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsFenceNV") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsFenceNV"); return gl_api_->glIsFenceNVFn(fence); } GLboolean TraceGLApi::glIsFramebufferEXTFn(GLuint framebuffer) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsFramebufferEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsFramebufferEXT"); return gl_api_->glIsFramebufferEXTFn(framebuffer); } GLboolean TraceGLApi::glIsPathNVFn(GLuint path) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsPathNV") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsPathNV"); return gl_api_->glIsPathNVFn(path); } GLboolean TraceGLApi::glIsProgramFn(GLuint program) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsProgram") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsProgram"); return gl_api_->glIsProgramFn(program); } GLboolean TraceGLApi::glIsProgramPipelineFn(GLuint pipeline) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsProgramPipeline") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsProgramPipeline"); return gl_api_->glIsProgramPipelineFn(pipeline); } GLboolean TraceGLApi::glIsQueryFn(GLuint query) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsQuery") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsQuery"); return gl_api_->glIsQueryFn(query); } GLboolean TraceGLApi::glIsRenderbufferEXTFn(GLuint renderbuffer) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsRenderbufferEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsRenderbufferEXT"); return gl_api_->glIsRenderbufferEXTFn(renderbuffer); } GLboolean TraceGLApi::glIsSamplerFn(GLuint sampler) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsSampler") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsSampler"); return gl_api_->glIsSamplerFn(sampler); } GLboolean TraceGLApi::glIsShaderFn(GLuint shader) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsShader") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsShader"); return gl_api_->glIsShaderFn(shader); } GLboolean TraceGLApi::glIsSyncFn(GLsync sync) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsSync") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsSync"); return gl_api_->glIsSyncFn(sync); } GLboolean TraceGLApi::glIsSyncAPPLEFn(GLsync sync) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsSyncAPPLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsSyncAPPLE"); return gl_api_->glIsSyncAPPLEFn(sync); } GLboolean TraceGLApi::glIsTextureFn(GLuint texture) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsTexture") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsTexture"); return gl_api_->glIsTextureFn(texture); } GLboolean TraceGLApi::glIsTransformFeedbackFn(GLuint id) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsTransformFeedback") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsTransformFeedback"); return gl_api_->glIsTransformFeedbackFn(id); } GLboolean TraceGLApi::glIsVertexArrayOESFn(GLuint array) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsVertexArrayOES") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glIsVertexArrayOES"); return gl_api_->glIsVertexArrayOESFn(array); } void TraceGLApi::glLineWidthFn(GLfloat width) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glLineWidth") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glLineWidth"); gl_api_->glLineWidthFn(width); } void TraceGLApi::glLinkProgramFn(GLuint program) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glLinkProgram") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glLinkProgram"); gl_api_->glLinkProgramFn(program); } void* TraceGLApi::glMapBufferFn(GLenum target, GLenum access) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glMapBuffer") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glMapBuffer"); return gl_api_->glMapBufferFn(target, access); } @@ -8730,33 +8742,33 @@ void* TraceGLApi::glMapBufferRangeFn(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glMapBufferRange") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glMapBufferRange"); return gl_api_->glMapBufferRangeFn(target, offset, length, access); } void TraceGLApi::glMatrixLoadfEXTFn(GLenum matrixMode, const GLfloat* m) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glMatrixLoadfEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glMatrixLoadfEXT"); gl_api_->glMatrixLoadfEXTFn(matrixMode, m); } void TraceGLApi::glMatrixLoadIdentityEXTFn(GLenum matrixMode) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glMatrixLoadIdentityEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glMatrixLoadIdentityEXT"); gl_api_->glMatrixLoadIdentityEXTFn(matrixMode); } void TraceGLApi::glMaxShaderCompilerThreadsKHRFn(GLuint count) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glMaxShaderCompilerThreadsKHR") + "TraceGLAPI::glMaxShaderCompilerThreadsKHR"); gl_api_->glMaxShaderCompilerThreadsKHRFn(count); } void TraceGLApi::glMemoryBarrierByRegionFn(GLbitfield barriers) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glMemoryBarrierByRegion") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glMemoryBarrierByRegion"); gl_api_->glMemoryBarrierByRegionFn(barriers); } void TraceGLApi::glMemoryBarrierEXTFn(GLbitfield barriers) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glMemoryBarrierEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glMemoryBarrierEXT"); gl_api_->glMemoryBarrierEXTFn(barriers); } @@ -8764,12 +8776,12 @@ void TraceGLApi::glMemoryObjectParameterivEXTFn(GLuint memoryObject, GLenum pname, const GLint* param) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glMemoryObjectParameterivEXT") + "TraceGLAPI::glMemoryObjectParameterivEXT"); gl_api_->glMemoryObjectParameterivEXTFn(memoryObject, pname, param); } void TraceGLApi::glMinSampleShadingFn(GLfloat value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glMinSampleShading") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glMinSampleShading"); gl_api_->glMinSampleShadingFn(value); } @@ -8777,7 +8789,7 @@ void TraceGLApi::glMultiDrawArraysANGLEFn(GLenum mode, const GLint* firsts, const GLsizei* counts, GLsizei drawcount) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glMultiDrawArraysANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glMultiDrawArraysANGLE"); gl_api_->glMultiDrawArraysANGLEFn(mode, firsts, counts, drawcount); } @@ -8788,7 +8800,7 @@ void TraceGLApi::glMultiDrawArraysInstancedANGLEFn( const GLsizei* instanceCounts, GLsizei drawcount) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glMultiDrawArraysInstancedANGLE") + "TraceGLAPI::glMultiDrawArraysInstancedANGLE"); gl_api_->glMultiDrawArraysInstancedANGLEFn(mode, firsts, counts, instanceCounts, drawcount); } @@ -8801,7 +8813,7 @@ void TraceGLApi::glMultiDrawArraysInstancedBaseInstanceANGLEFn( const GLuint* baseInstances, GLsizei drawcount) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceGLAPI::glMultiDrawArraysInstancedBaseInstanceANGLE") + "gpu", "TraceGLAPI::glMultiDrawArraysInstancedBaseInstanceANGLE"); gl_api_->glMultiDrawArraysInstancedBaseInstanceANGLEFn( mode, firsts, counts, instanceCounts, baseInstances, drawcount); } @@ -8811,7 +8823,7 @@ void TraceGLApi::glMultiDrawElementsANGLEFn(GLenum mode, GLenum type, const GLvoid* const* indices, GLsizei drawcount) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glMultiDrawElementsANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glMultiDrawElementsANGLE"); gl_api_->glMultiDrawElementsANGLEFn(mode, counts, type, indices, drawcount); } @@ -8822,8 +8834,8 @@ void TraceGLApi::glMultiDrawElementsInstancedANGLEFn( const GLvoid* const* indices, const GLsizei* instanceCounts, GLsizei drawcount) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glMultiDrawElementsInstancedANGLE") + TRACE_EVENT_BINARY_EFFICIENT0( + "gpu", "TraceGLAPI::glMultiDrawElementsInstancedANGLE"); gl_api_->glMultiDrawElementsInstancedANGLEFn(mode, counts, type, indices, instanceCounts, drawcount); } @@ -8839,7 +8851,7 @@ void TraceGLApi::glMultiDrawElementsInstancedBaseVertexBaseInstanceANGLEFn( GLsizei drawcount) { TRACE_EVENT_BINARY_EFFICIENT0( "gpu", - "TraceGLAPI::glMultiDrawElementsInstancedBaseVertexBaseInstanceANGLE") + "TraceGLAPI::glMultiDrawElementsInstancedBaseVertexBaseInstanceANGLE"); gl_api_->glMultiDrawElementsInstancedBaseVertexBaseInstanceANGLEFn( mode, counts, type, indices, instanceCounts, baseVertices, baseInstances, drawcount); @@ -8849,19 +8861,19 @@ void TraceGLApi::glObjectLabelFn(GLenum identifier, GLuint name, GLsizei length, const char* label) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glObjectLabel") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glObjectLabel"); gl_api_->glObjectLabelFn(identifier, name, length, label); } void TraceGLApi::glObjectPtrLabelFn(void* ptr, GLsizei length, const char* label) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glObjectPtrLabel") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glObjectPtrLabel"); gl_api_->glObjectPtrLabelFn(ptr, length, label); } void TraceGLApi::glPatchParameteriFn(GLenum pname, GLint value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPatchParameteri") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPatchParameteri"); gl_api_->glPatchParameteriFn(pname, value); } @@ -8871,7 +8883,7 @@ void TraceGLApi::glPathCommandsNVFn(GLuint path, GLsizei numCoords, GLenum coordType, const GLvoid* coords) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPathCommandsNV") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPathCommandsNV"); gl_api_->glPathCommandsNVFn(path, numCommands, commands, numCoords, coordType, coords); } @@ -8879,57 +8891,57 @@ void TraceGLApi::glPathCommandsNVFn(GLuint path, void TraceGLApi::glPathParameterfNVFn(GLuint path, GLenum pname, GLfloat value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPathParameterfNV") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPathParameterfNV"); gl_api_->glPathParameterfNVFn(path, pname, value); } void TraceGLApi::glPathParameteriNVFn(GLuint path, GLenum pname, GLint value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPathParameteriNV") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPathParameteriNV"); gl_api_->glPathParameteriNVFn(path, pname, value); } void TraceGLApi::glPathStencilFuncNVFn(GLenum func, GLint ref, GLuint mask) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPathStencilFuncNV") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPathStencilFuncNV"); gl_api_->glPathStencilFuncNVFn(func, ref, mask); } void TraceGLApi::glPauseTransformFeedbackFn(void) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPauseTransformFeedback") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPauseTransformFeedback"); gl_api_->glPauseTransformFeedbackFn(); } void TraceGLApi::glPixelStoreiFn(GLenum pname, GLint param) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPixelStorei") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPixelStorei"); gl_api_->glPixelStoreiFn(pname, param); } void TraceGLApi::glPointParameteriFn(GLenum pname, GLint param) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPointParameteri") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPointParameteri"); gl_api_->glPointParameteriFn(pname, param); } void TraceGLApi::glPolygonModeFn(GLenum face, GLenum mode) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPolygonMode") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPolygonMode"); gl_api_->glPolygonModeFn(face, mode); } void TraceGLApi::glPolygonOffsetFn(GLfloat factor, GLfloat units) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPolygonOffset") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPolygonOffset"); gl_api_->glPolygonOffsetFn(factor, units); } void TraceGLApi::glPopDebugGroupFn() { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPopDebugGroup") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPopDebugGroup"); gl_api_->glPopDebugGroupFn(); } void TraceGLApi::glPopGroupMarkerEXTFn(void) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPopGroupMarkerEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPopGroupMarkerEXT"); gl_api_->glPopGroupMarkerEXTFn(); } void TraceGLApi::glPrimitiveRestartIndexFn(GLuint index) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPrimitiveRestartIndex") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPrimitiveRestartIndex"); gl_api_->glPrimitiveRestartIndexFn(index); } @@ -8937,14 +8949,14 @@ void TraceGLApi::glProgramBinaryFn(GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramBinary") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramBinary"); gl_api_->glProgramBinaryFn(program, binaryFormat, binary, length); } void TraceGLApi::glProgramParameteriFn(GLuint program, GLenum pname, GLint value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramParameteri") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramParameteri"); gl_api_->glProgramParameteriFn(program, pname, value); } @@ -8954,7 +8966,7 @@ void TraceGLApi::glProgramPathFragmentInputGenNVFn(GLuint program, GLint components, const GLfloat* coeffs) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glProgramPathFragmentInputGenNV") + "TraceGLAPI::glProgramPathFragmentInputGenNV"); gl_api_->glProgramPathFragmentInputGenNVFn(program, location, genMode, components, coeffs); } @@ -8962,7 +8974,7 @@ void TraceGLApi::glProgramPathFragmentInputGenNVFn(GLuint program, void TraceGLApi::glProgramUniform1fFn(GLuint program, GLint location, GLfloat v0) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform1f") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform1f"); gl_api_->glProgramUniform1fFn(program, location, v0); } @@ -8970,14 +8982,14 @@ void TraceGLApi::glProgramUniform1fvFn(GLuint program, GLint location, GLsizei count, const GLfloat* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform1fv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform1fv"); gl_api_->glProgramUniform1fvFn(program, location, count, value); } void TraceGLApi::glProgramUniform1iFn(GLuint program, GLint location, GLint v0) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform1i") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform1i"); gl_api_->glProgramUniform1iFn(program, location, v0); } @@ -8985,14 +8997,14 @@ void TraceGLApi::glProgramUniform1ivFn(GLuint program, GLint location, GLsizei count, const GLint* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform1iv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform1iv"); gl_api_->glProgramUniform1ivFn(program, location, count, value); } void TraceGLApi::glProgramUniform1uiFn(GLuint program, GLint location, GLuint v0) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform1ui") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform1ui"); gl_api_->glProgramUniform1uiFn(program, location, v0); } @@ -9000,7 +9012,7 @@ void TraceGLApi::glProgramUniform1uivFn(GLuint program, GLint location, GLsizei count, const GLuint* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform1uiv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform1uiv"); gl_api_->glProgramUniform1uivFn(program, location, count, value); } @@ -9008,7 +9020,7 @@ void TraceGLApi::glProgramUniform2fFn(GLuint program, GLint location, GLfloat v0, GLfloat v1) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform2f") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform2f"); gl_api_->glProgramUniform2fFn(program, location, v0, v1); } @@ -9016,7 +9028,7 @@ void TraceGLApi::glProgramUniform2fvFn(GLuint program, GLint location, GLsizei count, const GLfloat* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform2fv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform2fv"); gl_api_->glProgramUniform2fvFn(program, location, count, value); } @@ -9024,7 +9036,7 @@ void TraceGLApi::glProgramUniform2iFn(GLuint program, GLint location, GLint v0, GLint v1) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform2i") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform2i"); gl_api_->glProgramUniform2iFn(program, location, v0, v1); } @@ -9032,7 +9044,7 @@ void TraceGLApi::glProgramUniform2ivFn(GLuint program, GLint location, GLsizei count, const GLint* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform2iv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform2iv"); gl_api_->glProgramUniform2ivFn(program, location, count, value); } @@ -9040,7 +9052,7 @@ void TraceGLApi::glProgramUniform2uiFn(GLuint program, GLint location, GLuint v0, GLuint v1) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform2ui") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform2ui"); gl_api_->glProgramUniform2uiFn(program, location, v0, v1); } @@ -9048,7 +9060,7 @@ void TraceGLApi::glProgramUniform2uivFn(GLuint program, GLint location, GLsizei count, const GLuint* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform2uiv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform2uiv"); gl_api_->glProgramUniform2uivFn(program, location, count, value); } @@ -9057,7 +9069,7 @@ void TraceGLApi::glProgramUniform3fFn(GLuint program, GLfloat v0, GLfloat v1, GLfloat v2) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform3f") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform3f"); gl_api_->glProgramUniform3fFn(program, location, v0, v1, v2); } @@ -9065,7 +9077,7 @@ void TraceGLApi::glProgramUniform3fvFn(GLuint program, GLint location, GLsizei count, const GLfloat* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform3fv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform3fv"); gl_api_->glProgramUniform3fvFn(program, location, count, value); } @@ -9074,7 +9086,7 @@ void TraceGLApi::glProgramUniform3iFn(GLuint program, GLint v0, GLint v1, GLint v2) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform3i") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform3i"); gl_api_->glProgramUniform3iFn(program, location, v0, v1, v2); } @@ -9082,7 +9094,7 @@ void TraceGLApi::glProgramUniform3ivFn(GLuint program, GLint location, GLsizei count, const GLint* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform3iv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform3iv"); gl_api_->glProgramUniform3ivFn(program, location, count, value); } @@ -9091,7 +9103,7 @@ void TraceGLApi::glProgramUniform3uiFn(GLuint program, GLuint v0, GLuint v1, GLuint v2) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform3ui") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform3ui"); gl_api_->glProgramUniform3uiFn(program, location, v0, v1, v2); } @@ -9099,7 +9111,7 @@ void TraceGLApi::glProgramUniform3uivFn(GLuint program, GLint location, GLsizei count, const GLuint* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform3uiv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform3uiv"); gl_api_->glProgramUniform3uivFn(program, location, count, value); } @@ -9109,7 +9121,7 @@ void TraceGLApi::glProgramUniform4fFn(GLuint program, GLfloat v1, GLfloat v2, GLfloat v3) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform4f") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform4f"); gl_api_->glProgramUniform4fFn(program, location, v0, v1, v2, v3); } @@ -9117,7 +9129,7 @@ void TraceGLApi::glProgramUniform4fvFn(GLuint program, GLint location, GLsizei count, const GLfloat* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform4fv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform4fv"); gl_api_->glProgramUniform4fvFn(program, location, count, value); } @@ -9127,7 +9139,7 @@ void TraceGLApi::glProgramUniform4iFn(GLuint program, GLint v1, GLint v2, GLint v3) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform4i") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform4i"); gl_api_->glProgramUniform4iFn(program, location, v0, v1, v2, v3); } @@ -9135,7 +9147,7 @@ void TraceGLApi::glProgramUniform4ivFn(GLuint program, GLint location, GLsizei count, const GLint* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform4iv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform4iv"); gl_api_->glProgramUniform4ivFn(program, location, count, value); } @@ -9145,7 +9157,7 @@ void TraceGLApi::glProgramUniform4uiFn(GLuint program, GLuint v1, GLuint v2, GLuint v3) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform4ui") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform4ui"); gl_api_->glProgramUniform4uiFn(program, location, v0, v1, v2, v3); } @@ -9153,7 +9165,7 @@ void TraceGLApi::glProgramUniform4uivFn(GLuint program, GLint location, GLsizei count, const GLuint* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform4uiv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniform4uiv"); gl_api_->glProgramUniform4uivFn(program, location, count, value); } @@ -9162,7 +9174,7 @@ void TraceGLApi::glProgramUniformMatrix2fvFn(GLuint program, GLsizei count, GLboolean transpose, const GLfloat* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniformMatrix2fv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniformMatrix2fv"); gl_api_->glProgramUniformMatrix2fvFn(program, location, count, transpose, value); } @@ -9173,7 +9185,7 @@ void TraceGLApi::glProgramUniformMatrix2x3fvFn(GLuint program, GLboolean transpose, const GLfloat* value) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glProgramUniformMatrix2x3fv") + "TraceGLAPI::glProgramUniformMatrix2x3fv"); gl_api_->glProgramUniformMatrix2x3fvFn(program, location, count, transpose, value); } @@ -9184,7 +9196,7 @@ void TraceGLApi::glProgramUniformMatrix2x4fvFn(GLuint program, GLboolean transpose, const GLfloat* value) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glProgramUniformMatrix2x4fv") + "TraceGLAPI::glProgramUniformMatrix2x4fv"); gl_api_->glProgramUniformMatrix2x4fvFn(program, location, count, transpose, value); } @@ -9194,7 +9206,7 @@ void TraceGLApi::glProgramUniformMatrix3fvFn(GLuint program, GLsizei count, GLboolean transpose, const GLfloat* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniformMatrix3fv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniformMatrix3fv"); gl_api_->glProgramUniformMatrix3fvFn(program, location, count, transpose, value); } @@ -9205,7 +9217,7 @@ void TraceGLApi::glProgramUniformMatrix3x2fvFn(GLuint program, GLboolean transpose, const GLfloat* value) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glProgramUniformMatrix3x2fv") + "TraceGLAPI::glProgramUniformMatrix3x2fv"); gl_api_->glProgramUniformMatrix3x2fvFn(program, location, count, transpose, value); } @@ -9216,7 +9228,7 @@ void TraceGLApi::glProgramUniformMatrix3x4fvFn(GLuint program, GLboolean transpose, const GLfloat* value) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glProgramUniformMatrix3x4fv") + "TraceGLAPI::glProgramUniformMatrix3x4fv"); gl_api_->glProgramUniformMatrix3x4fvFn(program, location, count, transpose, value); } @@ -9226,7 +9238,7 @@ void TraceGLApi::glProgramUniformMatrix4fvFn(GLuint program, GLsizei count, GLboolean transpose, const GLfloat* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniformMatrix4fv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glProgramUniformMatrix4fv"); gl_api_->glProgramUniformMatrix4fvFn(program, location, count, transpose, value); } @@ -9237,7 +9249,7 @@ void TraceGLApi::glProgramUniformMatrix4x2fvFn(GLuint program, GLboolean transpose, const GLfloat* value) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glProgramUniformMatrix4x2fv") + "TraceGLAPI::glProgramUniformMatrix4x2fv"); gl_api_->glProgramUniformMatrix4x2fvFn(program, location, count, transpose, value); } @@ -9248,7 +9260,7 @@ void TraceGLApi::glProgramUniformMatrix4x3fvFn(GLuint program, GLboolean transpose, const GLfloat* value) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glProgramUniformMatrix4x3fv") + "TraceGLAPI::glProgramUniformMatrix4x3fv"); gl_api_->glProgramUniformMatrix4x3fvFn(program, location, count, transpose, value); } @@ -9257,22 +9269,22 @@ void TraceGLApi::glPushDebugGroupFn(GLenum source, GLuint id, GLsizei length, const char* message) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPushDebugGroup") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPushDebugGroup"); gl_api_->glPushDebugGroupFn(source, id, length, message); } void TraceGLApi::glPushGroupMarkerEXTFn(GLsizei length, const char* marker) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPushGroupMarkerEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glPushGroupMarkerEXT"); gl_api_->glPushGroupMarkerEXTFn(length, marker); } void TraceGLApi::glQueryCounterFn(GLuint id, GLenum target) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glQueryCounter") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glQueryCounter"); gl_api_->glQueryCounterFn(id, target); } void TraceGLApi::glReadBufferFn(GLenum src) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glReadBuffer") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glReadBuffer"); gl_api_->glReadBufferFn(src); } @@ -9287,7 +9299,7 @@ void TraceGLApi::glReadnPixelsRobustANGLEFn(GLint x, GLsizei* columns, GLsizei* rows, void* data) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glReadnPixelsRobustANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glReadnPixelsRobustANGLE"); gl_api_->glReadnPixelsRobustANGLEFn(x, y, width, height, format, type, bufSize, length, columns, rows, data); } @@ -9299,7 +9311,7 @@ void TraceGLApi::glReadPixelsFn(GLint x, GLenum format, GLenum type, void* pixels) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glReadPixels") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glReadPixels"); gl_api_->glReadPixelsFn(x, y, width, height, format, type, pixels); } @@ -9314,13 +9326,13 @@ void TraceGLApi::glReadPixelsRobustANGLEFn(GLint x, GLsizei* columns, GLsizei* rows, void* pixels) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glReadPixelsRobustANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glReadPixelsRobustANGLE"); gl_api_->glReadPixelsRobustANGLEFn(x, y, width, height, format, type, bufSize, length, columns, rows, pixels); } void TraceGLApi::glReleaseShaderCompilerFn(void) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glReleaseShaderCompiler") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glReleaseShaderCompiler"); gl_api_->glReleaseShaderCompilerFn(); } @@ -9328,7 +9340,7 @@ void TraceGLApi::glRenderbufferStorageEXTFn(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glRenderbufferStorageEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glRenderbufferStorageEXT"); gl_api_->glRenderbufferStorageEXTFn(target, internalformat, width, height); } @@ -9338,7 +9350,7 @@ void TraceGLApi::glRenderbufferStorageMultisampleFn(GLenum target, GLsizei width, GLsizei height) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glRenderbufferStorageMultisample") + "TraceGLAPI::glRenderbufferStorageMultisample"); gl_api_->glRenderbufferStorageMultisampleFn(target, samples, internalformat, width, height); } @@ -9351,7 +9363,7 @@ void TraceGLApi::glRenderbufferStorageMultisampleAdvancedAMDFn( GLsizei width, GLsizei height) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceGLAPI::glRenderbufferStorageMultisampleAdvancedAMD") + "gpu", "TraceGLAPI::glRenderbufferStorageMultisampleAdvancedAMD"); gl_api_->glRenderbufferStorageMultisampleAdvancedAMDFn( target, samples, storageSamples, internalformat, width, height); } @@ -9362,42 +9374,42 @@ void TraceGLApi::glRenderbufferStorageMultisampleEXTFn(GLenum target, GLsizei width, GLsizei height) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceGLAPI::glRenderbufferStorageMultisampleEXT") + "gpu", "TraceGLAPI::glRenderbufferStorageMultisampleEXT"); gl_api_->glRenderbufferStorageMultisampleEXTFn(target, samples, internalformat, width, height); } void TraceGLApi::glRequestExtensionANGLEFn(const char* name) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glRequestExtensionANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glRequestExtensionANGLE"); gl_api_->glRequestExtensionANGLEFn(name); } void TraceGLApi::glResumeTransformFeedbackFn(void) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glResumeTransformFeedback") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glResumeTransformFeedback"); gl_api_->glResumeTransformFeedbackFn(); } void TraceGLApi::glSampleCoverageFn(GLclampf value, GLboolean invert) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glSampleCoverage") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glSampleCoverage"); gl_api_->glSampleCoverageFn(value, invert); } void TraceGLApi::glSampleMaskiFn(GLuint maskNumber, GLbitfield mask) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glSampleMaski") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glSampleMaski"); gl_api_->glSampleMaskiFn(maskNumber, mask); } void TraceGLApi::glSamplerParameterfFn(GLuint sampler, GLenum pname, GLfloat param) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glSamplerParameterf") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glSamplerParameterf"); gl_api_->glSamplerParameterfFn(sampler, pname, param); } void TraceGLApi::glSamplerParameterfvFn(GLuint sampler, GLenum pname, const GLfloat* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glSamplerParameterfv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glSamplerParameterfv"); gl_api_->glSamplerParameterfvFn(sampler, pname, params); } @@ -9406,14 +9418,14 @@ void TraceGLApi::glSamplerParameterfvRobustANGLEFn(GLuint sampler, GLsizei bufSize, const GLfloat* param) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glSamplerParameterfvRobustANGLE") + "TraceGLAPI::glSamplerParameterfvRobustANGLE"); gl_api_->glSamplerParameterfvRobustANGLEFn(sampler, pname, bufSize, param); } void TraceGLApi::glSamplerParameteriFn(GLuint sampler, GLenum pname, GLint param) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glSamplerParameteri") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glSamplerParameteri"); gl_api_->glSamplerParameteriFn(sampler, pname, param); } @@ -9422,7 +9434,7 @@ void TraceGLApi::glSamplerParameterIivRobustANGLEFn(GLuint sampler, GLsizei bufSize, const GLint* param) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glSamplerParameterIivRobustANGLE") + "TraceGLAPI::glSamplerParameterIivRobustANGLE"); gl_api_->glSamplerParameterIivRobustANGLEFn(sampler, pname, bufSize, param); } @@ -9430,15 +9442,15 @@ void TraceGLApi::glSamplerParameterIuivRobustANGLEFn(GLuint sampler, GLenum pname, GLsizei bufSize, const GLuint* param) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glSamplerParameterIuivRobustANGLE") + TRACE_EVENT_BINARY_EFFICIENT0( + "gpu", "TraceGLAPI::glSamplerParameterIuivRobustANGLE"); gl_api_->glSamplerParameterIuivRobustANGLEFn(sampler, pname, bufSize, param); } void TraceGLApi::glSamplerParameterivFn(GLuint sampler, GLenum pname, const GLint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glSamplerParameteriv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glSamplerParameteriv"); gl_api_->glSamplerParameterivFn(sampler, pname, params); } @@ -9447,22 +9459,22 @@ void TraceGLApi::glSamplerParameterivRobustANGLEFn(GLuint sampler, GLsizei bufSize, const GLint* param) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glSamplerParameterivRobustANGLE") + "TraceGLAPI::glSamplerParameterivRobustANGLE"); gl_api_->glSamplerParameterivRobustANGLEFn(sampler, pname, bufSize, param); } void TraceGLApi::glScissorFn(GLint x, GLint y, GLsizei width, GLsizei height) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glScissor") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glScissor"); gl_api_->glScissorFn(x, y, width, height); } void TraceGLApi::glSetFenceAPPLEFn(GLuint fence) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glSetFenceAPPLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glSetFenceAPPLE"); gl_api_->glSetFenceAPPLEFn(fence); } void TraceGLApi::glSetFenceNVFn(GLuint fence, GLenum condition) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glSetFenceNV") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glSetFenceNV"); gl_api_->glSetFenceNVFn(fence, condition); } @@ -9471,7 +9483,7 @@ void TraceGLApi::glShaderBinaryFn(GLsizei n, GLenum binaryformat, const void* binary, GLsizei length) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glShaderBinary") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glShaderBinary"); gl_api_->glShaderBinaryFn(n, shaders, binaryformat, binary, length); } @@ -9479,7 +9491,7 @@ void TraceGLApi::glShaderSourceFn(GLuint shader, GLsizei count, const char* const* str, const GLint* length) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glShaderSource") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glShaderSource"); gl_api_->glShaderSourceFn(shader, count, str, length); } @@ -9489,7 +9501,7 @@ void TraceGLApi::glSignalSemaphoreEXTFn(GLuint semaphore, GLuint numTextureBarriers, const GLuint* textures, const GLenum* dstLayouts) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glSignalSemaphoreEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glSignalSemaphoreEXT"); gl_api_->glSignalSemaphoreEXTFn(semaphore, numBufferBarriers, buffers, numTextureBarriers, textures, dstLayouts); } @@ -9499,7 +9511,7 @@ void TraceGLApi::glStartTilingQCOMFn(GLuint x, GLuint width, GLuint height, GLbitfield preserveMask) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glStartTilingQCOM") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glStartTilingQCOM"); gl_api_->glStartTilingQCOMFn(x, y, width, height, preserveMask); } @@ -9513,7 +9525,7 @@ void TraceGLApi::glStencilFillPathInstancedNVFn( GLenum transformType, const GLfloat* transformValues) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glStencilFillPathInstancedNV") + "TraceGLAPI::glStencilFillPathInstancedNV"); gl_api_->glStencilFillPathInstancedNVFn(numPaths, pathNameType, paths, pathBase, fillMode, mask, transformType, transformValues); @@ -9522,12 +9534,12 @@ void TraceGLApi::glStencilFillPathInstancedNVFn( void TraceGLApi::glStencilFillPathNVFn(GLuint path, GLenum fillMode, GLuint mask) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glStencilFillPathNV") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glStencilFillPathNV"); gl_api_->glStencilFillPathNVFn(path, fillMode, mask); } void TraceGLApi::glStencilFuncFn(GLenum func, GLint ref, GLuint mask) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glStencilFunc") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glStencilFunc"); gl_api_->glStencilFuncFn(func, ref, mask); } @@ -9535,22 +9547,22 @@ void TraceGLApi::glStencilFuncSeparateFn(GLenum face, GLenum func, GLint ref, GLuint mask) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glStencilFuncSeparate") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glStencilFuncSeparate"); gl_api_->glStencilFuncSeparateFn(face, func, ref, mask); } void TraceGLApi::glStencilMaskFn(GLuint mask) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glStencilMask") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glStencilMask"); gl_api_->glStencilMaskFn(mask); } void TraceGLApi::glStencilMaskSeparateFn(GLenum face, GLuint mask) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glStencilMaskSeparate") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glStencilMaskSeparate"); gl_api_->glStencilMaskSeparateFn(face, mask); } void TraceGLApi::glStencilOpFn(GLenum fail, GLenum zfail, GLenum zpass) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glStencilOp") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glStencilOp"); gl_api_->glStencilOpFn(fail, zfail, zpass); } @@ -9558,7 +9570,7 @@ void TraceGLApi::glStencilOpSeparateFn(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glStencilOpSeparate") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glStencilOpSeparate"); gl_api_->glStencilOpSeparateFn(face, fail, zfail, zpass); } @@ -9572,7 +9584,7 @@ void TraceGLApi::glStencilStrokePathInstancedNVFn( GLenum transformType, const GLfloat* transformValues) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glStencilStrokePathInstancedNV") + "TraceGLAPI::glStencilStrokePathInstancedNV"); gl_api_->glStencilStrokePathInstancedNVFn(numPaths, pathNameType, paths, pathBase, ref, mask, transformType, transformValues); @@ -9581,7 +9593,7 @@ void TraceGLApi::glStencilStrokePathInstancedNVFn( void TraceGLApi::glStencilStrokePathNVFn(GLuint path, GLint reference, GLuint mask) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glStencilStrokePathNV") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glStencilStrokePathNV"); gl_api_->glStencilStrokePathNVFn(path, reference, mask); } @@ -9596,7 +9608,7 @@ void TraceGLApi::glStencilThenCoverFillPathInstancedNVFn( GLenum transformType, const GLfloat* transformValues) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceGLAPI::glStencilThenCoverFillPathInstancedNV") + "gpu", "TraceGLAPI::glStencilThenCoverFillPathInstancedNV"); gl_api_->glStencilThenCoverFillPathInstancedNVFn( numPaths, pathNameType, paths, pathBase, fillMode, mask, coverMode, transformType, transformValues); @@ -9607,7 +9619,7 @@ void TraceGLApi::glStencilThenCoverFillPathNVFn(GLuint path, GLuint mask, GLenum coverMode) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glStencilThenCoverFillPathNV") + "TraceGLAPI::glStencilThenCoverFillPathNV"); gl_api_->glStencilThenCoverFillPathNVFn(path, fillMode, mask, coverMode); } @@ -9622,7 +9634,7 @@ void TraceGLApi::glStencilThenCoverStrokePathInstancedNVFn( GLenum transformType, const GLfloat* transformValues) { TRACE_EVENT_BINARY_EFFICIENT0( - "gpu", "TraceGLAPI::glStencilThenCoverStrokePathInstancedNV") + "gpu", "TraceGLAPI::glStencilThenCoverStrokePathInstancedNV"); gl_api_->glStencilThenCoverStrokePathInstancedNVFn( numPaths, pathNameType, paths, pathBase, ref, mask, coverMode, transformType, transformValues); @@ -9633,24 +9645,24 @@ void TraceGLApi::glStencilThenCoverStrokePathNVFn(GLuint path, GLuint mask, GLenum coverMode) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glStencilThenCoverStrokePathNV") + "TraceGLAPI::glStencilThenCoverStrokePathNV"); gl_api_->glStencilThenCoverStrokePathNVFn(path, reference, mask, coverMode); } GLboolean TraceGLApi::glTestFenceAPPLEFn(GLuint fence) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTestFenceAPPLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTestFenceAPPLE"); return gl_api_->glTestFenceAPPLEFn(fence); } GLboolean TraceGLApi::glTestFenceNVFn(GLuint fence) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTestFenceNV") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTestFenceNV"); return gl_api_->glTestFenceNVFn(fence); } void TraceGLApi::glTexBufferFn(GLenum target, GLenum internalformat, GLuint buffer) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexBuffer") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexBuffer"); gl_api_->glTexBufferFn(target, internalformat, buffer); } @@ -9659,7 +9671,7 @@ void TraceGLApi::glTexBufferRangeFn(GLenum target, GLuint buffer, GLintptr offset, GLsizeiptr size) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexBufferRange") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexBufferRange"); gl_api_->glTexBufferRangeFn(target, internalformat, buffer, offset, size); } @@ -9672,7 +9684,7 @@ void TraceGLApi::glTexImage2DFn(GLenum target, GLenum format, GLenum type, const void* pixels) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexImage2D") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexImage2D"); gl_api_->glTexImage2DFn(target, level, internalformat, width, height, border, format, type, pixels); } @@ -9685,7 +9697,7 @@ void TraceGLApi::glTexImage2DExternalANGLEFn(GLenum target, GLint border, GLenum format, GLenum type) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexImage2DExternalANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexImage2DExternalANGLE"); gl_api_->glTexImage2DExternalANGLEFn(target, level, internalformat, width, height, border, format, type); } @@ -9700,7 +9712,7 @@ void TraceGLApi::glTexImage2DRobustANGLEFn(GLenum target, GLenum type, GLsizei bufSize, const void* pixels) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexImage2DRobustANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexImage2DRobustANGLE"); gl_api_->glTexImage2DRobustANGLEFn(target, level, internalformat, width, height, border, format, type, bufSize, pixels); @@ -9716,7 +9728,7 @@ void TraceGLApi::glTexImage3DFn(GLenum target, GLenum format, GLenum type, const void* pixels) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexImage3D") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexImage3D"); gl_api_->glTexImage3DFn(target, level, internalformat, width, height, depth, border, format, type, pixels); } @@ -9732,21 +9744,21 @@ void TraceGLApi::glTexImage3DRobustANGLEFn(GLenum target, GLenum type, GLsizei bufSize, const void* pixels) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexImage3DRobustANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexImage3DRobustANGLE"); gl_api_->glTexImage3DRobustANGLEFn(target, level, internalformat, width, height, depth, border, format, type, bufSize, pixels); } void TraceGLApi::glTexParameterfFn(GLenum target, GLenum pname, GLfloat param) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexParameterf") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexParameterf"); gl_api_->glTexParameterfFn(target, pname, param); } void TraceGLApi::glTexParameterfvFn(GLenum target, GLenum pname, const GLfloat* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexParameterfv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexParameterfv"); gl_api_->glTexParameterfvFn(target, pname, params); } @@ -9755,12 +9767,12 @@ void TraceGLApi::glTexParameterfvRobustANGLEFn(GLenum target, GLsizei bufSize, const GLfloat* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glTexParameterfvRobustANGLE") + "TraceGLAPI::glTexParameterfvRobustANGLE"); gl_api_->glTexParameterfvRobustANGLEFn(target, pname, bufSize, params); } void TraceGLApi::glTexParameteriFn(GLenum target, GLenum pname, GLint param) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexParameteri") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexParameteri"); gl_api_->glTexParameteriFn(target, pname, param); } @@ -9769,7 +9781,7 @@ void TraceGLApi::glTexParameterIivRobustANGLEFn(GLenum target, GLsizei bufSize, const GLint* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glTexParameterIivRobustANGLE") + "TraceGLAPI::glTexParameterIivRobustANGLE"); gl_api_->glTexParameterIivRobustANGLEFn(target, pname, bufSize, params); } @@ -9778,14 +9790,14 @@ void TraceGLApi::glTexParameterIuivRobustANGLEFn(GLenum target, GLsizei bufSize, const GLuint* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glTexParameterIuivRobustANGLE") + "TraceGLAPI::glTexParameterIuivRobustANGLE"); gl_api_->glTexParameterIuivRobustANGLEFn(target, pname, bufSize, params); } void TraceGLApi::glTexParameterivFn(GLenum target, GLenum pname, const GLint* params) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexParameteriv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexParameteriv"); gl_api_->glTexParameterivFn(target, pname, params); } @@ -9794,7 +9806,7 @@ void TraceGLApi::glTexParameterivRobustANGLEFn(GLenum target, GLsizei bufSize, const GLint* params) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glTexParameterivRobustANGLE") + "TraceGLAPI::glTexParameterivRobustANGLE"); gl_api_->glTexParameterivRobustANGLEFn(target, pname, bufSize, params); } @@ -9803,7 +9815,7 @@ void TraceGLApi::glTexStorage2DEXTFn(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexStorage2DEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexStorage2DEXT"); gl_api_->glTexStorage2DEXTFn(target, levels, internalformat, width, height); } @@ -9813,7 +9825,7 @@ void TraceGLApi::glTexStorage2DMultisampleFn(GLenum target, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexStorage2DMultisample") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexStorage2DMultisample"); gl_api_->glTexStorage2DMultisampleFn(target, samples, internalformat, width, height, fixedsamplelocations); } @@ -9824,7 +9836,7 @@ void TraceGLApi::glTexStorage3DFn(GLenum target, GLsizei width, GLsizei height, GLsizei depth) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexStorage3D") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexStorage3D"); gl_api_->glTexStorage3DFn(target, levels, internalformat, width, height, depth); } @@ -9836,7 +9848,7 @@ void TraceGLApi::glTexStorageMem2DEXTFn(GLenum target, GLsizei height, GLuint memory, GLuint64 offset) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexStorageMem2DEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexStorageMem2DEXT"); gl_api_->glTexStorageMem2DEXTFn(target, levels, internalFormat, width, height, memory, offset); } @@ -9851,7 +9863,7 @@ void TraceGLApi::glTexStorageMemFlags2DANGLEFn(GLenum target, GLbitfield createFlags, GLbitfield usageFlags) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glTexStorageMemFlags2DANGLE") + "TraceGLAPI::glTexStorageMemFlags2DANGLE"); gl_api_->glTexStorageMemFlags2DANGLEFn(target, levels, internalFormat, width, height, memory, offset, createFlags, usageFlags); @@ -9866,7 +9878,7 @@ void TraceGLApi::glTexSubImage2DFn(GLenum target, GLenum format, GLenum type, const void* pixels) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexSubImage2D") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexSubImage2D"); gl_api_->glTexSubImage2DFn(target, level, xoffset, yoffset, width, height, format, type, pixels); } @@ -9881,7 +9893,8 @@ void TraceGLApi::glTexSubImage2DRobustANGLEFn(GLenum target, GLenum type, GLsizei bufSize, const void* pixels) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexSubImage2DRobustANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", + "TraceGLAPI::glTexSubImage2DRobustANGLE"); gl_api_->glTexSubImage2DRobustANGLEFn(target, level, xoffset, yoffset, width, height, format, type, bufSize, pixels); } @@ -9897,7 +9910,7 @@ void TraceGLApi::glTexSubImage3DFn(GLenum target, GLenum format, GLenum type, const void* pixels) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexSubImage3D") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexSubImage3D"); gl_api_->glTexSubImage3DFn(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); } @@ -9914,7 +9927,8 @@ void TraceGLApi::glTexSubImage3DRobustANGLEFn(GLenum target, GLenum type, GLsizei bufSize, const void* pixels) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glTexSubImage3DRobustANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", + "TraceGLAPI::glTexSubImage3DRobustANGLE"); gl_api_->glTexSubImage3DRobustANGLEFn(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, bufSize, pixels); @@ -9925,75 +9939,75 @@ void TraceGLApi::glTransformFeedbackVaryingsFn(GLuint program, const char* const* varyings, GLenum bufferMode) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLAPI::glTransformFeedbackVaryings") + "TraceGLAPI::glTransformFeedbackVaryings"); gl_api_->glTransformFeedbackVaryingsFn(program, count, varyings, bufferMode); } void TraceGLApi::glUniform1fFn(GLint location, GLfloat x) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform1f") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform1f"); gl_api_->glUniform1fFn(location, x); } void TraceGLApi::glUniform1fvFn(GLint location, GLsizei count, const GLfloat* v) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform1fv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform1fv"); gl_api_->glUniform1fvFn(location, count, v); } void TraceGLApi::glUniform1iFn(GLint location, GLint x) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform1i") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform1i"); gl_api_->glUniform1iFn(location, x); } void TraceGLApi::glUniform1ivFn(GLint location, GLsizei count, const GLint* v) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform1iv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform1iv"); gl_api_->glUniform1ivFn(location, count, v); } void TraceGLApi::glUniform1uiFn(GLint location, GLuint v0) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform1ui") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform1ui"); gl_api_->glUniform1uiFn(location, v0); } void TraceGLApi::glUniform1uivFn(GLint location, GLsizei count, const GLuint* v) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform1uiv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform1uiv"); gl_api_->glUniform1uivFn(location, count, v); } void TraceGLApi::glUniform2fFn(GLint location, GLfloat x, GLfloat y) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform2f") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform2f"); gl_api_->glUniform2fFn(location, x, y); } void TraceGLApi::glUniform2fvFn(GLint location, GLsizei count, const GLfloat* v) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform2fv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform2fv"); gl_api_->glUniform2fvFn(location, count, v); } void TraceGLApi::glUniform2iFn(GLint location, GLint x, GLint y) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform2i") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform2i"); gl_api_->glUniform2iFn(location, x, y); } void TraceGLApi::glUniform2ivFn(GLint location, GLsizei count, const GLint* v) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform2iv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform2iv"); gl_api_->glUniform2ivFn(location, count, v); } void TraceGLApi::glUniform2uiFn(GLint location, GLuint v0, GLuint v1) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform2ui") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform2ui"); gl_api_->glUniform2uiFn(location, v0, v1); } void TraceGLApi::glUniform2uivFn(GLint location, GLsizei count, const GLuint* v) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform2uiv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform2uiv"); gl_api_->glUniform2uivFn(location, count, v); } @@ -10001,24 +10015,24 @@ void TraceGLApi::glUniform3fFn(GLint location, GLfloat x, GLfloat y, GLfloat z) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform3f") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform3f"); gl_api_->glUniform3fFn(location, x, y, z); } void TraceGLApi::glUniform3fvFn(GLint location, GLsizei count, const GLfloat* v) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform3fv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform3fv"); gl_api_->glUniform3fvFn(location, count, v); } void TraceGLApi::glUniform3iFn(GLint location, GLint x, GLint y, GLint z) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform3i") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform3i"); gl_api_->glUniform3iFn(location, x, y, z); } void TraceGLApi::glUniform3ivFn(GLint location, GLsizei count, const GLint* v) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform3iv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform3iv"); gl_api_->glUniform3ivFn(location, count, v); } @@ -10026,14 +10040,14 @@ void TraceGLApi::glUniform3uiFn(GLint location, GLuint v0, GLuint v1, GLuint v2) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform3ui") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform3ui"); gl_api_->glUniform3uiFn(location, v0, v1, v2); } void TraceGLApi::glUniform3uivFn(GLint location, GLsizei count, const GLuint* v) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform3uiv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform3uiv"); gl_api_->glUniform3uivFn(location, count, v); } @@ -10042,14 +10056,14 @@ void TraceGLApi::glUniform4fFn(GLint location, GLfloat y, GLfloat z, GLfloat w) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform4f") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform4f"); gl_api_->glUniform4fFn(location, x, y, z, w); } void TraceGLApi::glUniform4fvFn(GLint location, GLsizei count, const GLfloat* v) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform4fv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform4fv"); gl_api_->glUniform4fvFn(location, count, v); } @@ -10058,12 +10072,12 @@ void TraceGLApi::glUniform4iFn(GLint location, GLint y, GLint z, GLint w) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform4i") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform4i"); gl_api_->glUniform4iFn(location, x, y, z, w); } void TraceGLApi::glUniform4ivFn(GLint location, GLsizei count, const GLint* v) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform4iv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform4iv"); gl_api_->glUniform4ivFn(location, count, v); } @@ -10072,21 +10086,21 @@ void TraceGLApi::glUniform4uiFn(GLint location, GLuint v1, GLuint v2, GLuint v3) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform4ui") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform4ui"); gl_api_->glUniform4uiFn(location, v0, v1, v2, v3); } void TraceGLApi::glUniform4uivFn(GLint location, GLsizei count, const GLuint* v) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform4uiv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniform4uiv"); gl_api_->glUniform4uivFn(location, count, v); } void TraceGLApi::glUniformBlockBindingFn(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniformBlockBinding") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniformBlockBinding"); gl_api_->glUniformBlockBindingFn(program, uniformBlockIndex, uniformBlockBinding); } @@ -10095,7 +10109,7 @@ void TraceGLApi::glUniformMatrix2fvFn(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniformMatrix2fv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniformMatrix2fv"); gl_api_->glUniformMatrix2fvFn(location, count, transpose, value); } @@ -10103,7 +10117,7 @@ void TraceGLApi::glUniformMatrix2x3fvFn(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniformMatrix2x3fv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniformMatrix2x3fv"); gl_api_->glUniformMatrix2x3fvFn(location, count, transpose, value); } @@ -10111,7 +10125,7 @@ void TraceGLApi::glUniformMatrix2x4fvFn(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniformMatrix2x4fv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniformMatrix2x4fv"); gl_api_->glUniformMatrix2x4fvFn(location, count, transpose, value); } @@ -10119,7 +10133,7 @@ void TraceGLApi::glUniformMatrix3fvFn(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniformMatrix3fv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniformMatrix3fv"); gl_api_->glUniformMatrix3fvFn(location, count, transpose, value); } @@ -10127,7 +10141,7 @@ void TraceGLApi::glUniformMatrix3x2fvFn(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniformMatrix3x2fv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniformMatrix3x2fv"); gl_api_->glUniformMatrix3x2fvFn(location, count, transpose, value); } @@ -10135,7 +10149,7 @@ void TraceGLApi::glUniformMatrix3x4fvFn(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniformMatrix3x4fv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniformMatrix3x4fv"); gl_api_->glUniformMatrix3x4fvFn(location, count, transpose, value); } @@ -10143,7 +10157,7 @@ void TraceGLApi::glUniformMatrix4fvFn(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniformMatrix4fv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniformMatrix4fv"); gl_api_->glUniformMatrix4fvFn(location, count, transpose, value); } @@ -10151,7 +10165,7 @@ void TraceGLApi::glUniformMatrix4x2fvFn(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniformMatrix4x2fv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniformMatrix4x2fv"); gl_api_->glUniformMatrix4x2fvFn(location, count, transpose, value); } @@ -10159,54 +10173,54 @@ void TraceGLApi::glUniformMatrix4x3fvFn(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniformMatrix4x3fv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUniformMatrix4x3fv"); gl_api_->glUniformMatrix4x3fvFn(location, count, transpose, value); } GLboolean TraceGLApi::glUnmapBufferFn(GLenum target) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUnmapBuffer") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUnmapBuffer"); return gl_api_->glUnmapBufferFn(target); } void TraceGLApi::glUseProgramFn(GLuint program) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUseProgram") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUseProgram"); gl_api_->glUseProgramFn(program); } void TraceGLApi::glUseProgramStagesFn(GLuint pipeline, GLbitfield stages, GLuint program) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUseProgramStages") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glUseProgramStages"); gl_api_->glUseProgramStagesFn(pipeline, stages, program); } void TraceGLApi::glValidateProgramFn(GLuint program) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glValidateProgram") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glValidateProgram"); gl_api_->glValidateProgramFn(program); } void TraceGLApi::glValidateProgramPipelineFn(GLuint pipeline) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glValidateProgramPipeline") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glValidateProgramPipeline"); gl_api_->glValidateProgramPipelineFn(pipeline); } void TraceGLApi::glVertexAttrib1fFn(GLuint indx, GLfloat x) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttrib1f") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttrib1f"); gl_api_->glVertexAttrib1fFn(indx, x); } void TraceGLApi::glVertexAttrib1fvFn(GLuint indx, const GLfloat* values) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttrib1fv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttrib1fv"); gl_api_->glVertexAttrib1fvFn(indx, values); } void TraceGLApi::glVertexAttrib2fFn(GLuint indx, GLfloat x, GLfloat y) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttrib2f") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttrib2f"); gl_api_->glVertexAttrib2fFn(indx, x, y); } void TraceGLApi::glVertexAttrib2fvFn(GLuint indx, const GLfloat* values) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttrib2fv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttrib2fv"); gl_api_->glVertexAttrib2fvFn(indx, values); } @@ -10214,12 +10228,12 @@ void TraceGLApi::glVertexAttrib3fFn(GLuint indx, GLfloat x, GLfloat y, GLfloat z) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttrib3f") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttrib3f"); gl_api_->glVertexAttrib3fFn(indx, x, y, z); } void TraceGLApi::glVertexAttrib3fvFn(GLuint indx, const GLfloat* values) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttrib3fv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttrib3fv"); gl_api_->glVertexAttrib3fvFn(indx, values); } @@ -10228,23 +10242,24 @@ void TraceGLApi::glVertexAttrib4fFn(GLuint indx, GLfloat y, GLfloat z, GLfloat w) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttrib4f") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttrib4f"); gl_api_->glVertexAttrib4fFn(indx, x, y, z, w); } void TraceGLApi::glVertexAttrib4fvFn(GLuint indx, const GLfloat* values) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttrib4fv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttrib4fv"); gl_api_->glVertexAttrib4fvFn(indx, values); } void TraceGLApi::glVertexAttribBindingFn(GLuint attribindex, GLuint bindingindex) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttribBinding") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttribBinding"); gl_api_->glVertexAttribBindingFn(attribindex, bindingindex); } void TraceGLApi::glVertexAttribDivisorANGLEFn(GLuint index, GLuint divisor) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttribDivisorANGLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", + "TraceGLAPI::glVertexAttribDivisorANGLE"); gl_api_->glVertexAttribDivisorANGLEFn(index, divisor); } @@ -10253,7 +10268,7 @@ void TraceGLApi::glVertexAttribFormatFn(GLuint attribindex, GLenum type, GLboolean normalized, GLuint relativeoffset) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttribFormat") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttribFormat"); gl_api_->glVertexAttribFormatFn(attribindex, size, type, normalized, relativeoffset); } @@ -10263,12 +10278,12 @@ void TraceGLApi::glVertexAttribI4iFn(GLuint indx, GLint y, GLint z, GLint w) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttribI4i") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttribI4i"); gl_api_->glVertexAttribI4iFn(indx, x, y, z, w); } void TraceGLApi::glVertexAttribI4ivFn(GLuint indx, const GLint* values) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttribI4iv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttribI4iv"); gl_api_->glVertexAttribI4ivFn(indx, values); } @@ -10277,12 +10292,12 @@ void TraceGLApi::glVertexAttribI4uiFn(GLuint indx, GLuint y, GLuint z, GLuint w) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttribI4ui") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttribI4ui"); gl_api_->glVertexAttribI4uiFn(indx, x, y, z, w); } void TraceGLApi::glVertexAttribI4uivFn(GLuint indx, const GLuint* values) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttribI4uiv") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttribI4uiv"); gl_api_->glVertexAttribI4uivFn(indx, values); } @@ -10290,7 +10305,7 @@ void TraceGLApi::glVertexAttribIFormatFn(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttribIFormat") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttribIFormat"); gl_api_->glVertexAttribIFormatFn(attribindex, size, type, relativeoffset); } @@ -10299,7 +10314,7 @@ void TraceGLApi::glVertexAttribIPointerFn(GLuint indx, GLenum type, GLsizei stride, const void* ptr) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttribIPointer") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttribIPointer"); gl_api_->glVertexAttribIPointerFn(indx, size, type, stride, ptr); } @@ -10309,17 +10324,17 @@ void TraceGLApi::glVertexAttribPointerFn(GLuint indx, GLboolean normalized, GLsizei stride, const void* ptr) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttribPointer") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexAttribPointer"); gl_api_->glVertexAttribPointerFn(indx, size, type, normalized, stride, ptr); } void TraceGLApi::glVertexBindingDivisorFn(GLuint bindingindex, GLuint divisor) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexBindingDivisor") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glVertexBindingDivisor"); gl_api_->glVertexBindingDivisorFn(bindingindex, divisor); } void TraceGLApi::glViewportFn(GLint x, GLint y, GLsizei width, GLsizei height) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glViewport") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glViewport"); gl_api_->glViewportFn(x, y, width, height); } @@ -10329,27 +10344,27 @@ void TraceGLApi::glWaitSemaphoreEXTFn(GLuint semaphore, GLuint numTextureBarriers, const GLuint* textures, const GLenum* srcLayouts) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glWaitSemaphoreEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glWaitSemaphoreEXT"); gl_api_->glWaitSemaphoreEXTFn(semaphore, numBufferBarriers, buffers, numTextureBarriers, textures, srcLayouts); } void TraceGLApi::glWaitSyncFn(GLsync sync, GLbitfield flags, GLuint64 timeout) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glWaitSync") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glWaitSync"); gl_api_->glWaitSyncFn(sync, flags, timeout); } void TraceGLApi::glWaitSyncAPPLEFn(GLsync sync, GLbitfield flags, GLuint64 timeout) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glWaitSyncAPPLE") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glWaitSyncAPPLE"); gl_api_->glWaitSyncAPPLEFn(sync, flags, timeout); } void TraceGLApi::glWindowRectanglesEXTFn(GLenum mode, GLsizei n, const GLint* box) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glWindowRectanglesEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glWindowRectanglesEXT"); gl_api_->glWindowRectanglesEXTFn(mode, n, box); } diff --git a/chromium/ui/gl/gl_bindings_autogen_glx.cc b/chromium/ui/gl/gl_bindings_autogen_glx.cc index 6b32e953673..22dbef76570 100644 --- a/chromium/ui/gl/gl_bindings_autogen_glx.cc +++ b/chromium/ui/gl/gl_bindings_autogen_glx.cc @@ -462,7 +462,7 @@ void TraceGLXApi::glXBindTexImageEXTFn(Display* dpy, GLXDrawable drawable, int buffer, int* attribList) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXBindTexImageEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXBindTexImageEXT"); glx_api_->glXBindTexImageEXTFn(dpy, drawable, buffer, attribList); } @@ -470,14 +470,14 @@ GLXFBConfig* TraceGLXApi::glXChooseFBConfigFn(Display* dpy, int screen, const int* attribList, int* nitems) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXChooseFBConfig") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXChooseFBConfig"); return glx_api_->glXChooseFBConfigFn(dpy, screen, attribList, nitems); } XVisualInfo* TraceGLXApi::glXChooseVisualFn(Display* dpy, int screen, int* attribList) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXChooseVisual") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXChooseVisual"); return glx_api_->glXChooseVisualFn(dpy, screen, attribList); } @@ -485,7 +485,7 @@ void TraceGLXApi::glXCopyContextFn(Display* dpy, GLXContext src, GLXContext dst, unsigned long mask) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXCopyContext") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXCopyContext"); glx_api_->glXCopyContextFn(dpy, src, dst, mask); } @@ -495,7 +495,7 @@ void TraceGLXApi::glXCopySubBufferMESAFn(Display* dpy, int y, int width, int height) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXCopySubBufferMESA") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXCopySubBufferMESA"); glx_api_->glXCopySubBufferMESAFn(dpy, drawable, x, y, width, height); } @@ -503,7 +503,7 @@ GLXContext TraceGLXApi::glXCreateContextFn(Display* dpy, XVisualInfo* vis, GLXContext shareList, int direct) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXCreateContext") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXCreateContext"); return glx_api_->glXCreateContextFn(dpy, vis, shareList, direct); } @@ -513,7 +513,7 @@ GLXContext TraceGLXApi::glXCreateContextAttribsARBFn(Display* dpy, int direct, const int* attrib_list) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLXAPI::glXCreateContextAttribsARB") + "TraceGLXAPI::glXCreateContextAttribsARB"); return glx_api_->glXCreateContextAttribsARBFn(dpy, config, share_context, direct, attrib_list); } @@ -521,7 +521,7 @@ GLXContext TraceGLXApi::glXCreateContextAttribsARBFn(Display* dpy, GLXPixmap TraceGLXApi::glXCreateGLXPixmapFn(Display* dpy, XVisualInfo* visual, Pixmap pixmap) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXCreateGLXPixmap") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXCreateGLXPixmap"); return glx_api_->glXCreateGLXPixmapFn(dpy, visual, pixmap); } @@ -530,7 +530,7 @@ GLXContext TraceGLXApi::glXCreateNewContextFn(Display* dpy, int renderType, GLXContext shareList, int direct) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXCreateNewContext") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXCreateNewContext"); return glx_api_->glXCreateNewContextFn(dpy, config, renderType, shareList, direct); } @@ -538,7 +538,7 @@ GLXContext TraceGLXApi::glXCreateNewContextFn(Display* dpy, GLXPbuffer TraceGLXApi::glXCreatePbufferFn(Display* dpy, GLXFBConfig config, const int* attribList) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXCreatePbuffer") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXCreatePbuffer"); return glx_api_->glXCreatePbufferFn(dpy, config, attribList); } @@ -546,7 +546,7 @@ GLXPixmap TraceGLXApi::glXCreatePixmapFn(Display* dpy, GLXFBConfig config, Pixmap pixmap, const int* attribList) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXCreatePixmap") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXCreatePixmap"); return glx_api_->glXCreatePixmapFn(dpy, config, pixmap, attribList); } @@ -554,37 +554,37 @@ GLXWindow TraceGLXApi::glXCreateWindowFn(Display* dpy, GLXFBConfig config, Window win, const int* attribList) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXCreateWindow") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXCreateWindow"); return glx_api_->glXCreateWindowFn(dpy, config, win, attribList); } void TraceGLXApi::glXDestroyContextFn(Display* dpy, GLXContext ctx) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXDestroyContext") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXDestroyContext"); glx_api_->glXDestroyContextFn(dpy, ctx); } void TraceGLXApi::glXDestroyGLXPixmapFn(Display* dpy, GLXPixmap pixmap) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXDestroyGLXPixmap") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXDestroyGLXPixmap"); glx_api_->glXDestroyGLXPixmapFn(dpy, pixmap); } void TraceGLXApi::glXDestroyPbufferFn(Display* dpy, GLXPbuffer pbuf) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXDestroyPbuffer") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXDestroyPbuffer"); glx_api_->glXDestroyPbufferFn(dpy, pbuf); } void TraceGLXApi::glXDestroyPixmapFn(Display* dpy, GLXPixmap pixmap) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXDestroyPixmap") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXDestroyPixmap"); glx_api_->glXDestroyPixmapFn(dpy, pixmap); } void TraceGLXApi::glXDestroyWindowFn(Display* dpy, GLXWindow window) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXDestroyWindow") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXDestroyWindow"); glx_api_->glXDestroyWindowFn(dpy, window); } const char* TraceGLXApi::glXGetClientStringFn(Display* dpy, int name) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetClientString") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetClientString"); return glx_api_->glXGetClientStringFn(dpy, name); } @@ -592,27 +592,28 @@ int TraceGLXApi::glXGetConfigFn(Display* dpy, XVisualInfo* visual, int attrib, int* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetConfig") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetConfig"); return glx_api_->glXGetConfigFn(dpy, visual, attrib, value); } GLXContext TraceGLXApi::glXGetCurrentContextFn(void) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetCurrentContext") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetCurrentContext"); return glx_api_->glXGetCurrentContextFn(); } Display* TraceGLXApi::glXGetCurrentDisplayFn(void) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetCurrentDisplay") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetCurrentDisplay"); return glx_api_->glXGetCurrentDisplayFn(); } GLXDrawable TraceGLXApi::glXGetCurrentDrawableFn(void) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetCurrentDrawable") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetCurrentDrawable"); return glx_api_->glXGetCurrentDrawableFn(); } GLXDrawable TraceGLXApi::glXGetCurrentReadDrawableFn(void) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetCurrentReadDrawable") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", + "TraceGLXAPI::glXGetCurrentReadDrawable"); return glx_api_->glXGetCurrentReadDrawableFn(); } @@ -620,7 +621,7 @@ int TraceGLXApi::glXGetFBConfigAttribFn(Display* dpy, GLXFBConfig config, int attribute, int* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetFBConfigAttrib") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetFBConfigAttrib"); return glx_api_->glXGetFBConfigAttribFn(dpy, config, attribute, value); } @@ -628,14 +629,14 @@ GLXFBConfig TraceGLXApi::glXGetFBConfigFromVisualSGIXFn( Display* dpy, XVisualInfo* visualInfo) { TRACE_EVENT_BINARY_EFFICIENT0("gpu", - "TraceGLXAPI::glXGetFBConfigFromVisualSGIX") + "TraceGLXAPI::glXGetFBConfigFromVisualSGIX"); return glx_api_->glXGetFBConfigFromVisualSGIXFn(dpy, visualInfo); } GLXFBConfig* TraceGLXApi::glXGetFBConfigsFn(Display* dpy, int screen, int* nelements) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetFBConfigs") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetFBConfigs"); return glx_api_->glXGetFBConfigsFn(dpy, screen, nelements); } @@ -643,14 +644,14 @@ bool TraceGLXApi::glXGetMscRateOMLFn(Display* dpy, GLXDrawable drawable, int32_t* numerator, int32_t* denominator) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetMscRateOML") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetMscRateOML"); return glx_api_->glXGetMscRateOMLFn(dpy, drawable, numerator, denominator); } void TraceGLXApi::glXGetSelectedEventFn(Display* dpy, GLXDrawable drawable, unsigned long* mask) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetSelectedEvent") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetSelectedEvent"); glx_api_->glXGetSelectedEventFn(dpy, drawable, mask); } @@ -659,18 +660,18 @@ bool TraceGLXApi::glXGetSyncValuesOMLFn(Display* dpy, int64_t* ust, int64_t* msc, int64_t* sbc) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetSyncValuesOML") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetSyncValuesOML"); return glx_api_->glXGetSyncValuesOMLFn(dpy, drawable, ust, msc, sbc); } XVisualInfo* TraceGLXApi::glXGetVisualFromFBConfigFn(Display* dpy, GLXFBConfig config) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetVisualFromFBConfig") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetVisualFromFBConfig"); return glx_api_->glXGetVisualFromFBConfigFn(dpy, config); } int TraceGLXApi::glXIsDirectFn(Display* dpy, GLXContext ctx) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXIsDirect") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXIsDirect"); return glx_api_->glXIsDirectFn(dpy, ctx); } @@ -678,14 +679,14 @@ int TraceGLXApi::glXMakeContextCurrentFn(Display* dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXMakeContextCurrent") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXMakeContextCurrent"); return glx_api_->glXMakeContextCurrentFn(dpy, draw, read, ctx); } int TraceGLXApi::glXMakeCurrentFn(Display* dpy, GLXDrawable drawable, GLXContext ctx) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXMakeCurrent") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXMakeCurrent"); return glx_api_->glXMakeCurrentFn(dpy, drawable, ctx); } @@ -693,7 +694,7 @@ int TraceGLXApi::glXQueryContextFn(Display* dpy, GLXContext ctx, int attribute, int* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXQueryContext") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXQueryContext"); return glx_api_->glXQueryContextFn(dpy, ctx, attribute, value); } @@ -701,82 +702,82 @@ void TraceGLXApi::glXQueryDrawableFn(Display* dpy, GLXDrawable draw, int attribute, unsigned int* value) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXQueryDrawable") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXQueryDrawable"); glx_api_->glXQueryDrawableFn(dpy, draw, attribute, value); } int TraceGLXApi::glXQueryExtensionFn(Display* dpy, int* errorb, int* event) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXQueryExtension") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXQueryExtension"); return glx_api_->glXQueryExtensionFn(dpy, errorb, event); } const char* TraceGLXApi::glXQueryExtensionsStringFn(Display* dpy, int screen) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXQueryExtensionsString") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXQueryExtensionsString"); return glx_api_->glXQueryExtensionsStringFn(dpy, screen); } const char* TraceGLXApi::glXQueryServerStringFn(Display* dpy, int screen, int name) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXQueryServerString") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXQueryServerString"); return glx_api_->glXQueryServerStringFn(dpy, screen, name); } int TraceGLXApi::glXQueryVersionFn(Display* dpy, int* maj, int* min) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXQueryVersion") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXQueryVersion"); return glx_api_->glXQueryVersionFn(dpy, maj, min); } void TraceGLXApi::glXReleaseTexImageEXTFn(Display* dpy, GLXDrawable drawable, int buffer) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXReleaseTexImageEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXReleaseTexImageEXT"); glx_api_->glXReleaseTexImageEXTFn(dpy, drawable, buffer); } void TraceGLXApi::glXSelectEventFn(Display* dpy, GLXDrawable drawable, unsigned long mask) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXSelectEvent") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXSelectEvent"); glx_api_->glXSelectEventFn(dpy, drawable, mask); } void TraceGLXApi::glXSwapBuffersFn(Display* dpy, GLXDrawable drawable) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXSwapBuffers") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXSwapBuffers"); glx_api_->glXSwapBuffersFn(dpy, drawable); } void TraceGLXApi::glXSwapIntervalEXTFn(Display* dpy, GLXDrawable drawable, int interval) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXSwapIntervalEXT") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXSwapIntervalEXT"); glx_api_->glXSwapIntervalEXTFn(dpy, drawable, interval); } void TraceGLXApi::glXSwapIntervalMESAFn(unsigned int interval) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXSwapIntervalMESA") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXSwapIntervalMESA"); glx_api_->glXSwapIntervalMESAFn(interval); } void TraceGLXApi::glXUseXFontFn(Font font, int first, int count, int list) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXUseXFont") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXUseXFont"); glx_api_->glXUseXFontFn(font, first, count, list); } void TraceGLXApi::glXWaitGLFn(void) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXWaitGL") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXWaitGL"); glx_api_->glXWaitGLFn(); } int TraceGLXApi::glXWaitVideoSyncSGIFn(int divisor, int remainder, unsigned int* count) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXWaitVideoSyncSGI") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXWaitVideoSyncSGI"); return glx_api_->glXWaitVideoSyncSGIFn(divisor, remainder, count); } void TraceGLXApi::glXWaitXFn(void) { - TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXWaitX") + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXWaitX"); glx_api_->glXWaitXFn(); } diff --git a/chromium/ui/gl/gl_context.cc b/chromium/ui/gl/gl_context.cc index 59091708368..cc8adf06ab2 100644 --- a/chromium/ui/gl/gl_context.cc +++ b/chromium/ui/gl/gl_context.cc @@ -281,17 +281,10 @@ void GLContext::DestroyBackpressureFences() { void GLContext::FlushForDriverCrashWorkaround() { // If running on Apple silicon, regardless of the architecture, disable this - // workaround. - // https://crbug.com/1131312 - switch (base::mac::GetCPUType()) { - case base::mac::CPUType::kArm: - case base::mac::CPUType::kTranslatedIntel: - return; - default: - break; - } - - if (!IsCurrent(nullptr)) + // workaround. See https://crbug.com/1131312. + static const bool needs_flush = + base::mac::GetCPUType() == base::mac::CPUType::kIntel; + if (!needs_flush || !IsCurrent(nullptr)) return; TRACE_EVENT0("gpu", "GLContext::FlushForDriverCrashWorkaround"); glFlush(); diff --git a/chromium/ui/gl/gl_context.h b/chromium/ui/gl/gl_context.h index 47c9403aec3..09c57f3e612 100644 --- a/chromium/ui/gl/gl_context.h +++ b/chromium/ui/gl/gl_context.h @@ -95,6 +95,16 @@ struct GL_EXPORT GLContextAttribs { // (True by default to match previous behavior.) bool lose_context_on_reset = true; + // If true, EGL_ANGLE_external_context_and_surface extension will be used to + // create ANGLE context from the current native EGL context. + bool angle_create_from_external_context = false; + + // If true, an ANGLE external context will be created with + // EGL_EXTERNAL_CONTEXT_SAVE_STATE_ANGLE is true, so when ReleaseCurrent is + // called, ANGLE will restore the GL state of the native EGL context to the + // state when MakeCurrent was previously called. + bool angle_restore_external_context_state = false; + ContextPriority context_priority = ContextPriorityMedium; }; diff --git a/chromium/ui/gl/gl_context_egl.cc b/chromium/ui/gl/gl_context_egl.cc index b5219ca17e0..a6870ee21c2 100644 --- a/chromium/ui/gl/gl_context_egl.cc +++ b/chromium/ui/gl/gl_context_egl.cc @@ -40,6 +40,13 @@ #define EGL_DISPLAY_SEMAPHORE_SHARE_GROUP_ANGLE 0x348D #endif /* EGL_ANGLE_display_semaphore_share_group */ +#ifndef EGL_ANGLE_external_context_and_surface +#define EGL_ANGLE_external_context_and_surface 1 +#define EGL_EXTERNAL_CONTEXT_ANGLE 0x348E +#define EGL_EXTERNAL_SURFACE_ANGLE 0x348F +#define EGL_EXTERNAL_CONTEXT_SAVE_STATE_ANGLE 0x3490 +#endif /* EGL_ANGLE_external_context_and_surface */ + #ifndef EGL_ANGLE_create_context_client_arrays #define EGL_ANGLE_create_context_client_arrays 1 #define EGL_CONTEXT_CLIENT_ARRAYS_ENABLED_ANGLE 0x3452 @@ -247,6 +254,17 @@ bool GLContextEGL::Initialize(GLSurface* compatible_surface, } } + if (GLSurfaceEGL::IsANGLEExternalContextAndSurfaceSupported()) { + if (attribs.angle_create_from_external_context) { + context_attributes.push_back(EGL_EXTERNAL_CONTEXT_ANGLE); + context_attributes.push_back(EGL_TRUE); + } + if (attribs.angle_restore_external_context_state) { + context_attributes.push_back(EGL_EXTERNAL_CONTEXT_SAVE_STATE_ANGLE); + context_attributes.push_back(EGL_TRUE); + } + } + // Append final EGL_NONE to signal the context attributes are finished context_attributes.push_back(EGL_NONE); context_attributes.push_back(EGL_NONE); @@ -365,9 +383,9 @@ bool GLContextEGL::MakeCurrentImpl(GLSurface* surface) { return true; ScopedReleaseCurrent release_current; - TRACE_EVENT2("gpu", "GLContextEGL::MakeCurrent", - "context", context_, - "surface", surface); + TRACE_EVENT2("gpu", "GLContextEGL::MakeCurrent", "context", + static_cast<void*>(context_), "surface", + static_cast<void*>(surface)); if (unbind_fbo_on_makecurrent_ && GetCurrent()) { glBindFramebufferEXT(GL_FRAMEBUFFER, 0); diff --git a/chromium/ui/gl/gl_context_glx_unittest.cc b/chromium/ui/gl/gl_context_glx_unittest.cc index c3bb1bb4ec9..85bcb6446f1 100644 --- a/chromium/ui/gl/gl_context_glx_unittest.cc +++ b/chromium/ui/gl/gl_context_glx_unittest.cc @@ -7,6 +7,7 @@ #include "base/memory/scoped_refptr.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/gfx/x/connection.h" +#include "ui/gfx/x/future.h" #include "ui/gfx/x/xproto.h" #include "ui/gl/gl_bindings.h" #include "ui/gl/gl_surface_glx_x11.h" diff --git a/chromium/ui/gl/gl_features.cc b/chromium/ui/gl/gl_features.cc index 56ef4a3aa74..c71e70c3d9d 100644 --- a/chromium/ui/gl/gl_features.cc +++ b/chromium/ui/gl/gl_features.cc @@ -4,7 +4,17 @@ #include "ui/gl/gl_features.h" +#include "base/command_line.h" +#include "base/feature_list.h" +#include "build/chromeos_buildflags.h" +#include "ui/gl/gl_switches.h" + namespace features { +namespace { + +const base::Feature kGpuVsync{"GpuVsync", base::FEATURE_ENABLED_BY_DEFAULT}; + +} // namespace // Use the passthrough command decoder by default. This can be overridden with // the --use-cmd-decoder=passthrough or --use-cmd-decoder=validating flags. @@ -13,12 +23,19 @@ namespace features { // Launched on Windows, still experimental on other platforms. const base::Feature kDefaultPassthroughCommandDecoder{ "DefaultPassthroughCommandDecoder", -#if defined(OS_WIN) || \ - (defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(CHROMECAST_BUILD)) +#if defined(OS_WIN) || \ + ((defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \ + !defined(CHROMECAST_BUILD)) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT #endif }; +bool UseGpuVsync() { + return !base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableGpuVsync) && + base::FeatureList::IsEnabled(kGpuVsync); +} + } // namespace features diff --git a/chromium/ui/gl/gl_features.h b/chromium/ui/gl/gl_features.h index 3513df18ca1..e84a953c2c0 100644 --- a/chromium/ui/gl/gl_features.h +++ b/chromium/ui/gl/gl_features.h @@ -11,6 +11,9 @@ namespace features { +// Controls if GPU should synchronize presentation with vsync. +GL_EXPORT bool UseGpuVsync(); + // All features in alphabetical order. The features should be documented // alongside the definition of their values in the .cc file. GL_EXPORT extern const base::Feature kDefaultPassthroughCommandDecoder; diff --git a/chromium/ui/gl/gl_gl_api_implementation.cc b/chromium/ui/gl/gl_gl_api_implementation.cc index 2815f8e3f24..c172e834e90 100644 --- a/chromium/ui/gl/gl_gl_api_implementation.cc +++ b/chromium/ui/gl/gl_gl_api_implementation.cc @@ -6,7 +6,7 @@ #include <vector> -#include "base/stl_util.h" +#include "base/containers/contains.h" #include "base/strings/string_split.h" #include "base/strings/string_util.h" #include "ui/gl/gl_context.h" diff --git a/chromium/ui/gl/gl_glx_api_implementation.cc b/chromium/ui/gl/gl_glx_api_implementation.cc index 4881a3e2c2d..5c6ebe311d6 100644 --- a/chromium/ui/gl/gl_glx_api_implementation.cc +++ b/chromium/ui/gl/gl_glx_api_implementation.cc @@ -8,6 +8,7 @@ #include "base/strings/string_split.h" #include "base/strings/string_util.h" #include "ui/gfx/x/connection.h" +#include "ui/gfx/x/future.h" #include "ui/gl/gl_context.h" #include "ui/gl/gl_implementation.h" #include "ui/gl/gl_implementation_wrapper.h" @@ -127,11 +128,11 @@ bool GetGLWindowSystemBindingInfoGLX(const GLVersionInfo& gl_info, base::StringToUint(split_version[0], &major_num); // Mesa after version 17 will reliably use DRI3 when available. - if (major_num >= 17 && connection->QueryExtension({"DRI3"}).Sync()) + if (major_num >= 17 && connection->QueryExtension("DRI3").Sync()) info->direct_rendering_version = "2.3"; - else if (connection->QueryExtension({"DRI2"}).Sync()) + else if (connection->QueryExtension("DRI2").Sync()) info->direct_rendering_version = "2.2"; - else if (connection->QueryExtension({"DRI"}).Sync()) + else if (connection->QueryExtension("DRI").Sync()) info->direct_rendering_version = "2.1"; } } else { diff --git a/chromium/ui/gl/gl_image.cc b/chromium/ui/gl/gl_image.cc index 768a48f66a6..2ff44864041 100644 --- a/chromium/ui/gl/gl_image.cc +++ b/chromium/ui/gl/gl_image.cc @@ -29,7 +29,9 @@ unsigned GLImage::GetDataFormat() { unsigned internalformat = GetInternalFormat(); switch (internalformat) { case GL_R16_EXT: - return GL_RED; + return GL_RED_EXT; + case GL_RG16_EXT: + return GL_RG_EXT; case GL_RGB10_A2_EXT: return GL_RGBA; case GL_RGB_YCRCB_420_CHROMIUM: diff --git a/chromium/ui/gl/gl_image_egl.cc b/chromium/ui/gl/gl_image_egl.cc index 1dad98992b0..930d35e7bca 100644 --- a/chromium/ui/gl/gl_image_egl.cc +++ b/chromium/ui/gl/gl_image_egl.cc @@ -5,6 +5,7 @@ #include "ui/gl/gl_image_egl.h" #include "ui/gl/egl_util.h" +#include "ui/gl/gl_bindings.h" #include "ui/gl/gl_enums.h" #include "ui/gl/gl_surface_egl.h" diff --git a/chromium/ui/gl/gl_image_glx_native_pixmap.cc b/chromium/ui/gl/gl_image_glx_native_pixmap.cc index 1250ab0eee0..a8b261479f9 100644 --- a/chromium/ui/gl/gl_image_glx_native_pixmap.cc +++ b/chromium/ui/gl/gl_image_glx_native_pixmap.cc @@ -9,6 +9,7 @@ #include "ui/gfx/linux/native_pixmap_dmabuf.h" #include "ui/gfx/x/connection.h" #include "ui/gfx/x/dri3.h" +#include "ui/gfx/x/future.h" #include "ui/gfx/x/xproto_types.h" #include "ui/gl/buffer_format_utils.h" #include "ui/gl/gl_bindings.h" @@ -55,16 +56,16 @@ x11::Pixmap XPixmapFromNativePixmap( auto fd = HANDLE_EINTR(dup(native_pixmap.GetDmaBufFd(0))); if (fd < 0) return x11::Pixmap::None; - base::ScopedFD scoped_fd(fd); + x11::RefCountedFD ref_counted_fd(fd); auto* connection = x11::Connection::Get(); x11::Pixmap pixmap_id = connection->GenerateId<x11::Pixmap>(); - connection->dri3().PixmapFromBuffer({pixmap_id, connection->default_root(), - native_pixmap.GetDmaBufPlaneSize(0), - native_pixmap.GetBufferSize().width(), - native_pixmap.GetBufferSize().height(), - native_pixmap.GetDmaBufPitch(0), depth, - bpp, std::move(scoped_fd)}); + connection->dri3().PixmapFromBuffer(pixmap_id, connection->default_root(), + native_pixmap.GetDmaBufPlaneSize(0), + native_pixmap.GetBufferSize().width(), + native_pixmap.GetBufferSize().height(), + native_pixmap.GetDmaBufPitch(0), depth, + bpp, ref_counted_fd); return pixmap_id; } diff --git a/chromium/ui/gl/gl_image_io_surface.h b/chromium/ui/gl/gl_image_io_surface.h index e78cb1a066e..2c765ca2958 100644 --- a/chromium/ui/gl/gl_image_io_surface.h +++ b/chromium/ui/gl/gl_image_io_surface.h @@ -81,6 +81,10 @@ class GL_EXPORT GLImageIOSurface : public GLImage { // RGB transformation. void SetColorSpaceForYUVToRGBConversion(const gfx::ColorSpace& color_space); + // Sets the color space of the GLImage without modifying the underlying + // IOSurface. Callers should ensure the color spaces match. + void SetColorSpaceShallow(const gfx::ColorSpace& color_space); + static unsigned GetInternalFormatForTesting(gfx::BufferFormat format); // Downcasts from |image|. Returns |nullptr| on failure. diff --git a/chromium/ui/gl/gl_image_io_surface.mm b/chromium/ui/gl/gl_image_io_surface.mm index 94b1fcdc26c..697d6e26127 100644 --- a/chromium/ui/gl/gl_image_io_surface.mm +++ b/chromium/ui/gl/gl_image_io_surface.mm @@ -457,6 +457,11 @@ void GLImageIOSurface::SetColorSpaceForYUVToRGBConversion( color_space_for_yuv_to_rgb_ = color_space; } +void GLImageIOSurface::SetColorSpaceShallow( + const gfx::ColorSpace& color_space) { + GLImage::SetColorSpace(color_space); +} + base::ScopedCFTypeRef<IOSurfaceRef> GLImageIOSurface::io_surface() { return io_surface_; } diff --git a/chromium/ui/gl/gl_image_io_surface_egl.mm b/chromium/ui/gl/gl_image_io_surface_egl.mm index 4ecaffb91c1..82222eeb9c9 100644 --- a/chromium/ui/gl/gl_image_io_surface_egl.mm +++ b/chromium/ui/gl/gl_image_io_surface_egl.mm @@ -6,6 +6,7 @@ #include "base/bind.h" #include "base/callback_helpers.h" +#include "ui/gl/gl_bindings.h" #include "ui/gl/gl_context.h" #include "ui/gl/gl_surface_egl.h" #include "ui/gl/scoped_binders.h" diff --git a/chromium/ui/gl/gl_image_native_pixmap.cc b/chromium/ui/gl/gl_image_native_pixmap.cc index bf785d00993..c768647099f 100644 --- a/chromium/ui/gl/gl_image_native_pixmap.cc +++ b/chromium/ui/gl/gl_image_native_pixmap.cc @@ -13,6 +13,7 @@ #include "ui/gfx/gpu_fence.h" #include "ui/gl/buffer_format_utils.h" #include "ui/gl/egl_util.h" +#include "ui/gl/gl_bindings.h" #include "ui/gl/gl_context.h" #include "ui/gl/gl_enums.h" #include "ui/gl/gl_surface_egl.h" diff --git a/chromium/ui/gl/gl_implementation.cc b/chromium/ui/gl/gl_implementation.cc index 433cbe8d9d9..763c1cc11c1 100644 --- a/chromium/ui/gl/gl_implementation.cc +++ b/chromium/ui/gl/gl_implementation.cc @@ -11,6 +11,7 @@ #include "base/at_exit.h" #include "base/command_line.h" #include "base/compiler_specific.h" +#include "base/containers/contains.h" #include "base/logging.h" #include "base/stl_util.h" #include "base/strings/string_piece.h" @@ -265,8 +266,10 @@ bool WillUseGLGetStringForExtensions() { bool WillUseGLGetStringForExtensions(GLApi* api) { const char* version_str = reinterpret_cast<const char*>(api->glGetStringFn(GL_VERSION)); + const char* renderer_str = + reinterpret_cast<const char*>(api->glGetStringFn(GL_RENDERER)); gfx::ExtensionSet extensions; - GLVersionInfo version_info(version_str, nullptr, extensions); + GLVersionInfo version_info(version_str, renderer_str, extensions); return version_info.is_es || version_info.major_version < 3; } @@ -286,4 +289,10 @@ base::NativeLibrary LoadLibraryAndPrintError(const base::FilePath& filename) { return library; } +#if BUILDFLAG(USE_OPENGL_APITRACE) +void TerminateFrame() { + GetGLProcAddress("glFrameTerminatorGREMEDY")(); +} +#endif + } // namespace gl diff --git a/chromium/ui/gl/gl_implementation.h b/chromium/ui/gl/gl_implementation.h index ffe19f448d4..c6cefe206be 100644 --- a/chromium/ui/gl/gl_implementation.h +++ b/chromium/ui/gl/gl_implementation.h @@ -13,6 +13,7 @@ #include "base/native_library.h" #include "build/build_config.h" #include "ui/gfx/extension_set.h" +#include "ui/gl/buildflags.h" #include "ui/gl/gl_export.h" #include "ui/gl/gl_switches.h" @@ -161,6 +162,11 @@ GL_EXPORT base::NativeLibrary LoadLibraryAndPrintError( GL_EXPORT base::NativeLibrary LoadLibraryAndPrintError( const base::FilePath& filename); +#if BUILDFLAG(USE_OPENGL_APITRACE) +// Notify end of frame at buffer swap request. +GL_EXPORT void TerminateFrame(); +#endif + } // namespace gl #endif // UI_GL_GL_IMPLEMENTATION_H_ diff --git a/chromium/ui/gl/gl_surface.cc b/chromium/ui/gl/gl_surface.cc index 8284db4f327..9d304c947d5 100644 --- a/chromium/ui/gl/gl_surface.cc +++ b/chromium/ui/gl/gl_surface.cc @@ -197,6 +197,10 @@ bool GLSurface::SupportsProtectedVideo() const { return false; } +bool GLSurface::SupportsOverridePlatformSize() const { + return false; +} + bool GLSurface::SetDrawRectangle(const gfx::Rect& rect) { return false; } @@ -241,6 +245,10 @@ bool GLSurface::SupportsGpuVSync() const { return false; } +bool GLSurface::SupportsDelegatedInk() { + return false; +} + void GLSurface::SetGpuVSyncEnabled(bool enabled) {} GLSurface* GLSurface::GetCurrent() { @@ -465,6 +473,10 @@ bool GLSurfaceAdapter::SupportsProtectedVideo() const { return surface_->SupportsProtectedVideo(); } +bool GLSurfaceAdapter::SupportsOverridePlatformSize() const { + return surface_->SupportsOverridePlatformSize(); +} + bool GLSurfaceAdapter::SetDrawRectangle(const gfx::Rect& rect) { return surface_->SetDrawRectangle(rect); } @@ -521,6 +533,10 @@ bool GLSurfaceAdapter::IsCurrent() { return surface_->IsCurrent(); } +bool GLSurfaceAdapter::SupportsDelegatedInk() { + return surface_->SupportsDelegatedInk(); +} + GLSurfaceAdapter::~GLSurfaceAdapter() {} scoped_refptr<GLSurface> InitializeGLSurfaceWithFormat( diff --git a/chromium/ui/gl/gl_surface.h b/chromium/ui/gl/gl_surface.h index 44ad2952959..6fc339049f5 100644 --- a/chromium/ui/gl/gl_surface.h +++ b/chromium/ui/gl/gl_surface.h @@ -107,6 +107,10 @@ class GL_EXPORT GLSurface : public base::RefCounted<GLSurface>, // Get the underlying platform specific surface "handle". virtual void* GetHandle() = 0; + // Android SurfaceControl specific, notifies that we should not detach child + // surface controls during destruction. + virtual void PreserveChildSurfaceControls() {} + // Returns whether or not the surface supports SwapBuffersWithBounds virtual bool SupportsSwapBuffersWithBounds(); @@ -267,6 +271,10 @@ class GL_EXPORT GLSurface : public base::RefCounted<GLSurface>, virtual bool SupportsProtectedVideo() const; + // Returns true if we are allowed to adopt a size different from the + // platform's proposed surface size. + virtual bool SupportsOverridePlatformSize() const; + // Set the rectangle that will be drawn into on the surface, returning // success. If failed, it is possible that the context is no longer current. virtual bool SetDrawRectangle(const gfx::Rect& rect); @@ -309,6 +317,8 @@ class GL_EXPORT GLSurface : public base::RefCounted<GLSurface>, static bool ExtensionsContain(const char* extensions, const char* name); + virtual bool SupportsDelegatedInk(); + protected: virtual ~GLSurface(); @@ -387,6 +397,7 @@ class GL_EXPORT GLSurfaceAdapter : public GLSurface { bool BuffersFlipped() const override; bool SupportsDCLayers() const override; bool SupportsProtectedVideo() const override; + bool SupportsOverridePlatformSize() const override; bool SetDrawRectangle(const gfx::Rect& rect) override; gfx::Vector2d GetDrawOffset() const override; void SetRelyOnImplicitSync() override; @@ -402,6 +413,8 @@ class GL_EXPORT GLSurfaceAdapter : public GLSurface { void SetCurrent() override; bool IsCurrent() override; + bool SupportsDelegatedInk() override; + GLSurface* surface() const { return surface_.get(); } protected: diff --git a/chromium/ui/gl/gl_surface_egl.cc b/chromium/ui/gl/gl_surface_egl.cc index 054b4b4e9c1..d6ca1917f0d 100644 --- a/chromium/ui/gl/gl_surface_egl.cc +++ b/chromium/ui/gl/gl_surface_egl.cc @@ -9,14 +9,16 @@ #include <map> #include <memory> +#include <sstream> #include <vector> #include "base/command_line.h" +#include "base/containers/contains.h" +#include "base/debug/crash_logging.h" #include "base/lazy_instance.h" #include "base/logging.h" #include "base/macros.h" #include "base/metrics/histogram_macros.h" -#include "base/stl_util.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_split.h" #include "base/system/sys_info.h" @@ -27,6 +29,7 @@ #include "ui/gfx/gpu_fence.h" #include "ui/gl/angle_platform_impl.h" #include "ui/gl/egl_util.h" +#include "ui/gl/gl_bindings.h" #include "ui/gl/gl_context.h" #include "ui/gl/gl_context_egl.h" #include "ui/gl/gl_display_egl_util.h" @@ -181,6 +184,7 @@ class EGLGpuSwitchingObserver; EGLDisplay g_egl_display = EGL_NO_DISPLAY; EGLDisplayPlatform g_native_display(EGL_DEFAULT_DISPLAY); +const char* g_egl_client_extensions = nullptr; const char* g_egl_extensions = nullptr; bool g_egl_create_context_robustness_supported = false; bool g_egl_robustness_video_memory_purge_supported = false; @@ -204,6 +208,7 @@ bool g_egl_android_native_fence_sync_supported = false; bool g_egl_ext_pixel_format_float_supported = false; bool g_egl_angle_feature_control_supported = false; bool g_egl_angle_power_preference_supported = false; +bool g_egl_angle_external_context_and_surface_supported = false; EGLGpuSwitchingObserver* g_egl_gpu_switching_observer = nullptr; constexpr const char kSwapEventTraceCategories[] = "gpu"; @@ -822,6 +827,11 @@ void GetEGLInitDisplays(bool supports_angle_d3d, AddInitDisplay(init_displays, ANGLE_METAL); } + if (supports_angle_vulkan && use_angle_default && + features::IsDefaultANGLEVulkan()) { + AddInitDisplay(init_displays, ANGLE_VULKAN); + } + if (supports_angle_d3d) { if (use_angle_default) { // Default mode for ANGLE - try D3D11, else try D3D9 @@ -952,6 +962,7 @@ bool GLSurfaceEGL::InitializeOneOffForTesting() { // static bool GLSurfaceEGL::InitializeOneOffCommon() { + g_egl_client_extensions = eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS); g_egl_extensions = eglQueryString(g_egl_display, EGL_EXTENSIONS); g_egl_create_context_robustness_supported = @@ -1059,6 +1070,9 @@ bool GLSurfaceEGL::InitializeOneOffCommon() { g_egl_angle_power_preference_supported = HasEGLExtension("EGL_ANGLE_power_preference"); + g_egl_angle_external_context_and_surface_supported = + HasEGLExtension("EGL_ANGLE_external_context_and_surface"); + if (g_egl_angle_power_preference_supported) { g_egl_gpu_switching_observer = new EGLGpuSwitchingObserver(); ui::GpuSwitchingManager::GetInstance()->AddObserver( @@ -1074,6 +1088,7 @@ bool GLSurfaceEGL::InitializeExtensionSettingsOneOff() { if (!initialized_) return false; g_driver_egl.UpdateConditionalExtensionBindings(); + g_egl_client_extensions = eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS); g_egl_extensions = eglQueryString(g_egl_display, EGL_EXTENSIONS); return true; @@ -1096,6 +1111,7 @@ void GLSurfaceEGL::ShutdownOneOff() { } g_egl_display = EGL_NO_DISPLAY; + g_egl_client_extensions = nullptr; g_egl_extensions = nullptr; g_egl_create_context_robustness_supported = false; g_egl_robustness_video_memory_purge_supported = false; @@ -1125,11 +1141,21 @@ EGLNativeDisplayType GLSurfaceEGL::GetNativeDisplay() { } // static +const char* GLSurfaceEGL::GetEGLClientExtensions() { + return g_egl_client_extensions ? g_egl_client_extensions : ""; +} + +// static const char* GLSurfaceEGL::GetEGLExtensions() { return g_egl_extensions; } // static +bool GLSurfaceEGL::HasEGLClientExtension(const char* name) { + return ExtensionsContain(GetEGLClientExtensions(), name); +} + +// static bool GLSurfaceEGL::HasEGLExtension(const char* name) { return ExtensionsContain(GetEGLExtensions(), name); } @@ -1199,7 +1225,11 @@ bool GLSurfaceEGL::IsANGLEPowerPreferenceSupported() { return g_egl_angle_power_preference_supported; } -GLSurfaceEGL::~GLSurfaceEGL() {} +bool GLSurfaceEGL::IsANGLEExternalContextAndSurfaceSupported() { + return g_egl_angle_external_context_and_surface_supported; +} + +GLSurfaceEGL::~GLSurfaceEGL() = default; // InitializeDisplay is necessary because the static binding code // needs a full Display init before it can query the Display extensions. @@ -1213,12 +1243,9 @@ EGLDisplay GLSurfaceEGL::InitializeDisplay(EGLDisplayPlatform native_display) { // If EGL_EXT_client_extensions not supported this call to eglQueryString // will return NULL. - const char* client_extensions = - eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS); + g_egl_client_extensions = eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS); - bool supports_egl_debug = - client_extensions && - ExtensionsContain(client_extensions, "EGL_KHR_debug"); + bool supports_egl_debug = HasEGLClientExtension("EGL_KHR_debug"); if (supports_egl_debug) { EGLAttrib controls[] = { EGL_DEBUG_MSG_CRITICAL_KHR, @@ -1244,32 +1271,28 @@ EGLDisplay GLSurfaceEGL::InitializeDisplay(EGLDisplayPlatform native_display) { bool supports_angle_egl = false; bool supports_angle_metal = false; // Check for availability of ANGLE extensions. - if (client_extensions && - ExtensionsContain(client_extensions, "EGL_ANGLE_platform_angle")) { - supports_angle_d3d = - ExtensionsContain(client_extensions, "EGL_ANGLE_platform_angle_d3d"); + if (HasEGLClientExtension("EGL_ANGLE_platform_angle")) { + supports_angle_d3d = HasEGLClientExtension("EGL_ANGLE_platform_angle_d3d"); supports_angle_opengl = - ExtensionsContain(client_extensions, "EGL_ANGLE_platform_angle_opengl"); + HasEGLClientExtension("EGL_ANGLE_platform_angle_opengl"); supports_angle_null = - ExtensionsContain(client_extensions, "EGL_ANGLE_platform_angle_null"); + HasEGLClientExtension("EGL_ANGLE_platform_angle_null"); supports_angle_vulkan = - ExtensionsContain(client_extensions, "EGL_ANGLE_platform_angle_vulkan"); - supports_angle_swiftshader = ExtensionsContain( - client_extensions, "EGL_ANGLE_platform_angle_device_type_swiftshader"); - supports_angle_egl = ExtensionsContain( - client_extensions, "EGL_ANGLE_platform_angle_device_type_egl_angle"); + HasEGLClientExtension("EGL_ANGLE_platform_angle_vulkan"); + supports_angle_swiftshader = HasEGLClientExtension( + "EGL_ANGLE_platform_angle_device_type_swiftshader"); + supports_angle_egl = + HasEGLClientExtension("EGL_ANGLE_platform_angle_device_type_egl_angle"); supports_angle_metal = - ExtensionsContain(client_extensions, "EGL_ANGLE_platform_angle_metal"); + HasEGLClientExtension("EGL_ANGLE_platform_angle_metal"); } bool supports_angle = supports_angle_d3d || supports_angle_opengl || supports_angle_null || supports_angle_vulkan || supports_angle_swiftshader || supports_angle_metal; - if (client_extensions) { - g_egl_angle_feature_control_supported = - ExtensionsContain(client_extensions, "EGL_ANGLE_feature_control"); - } + g_egl_angle_feature_control_supported = + HasEGLClientExtension("EGL_ANGLE_feature_control"); std::vector<DisplayType> init_displays; base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); @@ -1322,12 +1345,25 @@ EGLDisplay GLSurfaceEGL::InitializeDisplay(EGLDisplayPlatform native_display) { LOG(ERROR) << "eglInitialize " << DisplayTypeString(display_type) << " failed with error " << GetLastEGLErrorString() << (is_last ? "" : ", trying next display type"); - } else { - UMA_HISTOGRAM_ENUMERATION("GPU.EGLDisplayType", display_type, - DISPLAY_TYPE_MAX); - g_egl_display = display; - break; + continue; } + + std::ostringstream display_type_string; + auto gl_implementation = GetGLImplementation(); + display_type_string << GetGLImplementationName(gl_implementation); + if (gl_implementation == kGLImplementationEGLANGLE) { + display_type_string << ":" << DisplayTypeString(display_type); + } + + static auto* egl_display_type_key = base::debug::AllocateCrashKeyString( + "egl-display-type", base::debug::CrashKeySize::Size32); + base::debug::SetCrashKeyString(egl_display_type_key, + display_type_string.str()); + + UMA_HISTOGRAM_ENUMERATION("GPU.EGLDisplayType", display_type, + DISPLAY_TYPE_MAX); + g_egl_display = display; + break; } return g_egl_display; diff --git a/chromium/ui/gl/gl_surface_egl.h b/chromium/ui/gl/gl_surface_egl.h index 9bda1ab9f97..33f36aed459 100644 --- a/chromium/ui/gl/gl_surface_egl.h +++ b/chromium/ui/gl/gl_surface_egl.h @@ -9,6 +9,9 @@ #include <windows.h> #endif +#include <EGL/egl.h> +#include <EGL/eglext.h> + #include <memory> #include <string> #include <vector> @@ -22,7 +25,6 @@ #include "ui/gfx/geometry/size.h" #include "ui/gfx/vsync_provider.h" #include "ui/gl/egl_timestamps.h" -#include "ui/gl/gl_bindings.h" #include "ui/gl/gl_export.h" #include "ui/gl/gl_surface.h" #include "ui/gl/gl_surface_overlay.h" @@ -106,7 +108,9 @@ class GL_EXPORT GLSurfaceEGL : public GLSurface { // These aren't particularly tied to surfaces, but since we already // have the static InitializeOneOff here, it's easiest to reuse its // initialization guards. + static const char* GetEGLClientExtensions(); static const char* GetEGLExtensions(); + static bool HasEGLClientExtension(const char* name); static bool HasEGLExtension(const char* name); static bool IsCreateContextRobustnessSupported(); static bool IsRobustnessVideoMemoryPurgeSupported(); @@ -123,6 +127,7 @@ class GL_EXPORT GLSurfaceEGL : public GLSurface { static bool IsPixelFormatFloatSupported(); static bool IsANGLEFeatureControlSupported(); static bool IsANGLEPowerPreferenceSupported(); + static bool IsANGLEExternalContextAndSurfaceSupported(); protected: ~GLSurfaceEGL() override; diff --git a/chromium/ui/gl/gl_surface_egl_surface_control.cc b/chromium/ui/gl/gl_surface_egl_surface_control.cc index b0e7c0ff001..66a7c373337 100644 --- a/chromium/ui/gl/gl_surface_egl_surface_control.cc +++ b/chromium/ui/gl/gl_surface_egl_surface_control.cc @@ -113,7 +113,24 @@ void GLSurfaceEGLSurfaceControl::PrepareToDestroy(bool have_context) { weak_factory_.InvalidateWeakPtrs(); } +void GLSurfaceEGLSurfaceControl::PreserveChildSurfaceControls() { + TRACE_EVENT_INSTANT0( + "gpu", "GLSurfaceEGLSurfaceControl::PreserveChildSurfaceControls", + TRACE_EVENT_SCOPE_THREAD); + preserve_children_ = true; +} + void GLSurfaceEGLSurfaceControl::Destroy() { + TRACE_EVENT0("gpu", "GLSurfaceEGLSurfaceControl::Destroy"); + // Detach all child layers to prevent leaking unless browser asked us not too. + if (!preserve_children_) { + gfx::SurfaceControl::Transaction transaction; + for (auto& surface : surface_list_) { + transaction.SetParent(*surface.surface, nullptr); + } + transaction.Apply(); + } + pending_transaction_.reset(); surface_list_.clear(); root_surface_.reset(); diff --git a/chromium/ui/gl/gl_surface_egl_surface_control.h b/chromium/ui/gl/gl_surface_egl_surface_control.h index 57e634189b0..ba24b4ca19a 100644 --- a/chromium/ui/gl/gl_surface_egl_surface_control.h +++ b/chromium/ui/gl/gl_surface_egl_surface_control.h @@ -55,6 +55,7 @@ class GL_EXPORT GLSurfaceEGLSurfaceControl : public GLSurfaceEGL { std::unique_ptr<gfx::GpuFence> gpu_fence) override; bool IsSurfaceless() const override; void* GetHandle() override; + void PreserveChildSurfaceControls() override; // Sync versions of frame update, should never be used. gfx::SwapResult SwapBuffers(PresentationCallback callback) override; @@ -251,6 +252,8 @@ class GL_EXPORT GLSurfaceEGLSurfaceControl : public GLSurfaceEGL { TransactionAckTimeoutManager transaction_ack_timeout_manager_; + bool preserve_children_ = false; + scoped_refptr<base::SingleThreadTaskRunner> gpu_task_runner_; base::WeakPtrFactory<GLSurfaceEGLSurfaceControl> weak_factory_{this}; }; diff --git a/chromium/ui/gl/gl_surface_egl_unittest.cc b/chromium/ui/gl/gl_surface_egl_unittest.cc index 368d167412e..9f75776dd5d 100644 --- a/chromium/ui/gl/gl_surface_egl_unittest.cc +++ b/chromium/ui/gl/gl_surface_egl_unittest.cc @@ -7,6 +7,7 @@ #include "build/build_config.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" +#include "ui/gl/gl_bindings.h" #include "ui/gl/gl_context.h" #include "ui/gl/gl_implementation.h" #include "ui/gl/init/gl_factory.h" diff --git a/chromium/ui/gl/gl_surface_egl_x11.cc b/chromium/ui/gl/gl_surface_egl_x11.cc index ae4e6850003..980227258b2 100644 --- a/chromium/ui/gl/gl_surface_egl_x11.cc +++ b/chromium/ui/gl/gl_surface_egl_x11.cc @@ -4,6 +4,7 @@ #include "ui/gl/gl_surface_egl_x11.h" +#include "base/stl_util.h" #include "base/threading/thread_task_runner_handle.h" #include "ui/base/x/x11_display_util.h" #include "ui/base/x/x11_util.h" @@ -54,6 +55,9 @@ bool NativeViewGLSurfaceEGLX11::Initialize(GLSurfaceFormat format) { return false; auto* connection = x11::Connection::Get(); + // Synchronize the Xlib display to ensure ANGLE's CreateWindow request + // completes before we make our QueryTree request below. + connection->GetXlibDisplay(x11::XlibDisplayType::kSyncing); // Query all child windows and store them. ANGLE creates a child window when // eglCreateWindowSurface is called on X11 and expose events from this window // need to be received by this class. Since ANGLE is using a separate @@ -67,17 +71,15 @@ bool NativeViewGLSurfaceEGLX11::Initialize(GLSurfaceFormat format) { {.window = child, .event_mask = x11::EventMask::Exposure}); } - if (ui::X11EventSource::HasInstance()) { - dispatcher_set_ = true; - ui::X11EventSource::GetInstance()->AddXEventDispatcher(this); - } + dispatcher_set_ = true; + connection->AddEventObserver(this); return true; } void NativeViewGLSurfaceEGLX11::Destroy() { NativeViewGLSurfaceEGL::Destroy(); - if (dispatcher_set_ && ui::X11EventSource::HasInstance()) - ui::X11EventSource::GetInstance()->RemoveXEventDispatcher(this); + if (dispatcher_set_) + x11::Connection::Get()->RemoveEventObserver(this); } gfx::SwapResult NativeViewGLSurfaceEGLX11::SwapBuffers( @@ -114,21 +116,18 @@ NativeViewGLSurfaceEGLX11::CreateVsyncProviderInternal() { return std::make_unique<XrandrIntervalOnlyVSyncProvider>(); } -bool NativeViewGLSurfaceEGLX11::DispatchXEvent(x11::Event* x11_event) { +void NativeViewGLSurfaceEGLX11::OnEvent(const x11::Event& x11_event) { // When ANGLE is used for EGL, it creates an X11 child window. Expose events // from this window need to be forwarded to this class. - auto* expose = x11_event->As<x11::ExposeEvent>(); - bool can_dispatch = expose && std::find(children_.begin(), children_.end(), - expose->window) != children_.end(); - if (!can_dispatch) - return false; + auto* expose = x11_event.As<x11::ExposeEvent>(); + if (!expose || !base::Contains(children_, expose->window)) + return; auto expose_copy = *expose; auto window = static_cast<x11::Window>(window_); expose_copy.window = window; x11::SendEvent(expose_copy, window, x11::EventMask::Exposure); x11::Connection::Get()->Flush(); - return true; } } // namespace gl diff --git a/chromium/ui/gl/gl_surface_egl_x11.h b/chromium/ui/gl/gl_surface_egl_x11.h index 14a2fb5d98f..e36a3a6bc32 100644 --- a/chromium/ui/gl/gl_surface_egl_x11.h +++ b/chromium/ui/gl/gl_surface_egl_x11.h @@ -10,7 +10,6 @@ #include <string> #include "base/macros.h" -#include "ui/events/platform/x11/x11_event_source.h" #include "ui/gfx/x/connection.h" #include "ui/gfx/x/event.h" #include "ui/gl/gl_export.h" @@ -20,7 +19,7 @@ namespace gl { // Encapsulates an EGL surface bound to a view using the X Window System. class GL_EXPORT NativeViewGLSurfaceEGLX11 : public NativeViewGLSurfaceEGL, - public ui::XEventDispatcher { + public x11::EventObserver { public: explicit NativeViewGLSurfaceEGLX11(x11::Window window); NativeViewGLSurfaceEGLX11(const NativeViewGLSurfaceEGLX11& other) = delete; @@ -41,8 +40,8 @@ class GL_EXPORT NativeViewGLSurfaceEGLX11 : public NativeViewGLSurfaceEGL, // NativeViewGLSurfaceEGL overrides: std::unique_ptr<gfx::VSyncProvider> CreateVsyncProviderInternal() override; - // XEventDispatcher: - bool DispatchXEvent(x11::Event* xev) override; + // x11::EventObserver: + void OnEvent(const x11::Event& xev) override; std::vector<x11::Window> children_; diff --git a/chromium/ui/gl/gl_surface_egl_x11_gles2.cc b/chromium/ui/gl/gl_surface_egl_x11_gles2.cc index 0d02906a3fd..017595561a6 100644 --- a/chromium/ui/gl/gl_surface_egl_x11_gles2.cc +++ b/chromium/ui/gl/gl_surface_egl_x11_gles2.cc @@ -8,9 +8,9 @@ #include "ui/gfx/x/xproto.h" #include "ui/gfx/x/xproto_util.h" #include "ui/gl/egl_util.h" +#include "ui/gl/gl_bindings.h" using ui::GetLastEGLErrorString; -using ui::X11EventSource; namespace gl { @@ -20,7 +20,7 @@ NativeViewGLSurfaceEGLX11GLES2::NativeViewGLSurfaceEGLX11GLES2( bool NativeViewGLSurfaceEGLX11GLES2::InitializeNativeWindow() { auto* connection = GetXNativeConnection(); - auto geometry = connection->GetGeometry({parent_window_}).Sync(); + auto geometry = connection->GetGeometry(parent_window_).Sync(); if (!geometry) { LOG(ERROR) << "GetGeometry failed for window " << static_cast<uint32_t>(parent_window_) << "."; @@ -66,7 +66,7 @@ EGLConfig NativeViewGLSurfaceEGLX11GLES2::GetConfig() { // Get a config compatible with the window DCHECK(window_); auto* connection = GetXNativeConnection(); - auto geometry = connection->GetGeometry({window()}).Sync(); + auto geometry = connection->GetGeometry(window()).Sync(); if (!geometry) return nullptr; @@ -152,17 +152,16 @@ bool NativeViewGLSurfaceEGLX11GLES2::Resize(const gfx::Size& size, return true; } -bool NativeViewGLSurfaceEGLX11GLES2::DispatchXEvent(x11::Event* x11_event) { - auto* expose = x11_event->As<x11::ExposeEvent>(); +void NativeViewGLSurfaceEGLX11GLES2::OnEvent(const x11::Event& x11_event) { + auto* expose = x11_event.As<x11::ExposeEvent>(); auto window = static_cast<x11::Window>(window_); if (!expose || expose->window != window) - return false; + return; auto expose_copy = *expose; expose_copy.window = parent_window_; x11::SendEvent(expose_copy, parent_window_, x11::EventMask::Exposure); x11::Connection::Get()->Flush(); - return true; } NativeViewGLSurfaceEGLX11GLES2::~NativeViewGLSurfaceEGLX11GLES2() { diff --git a/chromium/ui/gl/gl_surface_egl_x11_gles2.h b/chromium/ui/gl/gl_surface_egl_x11_gles2.h index 73b9b4a007f..55ff91f670a 100644 --- a/chromium/ui/gl/gl_surface_egl_x11_gles2.h +++ b/chromium/ui/gl/gl_surface_egl_x11_gles2.h @@ -40,8 +40,8 @@ class GL_EXPORT NativeViewGLSurfaceEGLX11GLES2 } private: - // XEventDispatcher: - bool DispatchXEvent(x11::Event* xev) override; + // x11::EventObserver: + void OnEvent(const x11::Event& xev) override; x11::Window parent_window_; diff --git a/chromium/ui/gl/gl_surface_glx.cc b/chromium/ui/gl/gl_surface_glx.cc index db774dc237c..6ceefd62e6a 100644 --- a/chromium/ui/gl/gl_surface_glx.cc +++ b/chromium/ui/gl/gl_surface_glx.cc @@ -106,6 +106,7 @@ class OMLSyncControlVSyncProvider : public SyncControlVSyncProvider { bool GetSyncValues(int64_t* system_time, int64_t* media_stream_counter, int64_t* swap_buffer_counter) override { + x11::Connection::Get()->Flush(); return glXGetSyncValuesOML(x11::Connection::Get()->GetXlibDisplay(), glx_window_, system_time, media_stream_counter, swap_buffer_counter); @@ -600,7 +601,7 @@ bool NativeViewGLSurfaceGLX::Initialize(GLSurfaceFormat format) { auto parent = static_cast<x11::Window>(parent_window_); auto attributes_req = conn->GetWindowAttributes({parent}); - auto geometry_req = conn->GetGeometry({parent}); + auto geometry_req = conn->GetGeometry(parent); conn->Flush(); auto attributes = attributes_req.Sync(); auto geometry = geometry_req.Sync(); @@ -808,16 +809,16 @@ NativeViewGLSurfaceGLX::~NativeViewGLSurfaceGLX() { Destroy(); } -void NativeViewGLSurfaceGLX::ForwardExposeEvent(x11::Event* event) { - auto forwarded_event = *event->As<x11::ExposeEvent>(); +void NativeViewGLSurfaceGLX::ForwardExposeEvent(const x11::Event& event) { + auto forwarded_event = *event.As<x11::ExposeEvent>(); auto window = static_cast<x11::Window>(parent_window_); forwarded_event.window = window; x11::SendEvent(forwarded_event, window, x11::EventMask::Exposure); x11::Connection::Get()->Flush(); } -bool NativeViewGLSurfaceGLX::CanHandleEvent(x11::Event* x11_event) { - auto* expose = x11_event->As<x11::ExposeEvent>(); +bool NativeViewGLSurfaceGLX::CanHandleEvent(const x11::Event& x11_event) { + auto* expose = x11_event.As<x11::ExposeEvent>(); return expose && expose->window == static_cast<x11::Window>(window_); } diff --git a/chromium/ui/gl/gl_surface_glx.h b/chromium/ui/gl/gl_surface_glx.h index aa88c30297c..4cdb554a09d 100644 --- a/chromium/ui/gl/gl_surface_glx.h +++ b/chromium/ui/gl/gl_surface_glx.h @@ -104,10 +104,10 @@ class GL_EXPORT NativeViewGLSurfaceGLX : public GLSurfaceGLX { virtual void UnregisterEvents() = 0; // Forwards Expose event to child window. - void ForwardExposeEvent(x11::Event* xevent); + void ForwardExposeEvent(const x11::Event& xevent); // Checks if event is Expose for child window. - bool CanHandleEvent(x11::Event* xevent); + bool CanHandleEvent(const x11::Event& xevent); gfx::AcceleratedWidget window() const { return static_cast<gfx::AcceleratedWidget>(window_); diff --git a/chromium/ui/gl/gl_surface_glx_x11.cc b/chromium/ui/gl/gl_surface_glx_x11.cc index 858987aa494..404f1caf7b5 100644 --- a/chromium/ui/gl/gl_surface_glx_x11.cc +++ b/chromium/ui/gl/gl_surface_glx_x11.cc @@ -4,8 +4,7 @@ #include "ui/gl/gl_surface_glx_x11.h" - -using ui::X11EventSource; +#include "ui/gfx/x/future.h" namespace gl { @@ -18,26 +17,22 @@ GLSurfaceGLXX11::~GLSurfaceGLXX11() { void GLSurfaceGLXX11::RegisterEvents() { // Can be null in tests, when we don't care about Exposes. - if (X11EventSource::HasInstance()) { - x11::Connection::Get()->ChangeWindowAttributes( - x11::ChangeWindowAttributesRequest{ - .window = static_cast<x11::Window>(window()), - .event_mask = x11::EventMask::Exposure}); - - X11EventSource::GetInstance()->AddXEventDispatcher(this); - } + auto* connection = x11::Connection::Get(); + + connection->ChangeWindowAttributes(x11::ChangeWindowAttributesRequest{ + .window = static_cast<x11::Window>(window()), + .event_mask = x11::EventMask::Exposure}); + + connection->AddEventObserver(this); } void GLSurfaceGLXX11::UnregisterEvents() { - if (X11EventSource::HasInstance()) - X11EventSource::GetInstance()->RemoveXEventDispatcher(this); + x11::Connection::Get()->RemoveEventObserver(this); } -bool GLSurfaceGLXX11::DispatchXEvent(x11::Event* event) { - if (!CanHandleEvent(event)) - return false; - ForwardExposeEvent(event); - return true; +void GLSurfaceGLXX11::OnEvent(const x11::Event& event) { + if (CanHandleEvent(event)) + ForwardExposeEvent(event); } } // namespace gl diff --git a/chromium/ui/gl/gl_surface_glx_x11.h b/chromium/ui/gl/gl_surface_glx_x11.h index 6b2a4ac5dc8..c4dfd8dc9ee 100644 --- a/chromium/ui/gl/gl_surface_glx_x11.h +++ b/chromium/ui/gl/gl_surface_glx_x11.h @@ -6,8 +6,8 @@ #define UI_GL_GL_SURFACE_GLX_X11_H_ #include "base/macros.h" -#include "ui/events/platform/x11/x11_event_source.h" #include "ui/gfx/native_widget_types.h" +#include "ui/gfx/x/connection.h" #include "ui/gfx/x/event.h" #include "ui/gl/gl_export.h" #include "ui/gl/gl_surface_glx.h" @@ -17,7 +17,7 @@ namespace gl { // X11 specific implementation of GLX surface. Registers as a // PlatformEventDispatcher to handle XEvents. class GL_EXPORT GLSurfaceGLXX11 : public NativeViewGLSurfaceGLX, - public ui::XEventDispatcher { + public x11::EventObserver { public: explicit GLSurfaceGLXX11(gfx::AcceleratedWidget window); @@ -28,8 +28,8 @@ class GL_EXPORT GLSurfaceGLXX11 : public NativeViewGLSurfaceGLX, void RegisterEvents() override; void UnregisterEvents() override; - // XEventDispatcher: - bool DispatchXEvent(x11::Event* event) override; + // x11::EventObserver: + void OnEvent(const x11::Event& event) override; private: DISALLOW_COPY_AND_ASSIGN(GLSurfaceGLXX11); diff --git a/chromium/ui/gl/gl_switches.cc b/chromium/ui/gl/gl_switches.cc index 034352f8f12..9a458e8c194 100644 --- a/chromium/ui/gl/gl_switches.cc +++ b/chromium/ui/gl/gl_switches.cc @@ -5,6 +5,11 @@ #include "ui/gl/gl_switches.h" #include "base/stl_util.h" +#include "build/build_config.h" + +#if defined(OS_ANDROID) +#include "base/android/build_info.h" +#endif namespace gl { @@ -224,10 +229,25 @@ const base::Feature kDefaultANGLEOpenGL{"DefaultANGLEOpenGL", const base::Feature kDefaultANGLEMetal{"DefaultANGLEMetal", base::FEATURE_DISABLED_BY_DEFAULT}; +// Default to using ANGLE's Vulkan backend. +const base::Feature kDefaultANGLEVulkan{"DefaultANGLEVulkan", + base::FEATURE_DISABLED_BY_DEFAULT}; + // Track current program's shaders at glUseProgram() call for crash report // purpose. Only effective on Windows because the attached shaders may only // be reliably retrieved with ANGLE backend. const base::Feature kTrackCurrentShaders{"TrackCurrentShaders", base::FEATURE_DISABLED_BY_DEFAULT}; +bool IsDefaultANGLEVulkan() { +#if defined(OS_ANDROID) + // No support for devices before Q -- exit before checking feature flags + // so that devices are not counted in finch trials. + if (base::android::BuildInfo::GetInstance()->sdk_int() < + base::android::SDK_VERSION_Q) + return false; +#endif // defined(OS_ANDROID) + return base::FeatureList::IsEnabled(kDefaultANGLEVulkan); +} + } // namespace features diff --git a/chromium/ui/gl/gl_switches.h b/chromium/ui/gl/gl_switches.h index 1daab9da0f8..81ae0db537b 100644 --- a/chromium/ui/gl/gl_switches.h +++ b/chromium/ui/gl/gl_switches.h @@ -90,6 +90,7 @@ GL_EXPORT extern const int kGLSwitchesCopiedFromGpuProcessHostNumSwitches; } // namespace switches namespace features { + GL_EXPORT extern const base::Feature kDCompTripleBufferRootSwapChain; GL_EXPORT extern const base::Feature kDCompTripleBufferVideoSwapChain; GL_EXPORT extern const base::Feature kDirectCompositionForceFullDamage; @@ -98,7 +99,11 @@ GL_EXPORT extern const base::Feature kDirectCompositionLowLatencyPresentation; GL_EXPORT extern const base::Feature kDirectCompositionSoftwareOverlays; GL_EXPORT extern const base::Feature kDefaultANGLEOpenGL; GL_EXPORT extern const base::Feature kDefaultANGLEMetal; +GL_EXPORT extern const base::Feature kDefaultANGLEVulkan; GL_EXPORT extern const base::Feature kTrackCurrentShaders; + +GL_EXPORT bool IsDefaultANGLEVulkan(); + } // namespace features #endif // UI_GL_GL_SWITCHES_H_ diff --git a/chromium/ui/gl/gl_utils.cc b/chromium/ui/gl/gl_utils.cc index 41e79b44b59..77d3d1ad124 100644 --- a/chromium/ui/gl/gl_utils.cc +++ b/chromium/ui/gl/gl_utils.cc @@ -167,8 +167,8 @@ void CollectX11GpuExtraInfo(bool enable_native_gpu_memory_buffers, // singleton is busy being created on another thread. GLVisualPickerGLX* visual_picker = GLVisualPickerGLX::GetInstance(); - info.system_visual = static_cast<uint32_t>(visual_picker->system_visual()); - info.rgba_visual = static_cast<uint32_t>(visual_picker->rgba_visual()); + info.system_visual = visual_picker->system_visual(); + info.rgba_visual = visual_picker->rgba_visual(); // With GLX, only BGR(A) buffer formats are supported. EGL does not have // this restriction. diff --git a/chromium/ui/gl/gl_version_info.cc b/chromium/ui/gl/gl_version_info.cc index a8cf65628a3..f948e8983f0 100644 --- a/chromium/ui/gl/gl_version_info.cc +++ b/chromium/ui/gl/gl_version_info.cc @@ -36,8 +36,15 @@ GLVersionInfo::GLVersionInfo(const char* version_str, void GLVersionInfo::Initialize(const char* version_str, const char* renderer_str, const gfx::ExtensionSet& extensions) { - if (version_str) + if (version_str) { ParseVersionString(version_str); + ParseDriverInfo(version_str); + } + // ANGLE's version string does not contain useful information for + // GLVersionInfo. If we are going to parse the version string and we're using + // ANGLE, we must also parse ANGLE's renderer string, which contains the + // driver's version string. + DCHECK(renderer_str || driver_vendor != "ANGLE"); if (renderer_str) { std::string renderer_string = std::string(renderer_str); @@ -101,7 +108,7 @@ void GLVersionInfo::ParseVersionString(const char* version_str) { std::vector<base::StringPiece> pieces = base::SplitStringPiece( lstr, " -()@", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY); if (pieces.size() == 0) { - // This should never happen, but let's just tolerant bad driver behavior. + // This should never happen, but let's just tolerate bad driver behavior. return; } @@ -109,7 +116,7 @@ void GLVersionInfo::ParseVersionString(const char* version_str) { // Desktop GL doesn't specify the GL_VERSION format, but ES spec requires // the string to be in the format of "OpenGL ES major.minor other_info". DCHECK_LE(3u, pieces[0].size()); - if (pieces[0][pieces[0].size() - 1] == 'V') { + if (pieces[0].size() > 0 && pieces[0].back() == 'V') { // On Nexus 6 with Android N, GL_VERSION string is not spec compliant. // There is no space between "3.1" and "V@104.0". pieces[0].remove_suffix(1); @@ -131,16 +138,48 @@ void GLVersionInfo::ParseVersionString(const char* version_str) { is_es3 = true; } } +} + +void GLVersionInfo::ParseDriverInfo(const char* version_str) { + if (!version_str) + return; + base::StringPiece lstr(version_str); + constexpr base::StringPiece kESPrefix = "OpenGL ES "; + if (base::StartsWith(lstr, kESPrefix, base::CompareCase::SENSITIVE)) { + lstr.remove_prefix(kESPrefix.size()); + } + std::vector<base::StringPiece> pieces = base::SplitStringPiece( + lstr, " -()@", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY); + if (pieces.size() == 0) { + // This should never happen, but let's just tolerate bad driver behavior. + return; + } + + if (is_es) { + // Desktop GL doesn't specify the GL_VERSION format, but ES spec requires + // the string to be in the format of "OpenGL ES major.minor other_info". + DCHECK_LE(3u, pieces[0].size()); + if (pieces[0].size() > 0 && pieces[0].back() == 'V') { + // On Nexus 6 with Android N, GL_VERSION string is not spec compliant. + // There is no space between "3.1" and "V@104.0". + pieces[0].remove_suffix(1); + } + } if (pieces.size() == 1) return; - constexpr base::StringPiece kVendors[] = { - "ANGLE", "Mesa", "INTEL", "NVIDIA", "ATI", "FireGL", "Chromium", "APPLE"}; + // Map key strings to driver vendors. We assume the key string is followed by + // the driver version. + const std::map<base::StringPiece, base::StringPiece> kVendors = { + {"ANGLE", "ANGLE"}, {"Mesa", "Mesa"}, {"INTEL", "INTEL"}, + {"NVIDIA", "NVIDIA"}, {"ATI", "ATI"}, {"FireGL", "FireGL"}, + {"Chromium", "Chromium"}, {"APPLE", "APPLE"}, {"AMD", "AMD"}, + {"Metal", "Apple"}}; for (size_t ii = 1; ii < pieces.size(); ++ii) { for (auto vendor : kVendors) { - if (pieces[ii] == vendor) { - driver_vendor.assign(vendor.data(), vendor.size()); + if (pieces[ii] == vendor.first) { + driver_vendor.assign(vendor.second.data(), vendor.second.size()); if (ii + 1 < pieces.size()) driver_version.assign(pieces[ii + 1].data(), pieces[ii + 1].size()); return; @@ -184,6 +223,26 @@ void GLVersionInfo::ExtractDriverVendorANGLE(const char* renderer_str) { base::StringPiece rstr(renderer_str); DCHECK(base::StartsWith(rstr, "ANGLE (", base::CompareCase::SENSITIVE)); rstr = rstr.substr(sizeof("ANGLE (") - 1, rstr.size() - sizeof("ANGLE (")); + + // ANGLE's renderer string returns a format matching ANGLE (GL_VENDOR, + // GL_RENDERER, GL_VERSION) + std::vector<base::StringPiece> gl_strings = base::SplitStringPiece( + rstr, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY); + + // The 3rd part of the renderer string contains the native driver's version + // string. We should parse it here to override anything parsed from ANGLE's + // GL_VERSION string, which only contains information about the ANGLE version. + if (gl_strings.size() >= 3) { + // The first part of the renderer string contains the native driver's + // vendor string. + driver_vendor.assign(gl_strings[0].data(), gl_strings[0].size()); + + std::string native_version_str; + base::TrimString(gl_strings[2], ")", &native_version_str); + ParseDriverInfo(native_version_str.c_str()); + return; + } + if (base::StartsWith(rstr, "Vulkan ", base::CompareCase::SENSITIVE)) { size_t pos = rstr.find('('); if (pos != std::string::npos) diff --git a/chromium/ui/gl/gl_version_info.h b/chromium/ui/gl/gl_version_info.h index 63ceab91436..7c822cdc54b 100644 --- a/chromium/ui/gl/gl_version_info.h +++ b/chromium/ui/gl/gl_version_info.h @@ -84,6 +84,7 @@ struct GL_EXPORT GLVersionInfo { const char* renderer_str, const gfx::ExtensionSet& extensions); void ParseVersionString(const char* version_str); + void ParseDriverInfo(const char* version_str); void ExtractDriverVendorANGLE(const char* renderer_str); bool IsES3Capable(const gfx::ExtensionSet& extensions) const; diff --git a/chromium/ui/gl/gl_version_info_unittest.cc b/chromium/ui/gl/gl_version_info_unittest.cc index a7885766928..2378c34cc60 100644 --- a/chromium/ui/gl/gl_version_info_unittest.cc +++ b/chromium/ui/gl/gl_version_info_unittest.cc @@ -24,8 +24,6 @@ TEST(GLVersionInfoTest, ParseGLVersionStringTest) { {"4.3 (Core Profile) Mesa 11.2.0", 4, 3, false, false, false, "Mesa", "11.2.0"}, {"4.5.0 NVIDIA 364.19", 4, 5, false, false, false, "NVIDIA", "364.19"}, - {"OpenGL ES 2.0 (ANGLE 2.1.0.cd1b12260360)", 2, 0, true, true, false, - "ANGLE", "2.1.0.cd1b12260360"}, {"2.1 INTEL-10.6.33", 2, 1, false, false, false, "INTEL", "10.6.33"}, {"2.1", 2, 1, false, false, false, "", ""}, {"OpenGL ES 3.0", 3, 0, true, false, true, "", ""}, @@ -47,6 +45,8 @@ TEST(GLVersionInfoTest, ParseGLVersionStringTest) { false, false, "", "21.19.137.514"}, {"4.5.13497 Compatibility Profile/Debug Context 23.20.782.0", 4, 5, false, false, false, "", "23.20.782.0"}, + {"OpenGL ES 3.0 SwiftShader 4.1.0.7", 3, 0, true, false, true, "", + "4.1.0.7"}, // This is a non spec compliant string from Nexus6 on Android N. {"OpenGL ES 3.1V@104.0", 3, 1, true, false, true, "", "104.0"}}; @@ -78,26 +78,53 @@ TEST(GLVersionInfoTest, DriverVendorForANGLE) { const char* expected_driver_vendor; const char* expected_driver_version; } kTestData[] = { - {"OpenGL ES 2.0 (ANGLE 2.1.0.44063c804e4f)", - "ANGLE (NVIDIA Quadro P400 Direct3D11 vs_5_0 ps_5_0)", - 2, 0, true, true, false, true, - "ANGLE (NVIDIA)", "2.1.0.44063c804e4f"}, - {"OpenGL ES 2.0 (ANGLE 2.1.0.44063c804e4f)", - "ANGLE (Intel(R) HD Graphics 630 Direct3D11 vs_5_0 ps_5_0)", - 2, 0, true, true, false, true, - "ANGLE (Intel)", "2.1.0.44063c804e4f"}, - {"OpenGL ES 2.0 (ANGLE 2.1.0.44063c804e4f)", - "ANGLE (Radeon RX550/550 Series Direct3D11 vs_5_0 ps_5_0)", - 2, 0, true, true, false, true, - "ANGLE (AMD)", "2.1.0.44063c804e4f"}, - {"OpenGL ES 2.0 (ANGLE 2.1.0.44063c804e4f)", - "ANGLE (Vulkan 1.1.120(Intel(R) UHD Graphics 630 (0x00003E92)))", - 2, 0, true, true, false, false, - "ANGLE (Intel)", "2.1.0.44063c804e4f"}, - {"OpenGL ES 2.0 (ANGLE 2.1.0.44063c804e4f)", - "ANGLE (Intel, Intel(R) UHD Graphics 630, OpenGL 4.5 core)", - 2, 0, true, true, false, false, - "ANGLE (Intel)", "2.1.0.44063c804e4f"}, + {"OpenGL ES 2.0.0 (ANGLE 2.1.4875 git hash: 32e78475b1c0)", + "ANGLE (Intel Inc., Intel(R) UHD Graphics 630, OpenGL 4.1 " + "INTEL-14.7.11)", + 2, 0, true, true, false, false, "INTEL", "14.7.11"}, + {"OpenGL ES 2.0.0 (ANGLE 2.1.4875 git hash: 32e78475b1c0)", + "ANGLE (ATI Technologies Inc., AMD Radeon Pro 560X OpenGL Engine, " + "OpenGL 4.1 ATI-3.10.19)", + 2, 0, true, true, false, false, "ATI", "3.10.19"}, + {"OpenGL ES 2.0.0 (ANGLE 2.1.4875 git hash: 32e78475b1c0)", + "ANGLE (AMD, Metal Renderer: AMD Radeon Pro 560X, Version 10.15.7 " + "(Build 19H114))", + 2, 0, true, true, false, false, "AMD", "10.15.7"}, + {"OpenGL ES 2.0.0 (ANGLE 2.1.4875 git hash: 32e78475b1c0)", + "ANGLE (Mesa/X.org, llvmpipe (LLVM 11.0.0 256 bits), OpenGL 4.5 (Core " + "Profile) Mesa 20.2.4)", + 2, 0, true, true, false, false, "Mesa", "20.2.4"}, + {"OpenGL ES 2.0.0 (ANGLE 2.1.4875 git hash: 32e78475b1c0)", + "ANGLE (Apple, Apple A12Z, OpenGL 4.1 Metal - 70.12.7)", 2, 0, true, + true, false, false, "Apple", "70.12.7"}, + {"OpenGL ES 2.0.0 (ANGLE 2.1.4875 git hash: 32e78475b1c0)", + "ANGLE (NVIDIA Corporation, Quadro P1000/PCIe/SSE2, OpenGL 4.5.0 NVIDIA " + "440.100)", + 2, 0, true, true, false, false, "NVIDIA", "440.100"}, + {"OpenGL ES 2.0.0 (ANGLE 2.1.4875 git hash: 32e78475b1c0)", + "ANGLE (NVIDIA, Vulkan 1.1.119 (NVIDIA Quadro P1000 (0x00001CB1)), " + "NVIDIA-440.400.0)", + 2, 0, true, true, false, false, "NVIDIA", "440.400.0"}, + {"OpenGL ES 2.0.0 (ANGLE 2.1.4875 git hash: 32e78475b1c0)", + "ANGLE (NVIDIA, NVIDIA Quadro P1000 Direct3D11 vs_5_0 ps_5_0, " + "D3D11-23.21.13.9077)", + 2, 0, true, true, false, true, "NVIDIA", "23.21.13.9077"}, + {"OpenGL ES 2.0.0 (ANGLE 2.1.4875 git hash: 32e78475b1c0)", + "ANGLE (NVIDIA, NVIDIA Quadro P1000 Direct3D9Ex vs_3_0 ps_3_0, " + "nvldumdx.dll-23.21.13.9077)", + 2, 0, true, true, false, true, "NVIDIA", "23.21.13.9077"}, + {"OpenGL ES 2.0.0 (ANGLE 2.1.4875 git hash: 32e78475b1c0)", + "ANGLE (NVIDIA Corporation, Quadro P1000/PCIe/SSE2, OpenGL 4.5.0 NVIDIA " + "390.77)", + 2, 0, true, true, false, false, "NVIDIA", "390.77"}, + {"OpenGL ES 2.0.0 (ANGLE 2.1.4875 git hash: 32e78475b1c0)", + "ANGLE (NVIDIA, Vulkan 1.0.65 (NVIDIA Quadro P1000 (0x00001CB1)), " + "NVIDIA-390.308.0)", + 2, 0, true, true, false, false, "NVIDIA", "390.308.0"}, + {"OpenGL ES 2.0.0 (ANGLE 2.1.4875 git hash: 32e78475b1c0)", + "ANGLE (Google, Vulkan 1.1.0 (SwiftShader Device (Subzero) " + "(0x0000C0DE)), SwiftShader driver-5.0.0)", + 2, 0, true, true, false, false, "Google", "5.0.0"}, }; gfx::ExtensionSet extensions; diff --git a/chromium/ui/gl/gl_visual_picker_glx.cc b/chromium/ui/gl/gl_visual_picker_glx.cc index f7ce65aebfa..abe58bdf274 100644 --- a/chromium/ui/gl/gl_visual_picker_glx.cc +++ b/chromium/ui/gl/gl_visual_picker_glx.cc @@ -12,6 +12,7 @@ #include "base/memory/singleton.h" #include "base/stl_util.h" +#include "ui/gfx/x/future.h" #include "ui/gl/gl_bindings.h" #include "ui/gl/gl_context.h" #include "ui/gl/gl_surface_glx.h" diff --git a/chromium/ui/gl/glx_util.cc b/chromium/ui/gl/glx_util.cc index 397e807a28f..a82815aab83 100644 --- a/chromium/ui/gl/glx_util.cc +++ b/chromium/ui/gl/glx_util.cc @@ -4,10 +4,9 @@ #include "ui/gl/glx_util.h" -#include <dlfcn.h> - #include "base/compiler_specific.h" #include "base/logging.h" +#include "ui/gfx/x/future.h" #include "ui/gfx/x/glx.h" #include "ui/gl/gl_bindings.h" @@ -62,13 +61,6 @@ x11::Glx::FbConfig GetConfigForWindow(x11::Connection* conn, return {}; } -NO_SANITIZE("cfi-icall") -void XlibFree(void* data) { - using xfree_type = void (*)(void*); - auto* xfree = reinterpret_cast<xfree_type>(dlsym(RTLD_DEFAULT, "XFree")); - xfree(data); -} - } // namespace GLXFBConfig GetFbConfigForWindow(x11::Connection* connection, @@ -89,7 +81,7 @@ GLXFBConfig GetGlxFbConfigForXProtoFbConfig(x11::Connection* connection, DCHECK_EQ(nitems, 1); DCHECK(glx_configs); GLXFBConfig glx_config = glx_configs[0]; - XlibFree(glx_configs); + x11::XlibFree(glx_configs); return glx_config; } diff --git a/chromium/ui/gl/hdr_metadata_helper_win.cc b/chromium/ui/gl/hdr_metadata_helper_win.cc index 14e16e9560f..7bae9b7af8f 100644 --- a/chromium/ui/gl/hdr_metadata_helper_win.cc +++ b/chromium/ui/gl/hdr_metadata_helper_win.cc @@ -9,7 +9,7 @@ namespace { // Magic constants to convert to fixed point. // https://docs.microsoft.com/en-us/windows/win32/api/dxgi1_5/ns-dxgi1_5-dxgi_hdr_metadata_hdr10 static constexpr int kPrimariesFixedPoint = 50000; -static constexpr int kLuminanceFixedPoint = 10000; +static constexpr int kMinLuminanceFixedPoint = 10000; } // namespace @@ -91,10 +91,9 @@ void HDRMetadataHelperWin::CacheDisplayMetadata( auto& white_point = desc_best.WhitePoint; metadata.WhitePoint[0] = white_point[0] * kPrimariesFixedPoint; metadata.WhitePoint[1] = white_point[1] * kPrimariesFixedPoint; - metadata.MaxMasteringLuminance = - desc_best.MaxLuminance * kLuminanceFixedPoint; + metadata.MaxMasteringLuminance = desc_best.MaxLuminance; metadata.MinMasteringLuminance = - desc_best.MinLuminance * kLuminanceFixedPoint; + desc_best.MinLuminance * kMinLuminanceFixedPoint; // It's unclear how to set these properly, so this is a guess. // Also note that these are not fixed-point. metadata.MaxContentLightLevel = desc_best.MaxFullFrameLuminance; @@ -121,9 +120,9 @@ DXGI_HDR_METADATA_HDR10 HDRMetadataHelperWin::HDRMetadataToDXGI( metadata.WhitePoint[0] = white_point.x() * kPrimariesFixedPoint; metadata.WhitePoint[1] = white_point.y() * kPrimariesFixedPoint; metadata.MaxMasteringLuminance = - hdr_metadata.mastering_metadata.luminance_max * kLuminanceFixedPoint; + hdr_metadata.mastering_metadata.luminance_max; metadata.MinMasteringLuminance = - hdr_metadata.mastering_metadata.luminance_min * kLuminanceFixedPoint; + hdr_metadata.mastering_metadata.luminance_min * kMinLuminanceFixedPoint; metadata.MaxContentLightLevel = hdr_metadata.max_content_light_level; metadata.MaxFrameAverageLightLevel = hdr_metadata.max_frame_average_light_level; diff --git a/chromium/ui/gl/hdr_metadata_helper_win_unittest.cc b/chromium/ui/gl/hdr_metadata_helper_win_unittest.cc index a7d9d6592ef..cef483843bf 100644 --- a/chromium/ui/gl/hdr_metadata_helper_win_unittest.cc +++ b/chromium/ui/gl/hdr_metadata_helper_win_unittest.cc @@ -115,7 +115,7 @@ TEST_F(HDRMetadataHelperWinTest, CachesMetadataIfAvailable) { EXPECT_TRUE(result); // From MSDN. static constexpr int kPrimariesFixedPoint = 50000; - static constexpr int kLuminanceFixedPoint = 10000; + static constexpr int kMinLuminanceFixedPoint = 10000; EXPECT_EQ(result->RedPrimary[0], static_cast<int>(desc.RedPrimary[0] * kPrimariesFixedPoint)); EXPECT_EQ(result->RedPrimary[1], @@ -133,9 +133,9 @@ TEST_F(HDRMetadataHelperWinTest, CachesMetadataIfAvailable) { EXPECT_EQ(result->WhitePoint[1], static_cast<int>(desc.WhitePoint[1] * kPrimariesFixedPoint)); EXPECT_EQ(result->MaxMasteringLuminance, - static_cast<unsigned>(desc.MaxLuminance * kLuminanceFixedPoint)); + static_cast<unsigned>(desc.MaxLuminance)); EXPECT_EQ(result->MinMasteringLuminance, - static_cast<unsigned>(desc.MinLuminance * kLuminanceFixedPoint)); + static_cast<unsigned>(desc.MinLuminance * kMinLuminanceFixedPoint)); EXPECT_EQ(result->MaxContentLightLevel, desc.MaxFullFrameLuminance); EXPECT_EQ(result->MaxFrameAverageLightLevel, desc.MaxFullFrameLuminance); } diff --git a/chromium/ui/gl/init/BUILD.gn b/chromium/ui/gl/init/BUILD.gn index a0013554bfe..e447744aa69 100644 --- a/chromium/ui/gl/init/BUILD.gn +++ b/chromium/ui/gl/init/BUILD.gn @@ -31,15 +31,16 @@ component("init") { public_deps = [ "//ui/gl" ] + if (use_static_angle) { + sources += [ "gl_initializer_angle.cc" ] + deps += [ "//third_party/angle:libEGL_static" ] + } + if (is_android) { sources += [ "gl_factory_android.cc", "gl_initializer_android.cc", ] - - if (use_static_angle) { - deps += [ "//third_party/angle:libEGL_static" ] - } } else if (is_win && !use_ozone) { sources += [ "gl_factory_win.cc", diff --git a/chromium/ui/gl/init/create_gr_gl_interface.cc b/chromium/ui/gl/init/create_gr_gl_interface.cc index f46b73dacee..b45925ea594 100644 --- a/chromium/ui/gl/init/create_gr_gl_interface.cc +++ b/chromium/ui/gl/init/create_gr_gl_interface.cc @@ -13,6 +13,10 @@ #include "ui/gl/gl_version_info.h" #include "ui/gl/progress_reporter.h" +#if defined(OS_APPLE) +#include "base/mac/mac_util.h" +#endif + namespace gl { namespace init { @@ -153,40 +157,49 @@ GrGLFunction<R GR_GL_FUNCTION_TYPE(Args...)> bind_slow_on_mac( template <bool droppable_call = false, typename R, typename... Args> GrGLFunction<R GR_GL_FUNCTION_TYPE(Args...)> bind_with_flush_on_mac( - R(GL_BINDING_CALL* func)(Args...)) { + R(GL_BINDING_CALL* func)(Args...), + bool is_angle) { #if defined(OS_APPLE) - return [func](Args... args) { - // Conditional may be optimized out because droppable_call is set at compile - // time. - if (!droppable_call || !HasInitializedNullDrawGLBindings()) { - { - TRACE_EVENT0( - "gpu", "CreateGrGLInterface - bind_with_flush_on_mac - beforefunc") - glFlush(); - } - func(args...); - { - TRACE_EVENT0("gpu", - "CreateGrGLInterface - bind_with_flush_on_mac - afterfunc") - glFlush(); + // If running on Apple silicon or ANGLE, regardless of the architecture, + // disable this workaround. See https://crbug.com/1131312. + const bool needs_flush = + base::mac::GetCPUType() == base::mac::CPUType::kIntel && !is_angle; + if (needs_flush) { + return [func](Args... args) { + // Conditional may be optimized out because droppable_call is set at + // compile time. + if (!droppable_call || !HasInitializedNullDrawGLBindings()) { + { + TRACE_EVENT0( + "gpu", + "CreateGrGLInterface - bind_with_flush_on_mac - beforefunc"); + glFlush(); + } + func(args...); + { + TRACE_EVENT0( + "gpu", + "CreateGrGLInterface - bind_with_flush_on_mac - afterfunc"); + glFlush(); + } } - } - }; -#else - return maybe_drop_call<droppable_call>(func); + }; + } #endif + return maybe_drop_call<droppable_call>(func); } template <bool droppable_call = false, typename R, typename... Args> GrGLFunction<R GR_GL_FUNCTION_TYPE(Args...)> bind_slow_with_flush_on_mac( R(GL_BINDING_CALL* func)(Args...), - gl::ProgressReporter* progress_reporter) { + gl::ProgressReporter* progress_reporter, + bool is_angle) { if (!progress_reporter) { - return bind_with_flush_on_mac<droppable_call>(func); + return bind_with_flush_on_mac<droppable_call>(func, is_angle); } - return [func, progress_reporter](Args... args) { + return [func, progress_reporter, is_angle](Args... args) { gl::ScopedProgressReporter scoped_reporter(progress_reporter); - return bind_with_flush_on_mac<droppable_call>(func)(args...); + return bind_with_flush_on_mac<droppable_call>(func, is_angle)(args...); }; } @@ -297,8 +310,8 @@ sk_sp<GrGLInterface> CreateGrGLInterface( functions->fBlendFunc = gl->glBlendFuncFn; functions->fBufferData = gl->glBufferDataFn; functions->fBufferSubData = gl->glBufferSubDataFn; - functions->fClear = - bind_slow_with_flush_on_mac<true>(gl->glClearFn, progress_reporter); + functions->fClear = bind_slow_with_flush_on_mac<true>( + gl->glClearFn, progress_reporter, version_info.is_angle); functions->fClearColor = gl->glClearColorFn; functions->fClearStencil = gl->glClearStencilFn; functions->fClearTexImage = gl->glClearTexImageFn; @@ -307,7 +320,7 @@ sk_sp<GrGLInterface> CreateGrGLInterface( functions->fCompileShader = bind_slow(gl->glCompileShaderFn, progress_reporter); functions->fCompressedTexImage2D = bind_slow_with_flush_on_mac( - gl->glCompressedTexImage2DFn, progress_reporter); + gl->glCompressedTexImage2DFn, progress_reporter, version_info.is_angle); functions->fCompressedTexSubImage2D = bind_slow(gl->glCompressedTexSubImage2DFn, progress_reporter); functions->fCopyTexSubImage2D = @@ -339,8 +352,8 @@ sk_sp<GrGLInterface> CreateGrGLInterface( functions->fDeleteQueries = gl->glDeleteQueriesFn; functions->fDeleteSamplers = gl->glDeleteSamplersFn; functions->fDeleteShader = bind_slow(gl->glDeleteShaderFn, progress_reporter); - functions->fDeleteTextures = - bind_slow_with_flush_on_mac(gl->glDeleteTexturesFn, progress_reporter); + functions->fDeleteTextures = bind_slow_with_flush_on_mac( + gl->glDeleteTexturesFn, progress_reporter, version_info.is_angle); functions->fDepthMask = gl->glDepthMaskFn; functions->fDisable = gl->glDisableFn; functions->fDisableVertexAttribArray = gl->glDisableVertexAttribArrayFn; @@ -455,16 +468,16 @@ sk_sp<GrGLInterface> CreateGrGLInterface( functions->fStencilOpSeparate = gl->glStencilOpSeparateFn; functions->fTexBuffer = gl->glTexBufferFn; functions->fTexBufferRange = gl->glTexBufferRangeFn; - functions->fTexImage2D = - bind_slow_with_flush_on_mac(gl->glTexImage2DFn, progress_reporter); + functions->fTexImage2D = bind_slow_with_flush_on_mac( + gl->glTexImage2DFn, progress_reporter, version_info.is_angle); functions->fTexParameterf = gl->glTexParameterfFn; functions->fTexParameterfv = gl->glTexParameterfvFn; functions->fTexParameteri = gl->glTexParameteriFn; functions->fTexParameteriv = gl->glTexParameterivFn; - functions->fTexStorage2D = - bind_slow_with_flush_on_mac(gl->glTexStorage2DEXTFn, progress_reporter); - functions->fTexSubImage2D = - bind_slow_with_flush_on_mac(gl->glTexSubImage2DFn, progress_reporter); + functions->fTexStorage2D = bind_slow_with_flush_on_mac( + gl->glTexStorage2DEXTFn, progress_reporter, version_info.is_angle); + functions->fTexSubImage2D = bind_slow_with_flush_on_mac( + gl->glTexSubImage2DFn, progress_reporter, version_info.is_angle); // GL 4.5 or GL_ARB_texture_barrier or GL_NV_texture_barrier // functions->fTextureBarrier = gl->glTextureBarrierFn; @@ -518,25 +531,26 @@ sk_sp<GrGLInterface> CreateGrGLInterface( functions->fGetRenderbufferParameteriv = gl->glGetRenderbufferParameterivEXTFn; functions->fBindFramebuffer = bind_slow_with_flush_on_mac( - gl->glBindFramebufferEXTFn, progress_reporter); + gl->glBindFramebufferEXTFn, progress_reporter, version_info.is_angle); functions->fFramebufferTexture2D = gl->glFramebufferTexture2DEXTFn; functions->fCheckFramebufferStatus = gl->glCheckFramebufferStatusEXTFn; functions->fDeleteFramebuffers = bind_slow_with_flush_on_mac( - gl->glDeleteFramebuffersEXTFn, progress_reporter); - functions->fRenderbufferStorage = - bind_with_flush_on_mac(gl->glRenderbufferStorageEXTFn); + gl->glDeleteFramebuffersEXTFn, progress_reporter, version_info.is_angle); + functions->fRenderbufferStorage = bind_with_flush_on_mac( + gl->glRenderbufferStorageEXTFn, version_info.is_angle); functions->fGenRenderbuffers = gl->glGenRenderbuffersEXTFn; - functions->fDeleteRenderbuffers = - bind_with_flush_on_mac(gl->glDeleteRenderbuffersEXTFn); + functions->fDeleteRenderbuffers = bind_with_flush_on_mac( + gl->glDeleteRenderbuffersEXTFn, version_info.is_angle); functions->fFramebufferRenderbuffer = gl->glFramebufferRenderbufferEXTFn; functions->fBindRenderbuffer = gl->glBindRenderbufferEXTFn; - functions->fRenderbufferStorageMultisample = - bind_with_flush_on_mac(gl->glRenderbufferStorageMultisampleFn); + functions->fRenderbufferStorageMultisample = bind_with_flush_on_mac( + gl->glRenderbufferStorageMultisampleFn, version_info.is_angle); functions->fFramebufferTexture2DMultisample = gl->glFramebufferTexture2DMultisampleEXTFn; - functions->fRenderbufferStorageMultisampleES2EXT = - bind_with_flush_on_mac(gl->glRenderbufferStorageMultisampleEXTFn); - functions->fBlitFramebuffer = bind_with_flush_on_mac(gl->glBlitFramebufferFn); + functions->fRenderbufferStorageMultisampleES2EXT = bind_with_flush_on_mac( + gl->glRenderbufferStorageMultisampleEXTFn, version_info.is_angle); + functions->fBlitFramebuffer = + bind_with_flush_on_mac(gl->glBlitFramebufferFn, version_info.is_angle); functions->fMatrixLoadf = gl->glMatrixLoadfEXTFn; functions->fMatrixLoadIdentity = gl->glMatrixLoadIdentityEXTFn; diff --git a/chromium/ui/gl/init/gl_factory.cc b/chromium/ui/gl/init/gl_factory.cc index d6494eb6de9..facdc5a4775 100644 --- a/chromium/ui/gl/init/gl_factory.cc +++ b/chromium/ui/gl/init/gl_factory.cc @@ -22,6 +22,8 @@ namespace init { namespace { +bool g_is_angle_enabled = true; + bool ShouldFallbackToSoftwareGL() { const base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); std::string requested_implementation_name = @@ -57,7 +59,7 @@ GLImplementation GetRequestedGLImplementation(bool* fallback_to_software_gl) { } // If the passthrough command decoder is enabled, put ANGLE first if allowed - if (gl::UsePassthroughCommandDecoder(cmd)) { + if (g_is_angle_enabled && gl::UsePassthroughCommandDecoder(cmd)) { auto iter = std::find(allowed_impls.begin(), allowed_impls.end(), kGLImplementationEGLANGLE); if (iter != allowed_impls.end()) { @@ -207,5 +209,10 @@ scoped_refptr<GLSurface> CreateOffscreenGLSurface(const gfx::Size& size) { return CreateOffscreenGLSurfaceWithFormat(size, GLSurfaceFormat()); } +void DisableANGLE() { + DCHECK_NE(GetGLImplementation(), kGLImplementationEGLANGLE); + g_is_angle_enabled = false; +} + } // namespace init } // namespace gl diff --git a/chromium/ui/gl/init/gl_factory.h b/chromium/ui/gl/init/gl_factory.h index f741c89b003..43028f7b43e 100644 --- a/chromium/ui/gl/init/gl_factory.h +++ b/chromium/ui/gl/init/gl_factory.h @@ -102,6 +102,9 @@ GL_INIT_EXPORT scoped_refptr<GLSurface> CreateOffscreenGLSurfaceWithFormat( GL_INIT_EXPORT void SetDisabledExtensionsPlatform( const std::string& disabled_extensions); +// Disable ANGLE and force to use native or other GL implementation. +GL_INIT_EXPORT void DisableANGLE(); + } // namespace init } // namespace gl diff --git a/chromium/ui/gl/init/gl_initializer.h b/chromium/ui/gl/init/gl_initializer.h index 4976093284e..4fa188883f9 100644 --- a/chromium/ui/gl/init/gl_initializer.h +++ b/chromium/ui/gl/init/gl_initializer.h @@ -5,6 +5,7 @@ #ifndef UI_GL_INIT_GL_INITIALIZER_H_ #define UI_GL_INIT_GL_INITIALIZER_H_ +#include "ui/gl/buildflags.h" #include "ui/gl/gl_implementation.h" namespace gl { @@ -22,6 +23,10 @@ bool InitializeGLOneOffPlatform(); // Initializes a particular GL implementation. bool InitializeStaticGLBindings(GLImplementation implementation); +#if BUILDFLAG(USE_STATIC_ANGLE) +bool InitializeStaticANGLEEGL(); +#endif // BUILDFLAG(USE_STATIC_ANGLE) + // Clears GL bindings for all implementations supported by platform. void ShutdownGLPlatform(); diff --git a/chromium/ui/gl/init/gl_initializer_android.cc b/chromium/ui/gl/init/gl_initializer_android.cc index 29af2d82da2..d1c269e9c91 100644 --- a/chromium/ui/gl/init/gl_initializer_android.cc +++ b/chromium/ui/gl/init/gl_initializer_android.cc @@ -9,31 +9,17 @@ #include "base/files/file_path.h" #include "base/logging.h" #include "base/native_library.h" -#include "ui/gl/buildflags.h" #include "ui/gl/gl_bindings.h" #include "ui/gl/gl_egl_api_implementation.h" #include "ui/gl/gl_gl_api_implementation.h" #include "ui/gl/gl_surface_egl.h" - -#if BUILDFLAG(USE_STATIC_ANGLE) -#include <EGL/egl.h> -#endif // BUILDFLAG(USE_STATIC_ANGLE) +#include "ui/gl/init/gl_initializer.h" namespace gl { namespace init { namespace { -#if BUILDFLAG(USE_STATIC_ANGLE) -bool InitializeStaticANGLEEGLInternal() { -#pragma push_macro("eglGetProcAddress") -#undef eglGetProcAddress - SetGLGetProcAddressProc(&eglGetProcAddress); -#pragma pop_macro("eglGetProcAddress") - return true; -} -#endif // BUILDFLAG(USE_STATIC_ANGLE) - bool InitializeStaticNativeEGLInternal() { base::NativeLibrary gles_library = LoadLibraryAndPrintError("libGLESv2.so"); if (!gles_library) @@ -68,7 +54,7 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) { #if BUILDFLAG(USE_STATIC_ANGLE) // Use ANGLE if it is requested and it is statically linked if (implementation == kGLImplementationEGLANGLE) { - initialized = InitializeStaticANGLEEGLInternal(); + initialized = InitializeStaticANGLEEGL(); } #endif // BUILDFLAG(USE_STATIC_ANGLE) diff --git a/chromium/ui/gl/init/gl_initializer_angle.cc b/chromium/ui/gl/init/gl_initializer_angle.cc new file mode 100644 index 00000000000..9e0b59b0591 --- /dev/null +++ b/chromium/ui/gl/init/gl_initializer_angle.cc @@ -0,0 +1,21 @@ +// Copyright 2020 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/gl/init/gl_initializer.h" + +#include <EGL/egl.h> + +namespace gl { +namespace init { + +bool InitializeStaticANGLEEGL() { +#pragma push_macro("eglGetProcAddress") +#undef eglGetProcAddress + SetGLGetProcAddressProc(&eglGetProcAddress); +#pragma pop_macro("eglGetProcAddress") + return true; +} + +} // namespace init +} // namespace gl diff --git a/chromium/ui/gl/init/gl_initializer_linux_x11.cc b/chromium/ui/gl/init/gl_initializer_linux_x11.cc index a5c030d5f3d..b1f21c4bf0e 100644 --- a/chromium/ui/gl/init/gl_initializer_linux_x11.cc +++ b/chromium/ui/gl/init/gl_initializer_linux_x11.cc @@ -11,7 +11,6 @@ #include "build/build_config.h" #include "ui/gfx/switches.h" #include "ui/gfx/x/connection.h" -#include "ui/gl/buildflags.h" #include "ui/gl/gl_bindings.h" #include "ui/gl/gl_egl_api_implementation.h" #include "ui/gl/gl_gl_api_implementation.h" @@ -20,6 +19,7 @@ #include "ui/gl/gl_surface_glx.h" #include "ui/gl/gl_switches.h" #include "ui/gl/init/gl_display_egl_util_x11.h" +#include "ui/gl/init/gl_initializer.h" namespace gl { namespace init { @@ -35,9 +35,6 @@ const char kGLLibraryName[] = "libGL.so.1"; const char kGLESv2LibraryName[] = "libGLESv2.so.2"; const char kEGLLibraryName[] = "libEGL.so.1"; -const char kGLESv2ANGLELibraryName[] = "libGLESv2.so"; -const char kEGLANGLELibraryName[] = "libEGL.so"; - #if BUILDFLAG(ENABLE_SWIFTSHADER) const char kGLESv2SwiftShaderLibraryName[] = "libGLESv2.so"; const char kEGLSwiftShaderLibraryName[] = "libEGL.so"; @@ -79,10 +76,9 @@ bool InitializeStaticGLXInternal() { return true; } -bool InitializeStaticEGLInternal(GLImplementation implementation) { +bool InitializeStaticEGLInternalFromLibrary(GLImplementation implementation) { base::FilePath glesv2_path(kGLESv2LibraryName); base::FilePath egl_path(kEGLLibraryName); - if (implementation == kGLImplementationSwiftShaderGL) { #if BUILDFLAG(ENABLE_SWIFTSHADER) base::FilePath module_path; @@ -96,12 +92,19 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) { return false; #endif } else if (implementation == kGLImplementationEGLANGLE) { +#if !BUILDFLAG(USE_STATIC_ANGLE) base::FilePath module_path; if (!base::PathService::Get(base::DIR_MODULE, &module_path)) return false; + const char kGLESv2ANGLELibraryName[] = "libGLESv2.so"; + const char kEGLANGLELibraryName[] = "libEGL.so"; + glesv2_path = module_path.Append(kGLESv2ANGLELibraryName); egl_path = module_path.Append(kEGLANGLELibraryName); +#else // BUILDFLAG(USE_STATIC_ANGLE) + NOTREACHED(); +#endif } base::NativeLibrary gles_library = LoadLibraryAndPrintError(glesv2_path); @@ -127,6 +130,25 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) { SetGLGetProcAddressProc(get_proc_address); AddGLNativeLibrary(egl_library); AddGLNativeLibrary(gles_library); + + return true; +} + +bool InitializeStaticEGLInternal(GLImplementation implementation) { +#if BUILDFLAG(USE_STATIC_ANGLE) + if (implementation == kGLImplementationEGLANGLE) { + // Use ANGLE if it is requested and it is statically linked + if (!InitializeStaticANGLEEGL()) + return false; + } else if (!InitializeStaticEGLInternalFromLibrary(implementation)) { + return false; + } +#else + if (!InitializeStaticEGLInternalFromLibrary(implementation)) { + return false; + } +#endif // !BUILDFLAG(USE_STATIC_ANGLE) + if (implementation == kGLImplementationEGLANGLE) { SetGLImplementation(kGLImplementationEGLANGLE); } else { diff --git a/chromium/ui/gl/init/gl_initializer_mac.cc b/chromium/ui/gl/init/gl_initializer_mac.cc index d8ad42a0755..f659291023a 100644 --- a/chromium/ui/gl/init/gl_initializer_mac.cc +++ b/chromium/ui/gl/init/gl_initializer_mac.cc @@ -16,13 +16,13 @@ #include "base/native_library.h" #include "base/path_service.h" #include "base/threading/thread_restrictions.h" -#include "ui/gl/buildflags.h" #include "ui/gl/gl_bindings.h" #include "ui/gl/gl_context.h" #include "ui/gl/gl_gl_api_implementation.h" #include "ui/gl/gl_implementation.h" #include "ui/gl/gl_surface.h" #include "ui/gl/gpu_switching_manager.h" +#include "ui/gl/init/gl_initializer.h" #if defined(USE_EGL) #include "ui/gl/gl_egl_api_implementation.h" @@ -97,7 +97,7 @@ const char kEGLANGLELibraryName[] = "libEGL.dylib"; const char kGLESv2SwiftShaderLibraryName[] = "libswiftshader_libGLESv2.dylib"; const char kEGLSwiftShaderLibraryName[] = "libswiftshader_libEGL.dylib"; -bool InitializeStaticEGLInternal(GLImplementation implementation) { +bool InitializeStaticEGLInternalFromLibrary(GLImplementation implementation) { // Some unit test targets depend on Angle/SwiftShader but aren't built // as app bundles. In that case, the .dylib is next to the executable. base::FilePath base_dir; @@ -123,6 +123,9 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) { } else { glesv2_path = base_dir.Append(kGLESv2ANGLELibraryName); egl_path = base_dir.Append(kEGLANGLELibraryName); +#if BUILDFLAG(USE_STATIC_ANGLE) + NOTREACHED(); +#endif } base::NativeLibrary gles_library = LoadLibraryAndPrintError(glesv2_path); @@ -152,8 +155,26 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) { // currently AddGLNativeLibrary(gles_library); AddGLNativeLibrary(egl_library); - SetGLImplementation(implementation); + return true; +} + +bool InitializeStaticEGLInternal(GLImplementation implementation) { +#if BUILDFLAG(USE_STATIC_ANGLE) + if (implementation == kGLImplementationEGLANGLE) { + // Use ANGLE if it is requested and it is statically linked + if (!InitializeStaticANGLEEGL()) + return false; + } else if (!InitializeStaticEGLInternalFromLibrary(implementation)) { + return false; + } +#else + if (!InitializeStaticEGLInternalFromLibrary(implementation)) { + return false; + } +#endif // !BUILDFLAG(USE_STATIC_ANGLE) + + SetGLImplementation(implementation); InitializeStaticGLBindingsGL(); InitializeStaticGLBindingsEGL(); diff --git a/chromium/ui/gl/init/gl_initializer_win.cc b/chromium/ui/gl/init/gl_initializer_win.cc index b369eb25585..8e3b73b0642 100644 --- a/chromium/ui/gl/init/gl_initializer_win.cc +++ b/chromium/ui/gl/init/gl_initializer_win.cc @@ -17,7 +17,6 @@ #include "base/threading/thread_restrictions.h" #include "base/trace_event/trace_event.h" #include "base/win/windows_version.h" -#include "ui/gl/buildflags.h" #include "ui/gl/gl_bindings.h" #include "ui/gl/gl_egl_api_implementation.h" #include "ui/gl/gl_gl_api_implementation.h" @@ -45,7 +44,7 @@ bool LoadD3DXLibrary(const base::FilePath& module_path, return true; } -bool InitializeStaticEGLInternal(GLImplementation implementation) { +bool InitializeStaticEGLInternalFromLibrary(GLImplementation implementation) { base::FilePath module_path; if (!base::PathService::Get(base::DIR_MODULE, &module_path)) return false; @@ -67,6 +66,9 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) { #endif } else { gles_path = module_path; +#if BUILDFLAG(USE_STATIC_ANGLE) + NOTREACHED(); +#endif } // Load libglesv2.dll before libegl.dll because the latter is dependent on @@ -103,8 +105,26 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) { SetGLGetProcAddressProc(get_proc_address); AddGLNativeLibrary(egl_library); AddGLNativeLibrary(gles_library); - SetGLImplementation(implementation); + return true; +} + +bool InitializeStaticEGLInternal(GLImplementation implementation) { +#if BUILDFLAG(USE_STATIC_ANGLE) + if (implementation == kGLImplementationEGLANGLE) { + // Use ANGLE if it is requested and it is statically linked + if (!InitializeStaticANGLEEGL()) + return false; + } else if (!InitializeStaticEGLInternalFromLibrary(implementation)) { + return false; + } +#else + if (!InitializeStaticEGLInternalFromLibrary(implementation)) { + return false; + } +#endif // !BUILDFLAG(USE_STATIC_ANGLE) + + SetGLImplementation(implementation); InitializeStaticGLBindingsGL(); InitializeStaticGLBindingsEGL(); diff --git a/chromium/ui/gl/swap_chain_presenter.cc b/chromium/ui/gl/swap_chain_presenter.cc index 0b4c1156a3f..bc8f30d0198 100644 --- a/chromium/ui/gl/swap_chain_presenter.cc +++ b/chromium/ui/gl/swap_chain_presenter.cc @@ -796,6 +796,7 @@ bool SwapChainPresenter::PresentToDecodeSwapChain( frames_since_color_space_change_); frames_since_color_space_change_ = 0; } + swap_chain_format_ = DXGI_FORMAT_NV12; RecordPresentationStatistics(); return true; } @@ -1086,9 +1087,9 @@ bool SwapChainPresenter::VideoProcessorBlt( // TODO(sunnyps): Ensure output color space for YUV swap chains is Rec709 or // Rec601 so that the conversion from gfx::ColorSpace to DXGI_COLOR_SPACE // doesn't need a |force_yuv| parameter (and the associated plumbing). - gfx::ColorSpace output_color_space = IsYUVSwapChainFormat(swap_chain_format_) - ? src_color_space - : gfx::ColorSpace::CreateSRGB(); + bool is_yuv_swapchain = IsYUVSwapChainFormat(swap_chain_format_); + gfx::ColorSpace output_color_space = + is_yuv_swapchain ? src_color_space : gfx::ColorSpace::CreateSRGB(); if (base::FeatureList::IsEnabled(kFallbackBT709VideoToBT601) && (output_color_space == gfx::ColorSpace::CreateREC709())) { output_color_space = gfx::ColorSpace::CreateREC601(); @@ -1096,17 +1097,48 @@ bool SwapChainPresenter::VideoProcessorBlt( if (content_is_hdr) output_color_space = gfx::ColorSpace::CreateHDR10(); - if (!layer_tree_->InitializeVideoProcessor( - content_rect.size(), swap_chain_size_, src_color_space, - output_color_space, swap_chain_, - IsYUVSwapChainFormat(swap_chain_format_))) { + VideoProcessorWrapper* video_processor_wrapper = + layer_tree_->InitializeVideoProcessor( + content_rect.size(), swap_chain_size_, output_color_space.IsHDR()); + if (!video_processor_wrapper) return false; - } Microsoft::WRL::ComPtr<ID3D11VideoContext> video_context = - layer_tree_->video_context(); + video_processor_wrapper->video_context; Microsoft::WRL::ComPtr<ID3D11VideoProcessor> video_processor = - layer_tree_->video_processor(); + video_processor_wrapper->video_processor; + + Microsoft::WRL::ComPtr<IDXGISwapChain3> swap_chain3; + Microsoft::WRL::ComPtr<ID3D11VideoContext1> context1; + if (SUCCEEDED(swap_chain_.As(&swap_chain3)) && + SUCCEEDED(video_context.As(&context1))) { + DCHECK(swap_chain3); + DCHECK(context1); + // Set input color space. + context1->VideoProcessorSetStreamColorSpace1( + video_processor.Get(), 0, + gfx::ColorSpaceWin::GetDXGIColorSpace(src_color_space)); + // Set output color space. + DXGI_COLOR_SPACE_TYPE output_dxgi_color_space = + gfx::ColorSpaceWin::GetDXGIColorSpace(output_color_space, + /*force_yuv=*/is_yuv_swapchain); + + if (SUCCEEDED(swap_chain3->SetColorSpace1(output_dxgi_color_space))) { + context1->VideoProcessorSetOutputColorSpace1(video_processor.Get(), + output_dxgi_color_space); + } + } else { + // This can't handle as many different types of color spaces, so use it + // only if ID3D11VideoContext1 isn't available. + D3D11_VIDEO_PROCESSOR_COLOR_SPACE src_d3d11_color_space = + gfx::ColorSpaceWin::GetD3D11ColorSpace(src_color_space); + video_context->VideoProcessorSetStreamColorSpace(video_processor.Get(), 0, + &src_d3d11_color_space); + D3D11_VIDEO_PROCESSOR_COLOR_SPACE output_d3d11_color_space = + gfx::ColorSpaceWin::GetD3D11ColorSpace(output_color_space); + video_context->VideoProcessorSetOutputColorSpace(video_processor.Get(), + &output_d3d11_color_space); + } Microsoft::WRL::ComPtr<ID3D11VideoContext2> context2; base::Optional<DXGI_HDR_METADATA_HDR10> display_metadata = layer_tree_->GetHDRMetadataHelper()->GetDisplayMetadata(); @@ -1140,9 +1172,10 @@ bool SwapChainPresenter::VideoProcessorBlt( } Microsoft::WRL::ComPtr<ID3D11VideoDevice> video_device = - layer_tree_->video_device(); + video_processor_wrapper->video_device; Microsoft::WRL::ComPtr<ID3D11VideoProcessorEnumerator> - video_processor_enumerator = layer_tree_->video_processor_enumerator(); + video_processor_enumerator = + video_processor_wrapper->video_processor_enumerator; D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC input_desc = {}; input_desc.ViewDimension = D3D11_VPIV_DIMENSION_TEXTURE2D; diff --git a/chromium/ui/gl/yuv_to_rgb_converter.cc b/chromium/ui/gl/yuv_to_rgb_converter.cc index 514290e282c..e6be831cfff 100644 --- a/chromium/ui/gl/yuv_to_rgb_converter.cc +++ b/chromium/ui/gl/yuv_to_rgb_converter.cc @@ -195,6 +195,10 @@ YUVToRGBConverter::YUVToRGBConverter(const GLVersionInfo& gl_version_info, g_current_gl_driver->ext.b_GL_ANGLE_get_tex_level_parameter; has_robust_resource_init_ = g_current_gl_driver->ext.b_GL_ANGLE_robust_resource_initialization; + + has_sampler_objects_ = gl_version_info.IsAtLeastGLES(3, 0) || + gl_version_info.IsAtLeastGL(3, 3) || + g_current_gl_driver->ext.b_GL_ARB_sampler_objects; } YUVToRGBConverter::~YUVToRGBConverter() { @@ -233,9 +237,19 @@ void YUVToRGBConverter::CopyYUV420ToRGB(unsigned target, GLint old_texture0_binding = -1; glActiveTexture(GL_TEXTURE0); glGetIntegerv(source_target_getter, &old_texture0_binding); + GLint old_sampler0_binding = -1; + if (has_sampler_objects_) { + glGetIntegerv(GL_SAMPLER_BINDING, &old_sampler0_binding); + glBindSampler(0, 0); + } GLint old_texture1_binding = -1; glActiveTexture(GL_TEXTURE1); glGetIntegerv(source_target_getter, &old_texture1_binding); + GLint old_sampler1_binding = -1; + if (has_sampler_objects_) { + glGetIntegerv(GL_SAMPLER_BINDING, &old_sampler1_binding); + glBindSampler(1, 0); + } // Allocate the rgb texture. glActiveTexture(old_active_texture); @@ -312,6 +326,10 @@ void YUVToRGBConverter::CopyYUV420ToRGB(unsigned target, glActiveTexture(GL_TEXTURE1); glBindTexture(source_texture_target_, old_texture1_binding); glActiveTexture(old_active_texture); + if (old_sampler0_binding > 0) + glBindSampler(0, old_sampler0_binding); + if (old_sampler1_binding > 0) + glBindSampler(1, old_sampler1_binding); } } // namespace gl diff --git a/chromium/ui/gl/yuv_to_rgb_converter.h b/chromium/ui/gl/yuv_to_rgb_converter.h index 28d47d44407..9be78a082f9 100644 --- a/chromium/ui/gl/yuv_to_rgb_converter.h +++ b/chromium/ui/gl/yuv_to_rgb_converter.h @@ -44,6 +44,7 @@ class YUVToRGBConverter { unsigned source_texture_target_ = 0; bool has_get_tex_level_parameter_ = false; bool has_robust_resource_init_ = false; + bool has_sampler_objects_ = false; }; } // namespace gl |