Update Dawn backend to accommodate recent Skia API changes.
Change-Id: Ib0667fbff9a16fe796378134a17008ece6267d06 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240508 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
This commit is contained in:
parent
78be3ebee7
commit
2adbf9ce1c
@ -119,7 +119,8 @@ void GrDawnGpu::disconnect(DisconnectType type) {
|
|||||||
GrOpsRenderPass* GrDawnGpu::getOpsRenderPass(
|
GrOpsRenderPass* GrDawnGpu::getOpsRenderPass(
|
||||||
GrRenderTarget* rt, GrSurfaceOrigin origin, const SkRect& bounds,
|
GrRenderTarget* rt, GrSurfaceOrigin origin, const SkRect& bounds,
|
||||||
const GrOpsRenderPass::LoadAndStoreInfo& colorInfo,
|
const GrOpsRenderPass::LoadAndStoreInfo& colorInfo,
|
||||||
const GrOpsRenderPass::StencilLoadAndStoreInfo& stencilInfo) {
|
const GrOpsRenderPass::StencilLoadAndStoreInfo& stencilInfo,
|
||||||
|
const SkTArray<GrTextureProxy*, true>& sampledProxies) {
|
||||||
fOpsRenderPass.reset(new GrDawnOpsRenderPass(this, rt, origin, colorInfo, stencilInfo));
|
fOpsRenderPass.reset(new GrDawnOpsRenderPass(this, rt, origin, colorInfo, stencilInfo));
|
||||||
return fOpsRenderPass.get();
|
return fOpsRenderPass.get();
|
||||||
}
|
}
|
||||||
@ -136,8 +137,9 @@ sk_sp<GrGpuBuffer> GrDawnGpu::onCreateBuffer(size_t size, GrGpuBufferType type,
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
bool GrDawnGpu::onWritePixels(GrSurface* surface, int left, int top, int width, int height,
|
bool GrDawnGpu::onWritePixels(GrSurface* surface, int left, int top, int width, int height,
|
||||||
GrColorType textureColorType, GrColorType bufferColorType,
|
GrColorType surfaceColorType, GrColorType srcColorType,
|
||||||
const GrMipLevel texels[], int mipLevelCount) {
|
const GrMipLevel texels[], int mipLevelCount,
|
||||||
|
bool prepForTexSampling) {
|
||||||
GrDawnTexture* texture = static_cast<GrDawnTexture*>(surface->asTexture());
|
GrDawnTexture* texture = static_cast<GrDawnTexture*>(surface->asTexture());
|
||||||
if (!texture) {
|
if (!texture) {
|
||||||
SkASSERT(!"uploading to non-texture unimplemented");
|
SkASSERT(!"uploading to non-texture unimplemented");
|
||||||
|
@ -62,7 +62,8 @@ public:
|
|||||||
GrOpsRenderPass* getOpsRenderPass(
|
GrOpsRenderPass* getOpsRenderPass(
|
||||||
GrRenderTarget*, GrSurfaceOrigin, const SkRect& bounds,
|
GrRenderTarget*, GrSurfaceOrigin, const SkRect& bounds,
|
||||||
const GrOpsRenderPass::LoadAndStoreInfo&,
|
const GrOpsRenderPass::LoadAndStoreInfo&,
|
||||||
const GrOpsRenderPass::StencilLoadAndStoreInfo&) override;
|
const GrOpsRenderPass::StencilLoadAndStoreInfo&,
|
||||||
|
const SkTArray<GrTextureProxy*, true>& sampledProxies) override;
|
||||||
|
|
||||||
SkSL::Compiler* shaderCompiler() const {
|
SkSL::Compiler* shaderCompiler() const {
|
||||||
return fCompiler.get();
|
return fCompiler.get();
|
||||||
@ -134,8 +135,9 @@ private:
|
|||||||
size_t rowBytes) override;
|
size_t rowBytes) override;
|
||||||
|
|
||||||
bool onWritePixels(GrSurface* surface, int left, int top, int width, int height,
|
bool onWritePixels(GrSurface* surface, int left, int top, int width, int height,
|
||||||
GrColorType surfaceColorType, GrColorType dstColorType,
|
GrColorType surfaceColorType, GrColorType srcColorType,
|
||||||
const GrMipLevel texels[], int mipLevelCount) override;
|
const GrMipLevel texels[], int mipLevelCount,
|
||||||
|
bool prepForTexSampling) override;
|
||||||
|
|
||||||
bool onTransferPixelsTo(GrTexture*, int left, int top, int width, int height,
|
bool onTransferPixelsTo(GrTexture*, int left, int top, int width, int height,
|
||||||
GrColorType textureColorType, GrColorType bufferColorType,
|
GrColorType textureColorType, GrColorType bufferColorType,
|
||||||
|
@ -233,6 +233,10 @@ GrGLSLUniformHandler::UniformHandle GrDawnUniformHandler::internalAddUniformArra
|
|||||||
return GrGLSLUniformHandler::UniformHandle(fUniforms.count() - 1);
|
return GrGLSLUniformHandler::UniformHandle(fUniforms.count() - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GrDawnUniformHandler::updateUniformVisibility(UniformHandle u, uint32_t visibility) {
|
||||||
|
fUniforms[u.toIndex()].fVisibility |= visibility;
|
||||||
|
}
|
||||||
|
|
||||||
GrGLSLUniformHandler::SamplerHandle GrDawnUniformHandler::addSampler(const GrTexture* texture,
|
GrGLSLUniformHandler::SamplerHandle GrDawnUniformHandler::addSampler(const GrTexture* texture,
|
||||||
const GrSamplerState&,
|
const GrSamplerState&,
|
||||||
const GrSwizzle& swizzle,
|
const GrSwizzle& swizzle,
|
||||||
|
@ -47,6 +47,8 @@ private:
|
|||||||
int arrayCount,
|
int arrayCount,
|
||||||
const char** outName) override;
|
const char** outName) override;
|
||||||
|
|
||||||
|
void updateUniformVisibility(UniformHandle u, uint32_t visibility) override;
|
||||||
|
|
||||||
UniformInfoArray fUniforms;
|
UniformInfoArray fUniforms;
|
||||||
UniformInfoArray fSamplers;
|
UniformInfoArray fSamplers;
|
||||||
UniformInfoArray fTextures;
|
UniformInfoArray fTextures;
|
||||||
|
Loading…
Reference in New Issue
Block a user