Commit f4672b22 authored by Sean Gilhuly's avatar Sean Gilhuly Committed by Commit Bot

SkiaRenderer Dawn: Use old swapchain API

The new Dawn swapchain API is not implemented yet. Use the old swapchain
path by passing a null wgpu::Surface to CreateSwapChain().

The bug for implementing the new API is https://crbug.com/dawn/269.

Bug: 1021566
Change-Id: I76306856cca919a4e2ef131087163204f41f91ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2075458Reviewed-by: default avatarkylechar <kylechar@chromium.org>
Commit-Queue: Sean Gilhuly <sgilhuly@chromium.org>
Cr-Commit-Position: refs/heads/master@{#744785}
parent e705a64d
......@@ -57,9 +57,9 @@ bool SkiaOutputDeviceDawn::Reshape(const gfx::Size& size,
CreateSwapChainImplementation();
wgpu::SwapChainDescriptor desc;
desc.implementation = reinterpret_cast<int64_t>(&swap_chain_implementation_);
wgpu::Instance instance = context_provider_->GetInstance();
wgpu::Surface surface = instance.CreateSurface(nullptr);
swap_chain_ = context_provider_->GetDevice().CreateSwapChain(surface, &desc);
// TODO(sgilhuly): Use a wgpu::Surface in this call once the Surface-based
// SwapChain API is ready.
swap_chain_ = context_provider_->GetDevice().CreateSwapChain(nullptr, &desc);
if (!swap_chain_)
return false;
swap_chain_.Configure(kSwapChainFormat, kUsage, size_.width(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment