Loading core/java/android/view/VelocityTracker.java +4 −4 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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; Loading @@ -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; Loading @@ -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; Loading libs/hwui/OpenGLRenderer.cpp +8 −13 Original line number Diff line number Diff line Loading @@ -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 if (layer->empty) { 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()); // } 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)); Loading Loading
core/java/android/view/VelocityTracker.java +4 −4 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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; Loading @@ -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; Loading @@ -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; Loading
libs/hwui/OpenGLRenderer.cpp +8 −13 Original line number Diff line number Diff line Loading @@ -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 if (layer->empty) { 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()); // } 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)); Loading