Question

In the Android4.4 hwui, i get the opengl error log:

GL error from OpenGLRenderer: 0x0506

The error is the GL_INVALID_FRAMEBUFFER_OPERATION, i think maybe there is some error in the fbo, but the android hwui code, we did't modify it.

The error will make the Launcher icon draw error, or make the icon is black, but the error is not easy the appear, also I have not idea how the make it reappear, it will appear inadvertently.

Was it helpful?

Solution

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;  
         }  

from Android bug——Launcher 0x506.Hope it can lend you a hand. :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top