diff options
Diffstat (limited to 'core/java/android')
-rw-r--r-- | core/java/android/view/GLES20Canvas.java | 12 | ||||
-rw-r--r-- | core/java/android/view/ViewGroup.java | 3 |
2 files changed, 14 insertions, 1 deletions
diff --git a/core/java/android/view/GLES20Canvas.java b/core/java/android/view/GLES20Canvas.java index a410aa9..ceea9f8 100644 --- a/core/java/android/view/GLES20Canvas.java +++ b/core/java/android/view/GLES20Canvas.java @@ -179,6 +179,18 @@ class GLES20Canvas extends HardwareCanvas { private static native void nSetHighContrastText(long renderer, boolean highContrastText); @Override + public void insertReorderBarrier() { + nInsertReorderBarrier(mRenderer, true); + } + + @Override + public void insertInorderBarrier() { + nInsertReorderBarrier(mRenderer, false); + } + + private static native void nInsertReorderBarrier(long renderer, boolean enableReorder); + + @Override public int onPreDraw(Rect dirty) { if (dirty != null) { return nPrepareDirty(mRenderer, dirty.left, dirty.top, dirty.right, dirty.bottom, diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index 19dd583..854e6be 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -3072,7 +3072,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager boolean more = false; final long drawingTime = getDrawingTime(); - + if (usingRenderNodeProperties) canvas.insertReorderBarrier(); // Only use the preordered list if not HW accelerated, since the HW pipeline will do the // draw reordering internally final ArrayList<View> preorderedList = usingRenderNodeProperties @@ -3099,6 +3099,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager more |= drawChild(canvas, child, drawingTime); } } + if (usingRenderNodeProperties) canvas.insertInorderBarrier(); if (debugDraw()) { onDebugDraw(canvas); |