1

在 Android4.4 hwui 中,我得到了 opengl 错误日志:

来自 OpenGLRenderer 的 GL 错误:0x0506

错误是GL_INVALID_FRAMEBUFFER_OPERATION,我想也许fbo有一些错误,但是android hwui代码,我们没有修改它。

该错误会使Launcher图标绘制错误,或使图标为黑色,但该错误不容易出现,我也不知道如何让它重新出现,它会在不经意间出现。

4

1 回答 1

0
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java  
index d212786..239c235 100644  
--- a/core/java/android/view/View.java  
+++ b/core/java/android/view/View.java  
@@ -13152,6 +13152,23 @@ public class View implements Drawable.Callback, KeyEvent.Callback,  

                 invalidate(true);  
                 invalidateParentCaches();  
+            } else if (info != null && info.mHardwareRenderer != null) {  
+                // If fall into this path, means the hardware render has  
+                // already been disabled. Destroy it in a safely context  
+                // to avoid random UI corruption  
+                info.mHardwareRenderer.safelyRun(new Runnable() {  
+                    @Override  
+                    public void run() {  
+                        mHardwareLayer.destroy();  
+                        mHardwareLayer = null;  
+  
+                        if (mDisplayList != null) {  
+                            mDisplayList.reset();  
+                        }  
+                        invalidate(true);  
+                        invalidateParentCaches();  
+                    }  
+                });  
             }  
             return true;  
         }  

来自 Android bug——Launcher 0x506 。希望能帮到你。:)

于 2014-08-10T08:52:39.300 回答