Loading libs/renderengine/skia/AutoBackendTexture.cpp +32 −8 Original line number Diff line number Diff line Loading @@ -86,14 +86,38 @@ void AutoBackendTexture::releaseImageProc(SkImage::ReleaseContext releaseContext void logFatalTexture(const char* msg, const GrBackendTexture& tex, ui::Dataspace dataspace, SkColorType colorType) { switch (tex.backend()) { case GrBackendApi::kOpenGL: { GrGLTextureInfo textureInfo; bool retrievedTextureInfo = tex.getGLTextureInfo(&textureInfo); LOG_ALWAYS_FATAL("%s isTextureValid:%d dataspace:%d" "\n\tGrBackendTexture: (%i x %i) hasMipmaps: %i isProtected: %i texType: %i" "\n\t\tGrGLTextureInfo: success: %i fTarget: %u fFormat: %u colorType %i", msg, tex.isValid(), dataspace, tex.width(), tex.height(), tex.hasMipmaps(), tex.isProtected(), static_cast<int>(tex.textureType()), retrievedTextureInfo, "\n\tGrBackendTexture: (%i x %i) hasMipmaps: %i isProtected: %i " "texType: %i\n\t\tGrGLTextureInfo: success: %i fTarget: %u fFormat: %u" " colorType %i", msg, tex.isValid(), dataspace, tex.width(), tex.height(), tex.hasMipmaps(), tex.isProtected(), static_cast<int>(tex.textureType()), retrievedTextureInfo, textureInfo.fTarget, textureInfo.fFormat, colorType); break; } case GrBackendApi::kVulkan: { GrVkImageInfo imageInfo; bool retrievedImageInfo = tex.getVkImageInfo(&imageInfo); LOG_ALWAYS_FATAL("%s isTextureValid:%d dataspace:%d" "\n\tGrBackendTexture: (%i x %i) hasMipmaps: %i isProtected: %i " "texType: %i\n\t\tVkImageInfo: success: %i fFormat: %i " "fSampleCount: %u fLevelCount: %u colorType %i", msg, tex.isValid(), dataspace, tex.width(), tex.height(), tex.hasMipmaps(), tex.isProtected(), static_cast<int>(tex.textureType()), retrievedImageInfo, imageInfo.fFormat, imageInfo.fSampleCount, imageInfo.fLevelCount, colorType); break; } default: LOG_ALWAYS_FATAL("%s Unexpected backend %u", msg, static_cast<unsigned>(tex.backend())); break; } } sk_sp<SkImage> AutoBackendTexture::makeImage(ui::Dataspace dataspace, SkAlphaType alphaType, Loading libs/renderengine/skia/SkiaRenderEngine.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -665,6 +665,8 @@ void SkiaRenderEngine::drawLayersInternal( validateOutputBufferUsage(buffer->getBuffer()); auto grContext = getActiveGrContext(); LOG_ALWAYS_FATAL_IF(grContext->abandoned(), "GrContext is abandoned/device lost at start of %s", __func__); // any AutoBackendTexture deletions will now be deferred until cleanupPostRender is called DeferTextureCleanup dtc(mTextureCleanupMgr); Loading Loading
libs/renderengine/skia/AutoBackendTexture.cpp +32 −8 Original line number Diff line number Diff line Loading @@ -86,14 +86,38 @@ void AutoBackendTexture::releaseImageProc(SkImage::ReleaseContext releaseContext void logFatalTexture(const char* msg, const GrBackendTexture& tex, ui::Dataspace dataspace, SkColorType colorType) { switch (tex.backend()) { case GrBackendApi::kOpenGL: { GrGLTextureInfo textureInfo; bool retrievedTextureInfo = tex.getGLTextureInfo(&textureInfo); LOG_ALWAYS_FATAL("%s isTextureValid:%d dataspace:%d" "\n\tGrBackendTexture: (%i x %i) hasMipmaps: %i isProtected: %i texType: %i" "\n\t\tGrGLTextureInfo: success: %i fTarget: %u fFormat: %u colorType %i", msg, tex.isValid(), dataspace, tex.width(), tex.height(), tex.hasMipmaps(), tex.isProtected(), static_cast<int>(tex.textureType()), retrievedTextureInfo, "\n\tGrBackendTexture: (%i x %i) hasMipmaps: %i isProtected: %i " "texType: %i\n\t\tGrGLTextureInfo: success: %i fTarget: %u fFormat: %u" " colorType %i", msg, tex.isValid(), dataspace, tex.width(), tex.height(), tex.hasMipmaps(), tex.isProtected(), static_cast<int>(tex.textureType()), retrievedTextureInfo, textureInfo.fTarget, textureInfo.fFormat, colorType); break; } case GrBackendApi::kVulkan: { GrVkImageInfo imageInfo; bool retrievedImageInfo = tex.getVkImageInfo(&imageInfo); LOG_ALWAYS_FATAL("%s isTextureValid:%d dataspace:%d" "\n\tGrBackendTexture: (%i x %i) hasMipmaps: %i isProtected: %i " "texType: %i\n\t\tVkImageInfo: success: %i fFormat: %i " "fSampleCount: %u fLevelCount: %u colorType %i", msg, tex.isValid(), dataspace, tex.width(), tex.height(), tex.hasMipmaps(), tex.isProtected(), static_cast<int>(tex.textureType()), retrievedImageInfo, imageInfo.fFormat, imageInfo.fSampleCount, imageInfo.fLevelCount, colorType); break; } default: LOG_ALWAYS_FATAL("%s Unexpected backend %u", msg, static_cast<unsigned>(tex.backend())); break; } } sk_sp<SkImage> AutoBackendTexture::makeImage(ui::Dataspace dataspace, SkAlphaType alphaType, Loading
libs/renderengine/skia/SkiaRenderEngine.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -665,6 +665,8 @@ void SkiaRenderEngine::drawLayersInternal( validateOutputBufferUsage(buffer->getBuffer()); auto grContext = getActiveGrContext(); LOG_ALWAYS_FATAL_IF(grContext->abandoned(), "GrContext is abandoned/device lost at start of %s", __func__); // any AutoBackendTexture deletions will now be deferred until cleanupPostRender is called DeferTextureCleanup dtc(mTextureCleanupMgr); Loading