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(
|
||||
GrRenderTarget* rt, GrSurfaceOrigin origin, const SkRect& bounds,
|
||||
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));
|
||||
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,
|
||||
GrColorType textureColorType, GrColorType bufferColorType,
|
||||
const GrMipLevel texels[], int mipLevelCount) {
|
||||
GrColorType surfaceColorType, GrColorType srcColorType,
|
||||
const GrMipLevel texels[], int mipLevelCount,
|
||||
bool prepForTexSampling) {
|
||||
GrDawnTexture* texture = static_cast<GrDawnTexture*>(surface->asTexture());
|
||||
if (!texture) {
|
||||
SkASSERT(!"uploading to non-texture unimplemented");
|
||||
|
@ -62,7 +62,8 @@ public:
|
||||
GrOpsRenderPass* getOpsRenderPass(
|
||||
GrRenderTarget*, GrSurfaceOrigin, const SkRect& bounds,
|
||||
const GrOpsRenderPass::LoadAndStoreInfo&,
|
||||
const GrOpsRenderPass::StencilLoadAndStoreInfo&) override;
|
||||
const GrOpsRenderPass::StencilLoadAndStoreInfo&,
|
||||
const SkTArray<GrTextureProxy*, true>& sampledProxies) override;
|
||||
|
||||
SkSL::Compiler* shaderCompiler() const {
|
||||
return fCompiler.get();
|
||||
@ -134,8 +135,9 @@ private:
|
||||
size_t rowBytes) override;
|
||||
|
||||
bool onWritePixels(GrSurface* surface, int left, int top, int width, int height,
|
||||
GrColorType surfaceColorType, GrColorType dstColorType,
|
||||
const GrMipLevel texels[], int mipLevelCount) override;
|
||||
GrColorType surfaceColorType, GrColorType srcColorType,
|
||||
const GrMipLevel texels[], int mipLevelCount,
|
||||
bool prepForTexSampling) override;
|
||||
|
||||
bool onTransferPixelsTo(GrTexture*, int left, int top, int width, int height,
|
||||
GrColorType textureColorType, GrColorType bufferColorType,
|
||||
|
@ -233,6 +233,10 @@ GrGLSLUniformHandler::UniformHandle GrDawnUniformHandler::internalAddUniformArra
|
||||
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,
|
||||
const GrSamplerState&,
|
||||
const GrSwizzle& swizzle,
|
||||
|
@ -47,6 +47,8 @@ private:
|
||||
int arrayCount,
|
||||
const char** outName) override;
|
||||
|
||||
void updateUniformVisibility(UniformHandle u, uint32_t visibility) override;
|
||||
|
||||
UniformInfoArray fUniforms;
|
||||
UniformInfoArray fSamplers;
|
||||
UniformInfoArray fTextures;
|
||||
|
Loading…
Reference in New Issue
Block a user