特殊需求,对Android的输出图像做镜像翻转。
Screen convert
翻转x修改
源码:frameworks/native/services/surfaceflinger/RenderEngine/ProgramCache.cpp
String8 ProgramCache::generateVertexShader(const Key& needs) {
Formatter vs;
if (needs.isTexturing()) {
vs << "attribute vec4 texCoords;"
<< "varying vec2 outTexCoords;";
}
vs << "attribute vec4 position;"
<< "uniform mat4 projection;"
<<

本文介绍了如何针对Android 9.0(Pie)系统,通过修改SurfaceFlinger的源码来实现屏幕输出图像的X轴镜像翻转,详细讨论了相关的关键步骤和代码修改。
最低0.47元/天 解锁文章
1035





