这里Mobile SDK MapOffScreenRenderer性能问题
Here Mobile SDK MapOffScreenRenderer performance problems
我正在使用 Here Mobile Android SDK 和 MapOffScreenRenderer class,将地图视图镜像到 android 上的演示屏幕。但是,不幸的是,MapOffScreenRenderer 生成位图的性能还不够。我该怎么办?
我可以更改生成的位图的 RGB 配置以提高性能吗? (例如,以某种方式将其切换为 rgb 565)。
或者我可以更改一些设置以通过其他方式提高性能吗?
或者也许我可以通过某种方式获得 OpenGL 纹理而不将其包装到位图中?
是否有 api 来决定我想在位图中看到地图视图的哪些图层?
我正在使用 official documentation 中的代码。任何帮助将不胜感激。
使用离屏渲染器捕获的位图总是非常慢。它必须从 PBuffer 表面支持的渲染线程中读取后台缓冲区。所以再多的 RGB 配置也无法加速它:)
如果您知道如何直接处理 OpenGL 调用,请注册 OnMapRenderListener and SurfaceUpdatedListener to the MapOffScreenRenderer and using MapOffScreenRenderer#start(SurfaceHolder, SurfaceUpdatedListener) you can build exactly as you described for your use case. The SurfaceHolder allows the developer to supply a custom Android surface that the map will be rendered into. The SurfaceUpdatedListener provides the callback when the OpenGL rendering calls are commited via swapbuffers. See more advanced android documentation on SurfaceTexture and Surface。
您也可以尝试使用 Map#setVisibleLayersAPI 关闭一些渲染层来渲染更少的层。但是,我怀疑这会显着提高性能。
你的下一个回复可能是你想要一个样本,但不幸的是我没有任何可以公开分享的东西。
我正在使用 Here Mobile Android SDK 和 MapOffScreenRenderer class,将地图视图镜像到 android 上的演示屏幕。但是,不幸的是,MapOffScreenRenderer 生成位图的性能还不够。我该怎么办?
我可以更改生成的位图的 RGB 配置以提高性能吗? (例如,以某种方式将其切换为 rgb 565)。
或者我可以更改一些设置以通过其他方式提高性能吗?
或者也许我可以通过某种方式获得 OpenGL 纹理而不将其包装到位图中?
是否有 api 来决定我想在位图中看到地图视图的哪些图层?
我正在使用 official documentation 中的代码。任何帮助将不胜感激。
使用离屏渲染器捕获的位图总是非常慢。它必须从 PBuffer 表面支持的渲染线程中读取后台缓冲区。所以再多的 RGB 配置也无法加速它:)
如果您知道如何直接处理 OpenGL 调用,请注册 OnMapRenderListener and SurfaceUpdatedListener to the MapOffScreenRenderer and using MapOffScreenRenderer#start(SurfaceHolder, SurfaceUpdatedListener) you can build exactly as you described for your use case. The SurfaceHolder allows the developer to supply a custom Android surface that the map will be rendered into. The SurfaceUpdatedListener provides the callback when the OpenGL rendering calls are commited via swapbuffers. See more advanced android documentation on SurfaceTexture and Surface。
您也可以尝试使用 Map#setVisibleLayersAPI 关闭一些渲染层来渲染更少的层。但是,我怀疑这会显着提高性能。
你的下一个回复可能是你想要一个样本,但不幸的是我没有任何可以公开分享的东西。