diff options
author | George Mount <mount@google.com> | 2012-12-11 07:43:51 -0800 |
---|---|---|
committer | George Mount <mount@google.com> | 2012-12-17 13:23:31 -0800 |
commit | 86616448866336aa294b88cfd93b5603e4207f88 (patch) | |
tree | c9ad408d53869ce63d884a1107cfce05b31750a2 /src/com/android/gallery3d/glrenderer/GLCanvas.java | |
parent | 4bdd0372ca1bba02828e9343fa3cc775f8c6f6e9 (diff) | |
download | android_packages_apps_Snap-86616448866336aa294b88cfd93b5603e4207f88.tar.gz android_packages_apps_Snap-86616448866336aa294b88cfd93b5603e4207f88.tar.bz2 android_packages_apps_Snap-86616448866336aa294b88cfd93b5603e4207f88.zip |
Move LightCycle to render directly to GLRootView.
Change-Id: I298ef7127d86ca37067ffa953640aad1747961f9
Diffstat (limited to 'src/com/android/gallery3d/glrenderer/GLCanvas.java')
-rw-r--r-- | src/com/android/gallery3d/glrenderer/GLCanvas.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/glrenderer/GLCanvas.java b/src/com/android/gallery3d/glrenderer/GLCanvas.java index 848af75a9..5e319f894 100644 --- a/src/com/android/gallery3d/glrenderer/GLCanvas.java +++ b/src/com/android/gallery3d/glrenderer/GLCanvas.java @@ -17,6 +17,7 @@ package com.android.gallery3d.glrenderer; import android.graphics.Bitmap; +import android.graphics.Rect; import android.graphics.RectF; import com.android.gallery3d.common.ApiHelper; @@ -261,4 +262,23 @@ public abstract class GLCanvas { * as well. */ public abstract void drawOnlyOutsideStencil(boolean onlyOutside); + + /** + * After LightCycle makes GL calls, this method is called to restore the GL + * configuration to the one expected by GLCanvas. + */ + public abstract void recoverFromLightCycle(); + + /** + * Gets the bounds given by x, y, width, and height as well as the internal + * matrix state. There is no special handling for non-90-degree rotations. + * It only considers the lower-left and upper-right corners as the bounds. + * + * @param bounds The output bounds to write to. + * @param x The left side of the input rectangle. + * @param y The bottom of the input rectangle. + * @param width The width of the input rectangle. + * @param height The height of the input rectangle. + */ + public abstract void getBounds(Rect bounds, int x, int y, int width, int height); } |