The Android BUG (V)- WebView plug surfaceView caused disorder
来源:互联网 发布:管家婆软件操作视频 编辑:程序博客网 时间:2024/06/11 20:55
The screen Android BUG (V)- WebView plug the use surfaceView caused Mansian
Before in debug flash 11 effect of ICS use (this version surfaceView, up and down the market, basically with nativeWindow)found a bug, bug phenomenon is shown in Figure 1 (visit http:/the/www.qiaqiafood.com, the body of the page is a flash):
Figure 1:Error pictures
Figure 2:Normal Image
Webpage loaded, no problem, but when the page drag up and down on the black area as shown in Figure 1, and the image display of cascading relationship is not normal.
The tracking process does not elaborate, and also spent a long time. On this issue:
Dump framebuffer data:
$Adb shell cat/dev/graphics/fb0>framebuffer.bin view the results, the framebuffer does flower, and consistent performance on the screen, which is not unexpected
2. Connected hierarchyviewer, analysis of the framebuffer, only to find that this is a good
3 the screencap-p/sdcard/screenshot.png found is also good
Phenomenon and reproducible method, next analyze the reasons.
The face of it, this problem with the drawing, is surfaceFlinger related. View state surfaceFlinger:
# Dumpsys SurfaceFlinger
Focus under BrowserActivity:
+ Layer 0x95cc0 (com.android.browser/com.android.browser.BrowserActivity)
z = 21025, pos = (0,0), size = (1024, 600), isOpaque = 0, needsDithering = 0, invalidate = 0, alpha = 0xff, flags = 0x00000000, tr = [1.00, 0.00][0.00, 1.00]
client = 0x918a8, identity = 40
format = 1, activeBuffer = [1024x 600:1024, 1], transform-hint = 0x00, queued-frames = 0
mBufferCount = 2, mSynchronousMode = 1, default-size = [1024x600], mPixelFormat = 1, mTexName = 3
current:{crop = [0,0, -1, -1], transform = 0x00, current = 1}
next:{crop = [0,0, -1, -1], transform = 0x00, FIFO (0)= {}}
[00]state = FREE, crop = [0,0, -1, -1], transform = 0x00, timestamp = 16875976105982, 0x919b0 [1024x600:1024, 1]
>[01]state = QUEUED, crop = [0,0, -1, -1], transform = 0x00, timestamp = 16877388086666, 0x8b6a0 [1024x600:1024, 1]
Region transparentRegion (this = 0x95e60, count = 1)
[0, 211, 1014, 715]
Region transparentRegionScreen (this = 0x95cf4, count = 1)
[0, 211, 1014, 715]
RegionvisibleRegionScreen (this = 0x95cd0, count = 2)
[0, 0, 1024, 211]
1014, 211, 1024, 552]
Careful analysis of the output can be a problem:the area ofthe browser is a transparent area:
0,211, 1014, 715]
This area the whole activity (corresponding Surface), is divided into two visible region:
[0, 0, 1024, 211]
1014, 211, 1024, 552]
Scroll the browser page, and then view state of BrowserActivity, twice as change with position coordinates of the transparent area is not even with the scroll!
Create and render the process down surfaceView found:
The Android the surfaceView (General Game the video and browserplugin use one kind of view)in its layout area will be set to transparent (that is, burrowing), but its setting is done only at the time of the attachWindow. Such problems caused:transparent area are not updated when a page scroll when this transparent region of the boundary after the final synthesis hwComposer boundary, and scroll the contents of the surface on, causing hwcomposer together wrong.
Know the problem, the solution can also know.
Routine practice:the every time layout traversal viewHierarchy of transparent reset have done too much, but the impact was more complex (yet to find a feasible method of modifying)
workaround practice:composer to hwComposer the area, can not be considered transparent area (the current test, have not seen will cause the system to have a bad impact), let it take all of the surface area calculated (theoretically efficiency may influential, but no observations impact)
Modify the method to comment out setGeometry@LayerBase.cpp in visibleRegionScreen the assignment:
hwcl->visibleRegionScreen.rects =
reinterpret_cast<hwc_rect_t const *>(
visibleRegionScreen.getArray (
&Hwcl->visibleRegionScreen.numRects));
As for hierarchyviewer and the screencap get screenshot Why is a good strategy?Here you can take a look at the screenshot realization (medium in surfaceFlinger), this screenshot and framebuffer synthesis is not the same thing, screenshot is not used hwcomposer just openGL each layer directly draw to FBO here burrow area actual calculation of the area and the workaround is not too bad.
In addition there are two problems:
1. The scroll window and the initial load flash (slower than pages), flash cover the navigation bar problem, as shown in Fig.
Figure 3:surfaceView overlap BrowserActivity
Web Scroll when flash content scroll and browser content synchronization problem, not synchronized region would have a black box.
Covered surfaceView default is placed on the surface in front of the browser, no solution, the solution can only be surfaceView on borwser behind (as I said before, because of the surface achieve burrow (transparent)function, in fact, on the back can be resolved)
Not synchronized, see the introduction of this year google IO webview on this surfaceView should......
- The Android BUG (V)- WebView plug surfaceView caused disorder
- Android monitor the plug/unplug of USB
- Android WebView findAll API Bug
- [A Weird Bug] caused by the name of Python script
- Android 2.3 WebView bug 之 position:fix
- Android 6.0以上系统webview的bug
- BUG 10008092 caused instance crash
- The project is using an unsupported version of the Android Gradle plug-in
- android SurfaceView
- Android SurfaceView
- android SurfaceView
- Android SurfaceView
- android SurfaceView
- Android SurfaceView
- Android SurfaceView
- Android SurfaceView
- Android - SurfaceView
- Android SurfaceView
- python使用TCP实现文件传输(CentOS6.4,python2.6测试通过)
- VIEW 有数据, BLOCK 却没有数据显示
- VC2008如何生成及使用DLL(完整版)
- Matlab的多线程工具-Timer对象
- Win7(64位)下,搭建Android开发环境
- The Android BUG (V)- WebView plug surfaceView caused disorder
- Android:数据库操作
- 怎么让你的Android手机访问你在电脑上发布的Tomcat项目
- C语言中sizeof与strlen区别
- ios中摄像头/相册获取图片,压缩图片,上传服务器方法
- VC6.0 工具->选项->目录 下Include files,Library files,Source files的另类更改方法
- 粒子系统1:简介&工具使用
- stream benchmark 的使用
- 动规-Buy Low, Buy Lower