diff options
author | Likai Ding <likaid@codeaurora.org> | 2016-06-01 10:31:45 +0800 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2016-09-26 04:54:49 -0700 |
commit | b750059243b8b484a744b7715fbba55e6f968349 (patch) | |
tree | 8ba2b870603692a0c746cfd740a54932b8085b16 /src/com/android/gallery3d/ui/TileImageView.java | |
parent | 0f34582709227dd5c2e0d26d59bc6dd8e6f4f6a2 (diff) | |
download | android_packages_apps_Gallery2-b750059243b8b484a744b7715fbba55e6f968349.tar.gz android_packages_apps_Gallery2-b750059243b8b484a744b7715fbba55e6f968349.tar.bz2 android_packages_apps_Gallery2-b750059243b8b484a744b7715fbba55e6f968349.zip |
Gallery: faster texture upload
TileTexture.Uploader uses a fixed time slot (4ms) to upload tiles.
However, typical GL idle time is much longer than that. To better
utilize it, a third parameter is added to onGLIdle method to indicate
the due time. This can cut ~170ms on certain devices.
CRs-Fixed: 1024519
Change-Id: I8347b87f85815a4deaf10eb10f234a56b047681e
Diffstat (limited to 'src/com/android/gallery3d/ui/TileImageView.java')
-rw-r--r-- | src/com/android/gallery3d/ui/TileImageView.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/ui/TileImageView.java b/src/com/android/gallery3d/ui/TileImageView.java index 2b978d1bf..16e2fc129 100644 --- a/src/com/android/gallery3d/ui/TileImageView.java +++ b/src/com/android/gallery3d/ui/TileImageView.java @@ -559,7 +559,7 @@ public class TileImageView extends GLView { AtomicBoolean mActive = new AtomicBoolean(false); @Override - public boolean onGLIdle(GLCanvas canvas, boolean renderRequested) { + public boolean onGLIdle(GLCanvas canvas, boolean renderRequested, long dueTime) { // Skips uploading if there is a pending rendering request. // Returns true to keep uploading in next rendering loop. if (renderRequested) return true; |