diff options
-rw-r--r-- | core/java/android/view/VelocityTracker.java | 8 | ||||
-rw-r--r-- | libs/hwui/OpenGLRenderer.cpp | 21 |
2 files changed, 12 insertions, 17 deletions
diff --git a/core/java/android/view/VelocityTracker.java b/core/java/android/view/VelocityTracker.java index b1fdec8..4ab2881 100644 --- a/core/java/android/view/VelocityTracker.java +++ b/core/java/android/view/VelocityTracker.java @@ -387,7 +387,7 @@ public final class VelocityTracker implements Poolable<VelocityTracker> { return pointer != null ? pointer.yVelocity : 0; } - private final Pointer getPointer(int id) { + private Pointer getPointer(int id) { for (Pointer pointer = mPointerListHead; pointer != null; pointer = pointer.next) { if (pointer.id == id) { return pointer; @@ -396,7 +396,7 @@ public final class VelocityTracker implements Poolable<VelocityTracker> { return null; } - private static final Pointer obtainPointer() { + private static Pointer obtainPointer() { synchronized (sPool) { if (sRecycledPointerCount != 0) { Pointer element = sRecycledPointerListHead; @@ -409,7 +409,7 @@ public final class VelocityTracker implements Poolable<VelocityTracker> { return new Pointer(); } - private static final void releasePointer(Pointer pointer) { + private static void releasePointer(Pointer pointer) { synchronized (sPool) { if (sRecycledPointerCount < POINTER_POOL_CAPACITY) { pointer.next = sRecycledPointerListHead; @@ -419,7 +419,7 @@ public final class VelocityTracker implements Poolable<VelocityTracker> { } } - private static final void releasePointerList(Pointer pointer) { + private static void releasePointerList(Pointer pointer) { if (pointer != null) { synchronized (sPool) { int count = sRecycledPointerCount; diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 57de43a..cb23680 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -467,19 +467,14 @@ bool OpenGLRenderer::createLayer(sp<Snapshot> snapshot, float left, float top, // Copy the framebuffer into the layer glBindTexture(GL_TEXTURE_2D, layer->texture); - // TODO: Workaround for b/3054204 - glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, bounds.left, mHeight - bounds.bottom, - layer->width, layer->height, 0); - - // TODO: Waiting for b/3054204 to be fixed - // if (layer->empty) { - // glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, bounds.left, mHeight - bounds.bottom, - // layer->width, layer->height, 0); - // layer->empty = false; - // } else { - // glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, bounds.left, mHeight - bounds.bottom, - // bounds.getWidth(), bounds.getHeight()); - // } + if (layer->empty) { + glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, bounds.left, mHeight - bounds.bottom, + layer->width, layer->height, 0); + layer->empty = false; + } else { + glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, bounds.left, mHeight - bounds.bottom, + bounds.getWidth(), bounds.getHeight()); + } // Enqueue the buffer coordinates to clear the corresponding region later mLayers.push(new Rect(bounds)); |