简体   繁体   English

NEXUS 5棒棒糖5.1 SurfaceFlinger错误

[英]NEXUS 5 lollipop 5.1 SurfaceFlinger error

Hello there? 你好? There is one question. 有一个问题。 nexus5 lollipop5.1's issue. nexus5 lollipop5.1的问题。 surfaceflinger there is a code that comes in response to the device screen information in ScreenshotClient update by using. surfaceflinger中有一个代码可通过使用来响应ScreenshotClient更新中的设备屏幕信息。 The code looks like the following. 该代码如下所示。

unsigned int sw, sh, xsize, gsize, stride;
... ...
ScreenshotClient sc;

sp<IBinder> display = SurfaceComposerClient::getBuiltInDisplay(ISurfaceComposer::eDisplayIdMain);

if( sc.update(display,Rect(), sw,sh, false) != NO_ERROR) {
    ... ...

    sc.release();

    return 0;
}
stride = sc.getStride();

mapbase = sc.getPixels();
... ...

The above code, in other lollipop version is operating normally. 上面的代码在其他棒棒糖版本中运行正常。 Of course, nexus7 the same version also operate normally. 当然,nexus7的相同版本也可以正常运行。 However, the change in nexus5. 但是,nexus5的变化。 My code to reference, but continue to code loop is. 我的代码可以参考,但是继续循环代码就是。 And because you try to get to continue the screen. 并且因为您尝试继续屏幕。 First I code in nexus5 is operating normally. 首先我在nexus5中的代码正常运行。 However, when a certain count is, update is not came under the other screen to return the error. 但是,当达到一定数量时,其他屏幕下不会进行更新以返回错误。 More ...! 更多 ...! After complete finished my code, re-run, after it is another well, the same phenomenon occurs when it comes to a certain number. 完成我的代码后,重新运行,在另一口井之后,当达到一定数量时也会发生相同的现象。 If you are ability who know about this? 如果您有能力知道这一点?

I'm sorry it is not so good in English. 抱歉,英语不是很好。

I had solve. 我解决了。 ScreenshotClient sc and sp < IBinder > display should be declared as a global variable. 应该将ScreenshotClient scsp <IBinder>显示声明为全局变量。 If the class is declared error occurs several times. 如果声明了该类,则会发生多次错误。 (example. It declared in the function to be repeated.) (示例。在函数中声明要重复。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM