summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/support/glrenderer/Texture.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/camera/support/glrenderer/Texture.java')
-rw-r--r--src/com/android/camera/support/glrenderer/Texture.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/com/android/camera/support/glrenderer/Texture.java b/src/com/android/camera/support/glrenderer/Texture.java
new file mode 100644
index 000000000..4d1a49d2b
--- /dev/null
+++ b/src/com/android/camera/support/glrenderer/Texture.java
@@ -0,0 +1,27 @@
+package com.android.camera.support.glrenderer;
+
+//Texture is a rectangular image which can be drawn on GLCanvas.
+//The isOpaque() function gives a hint about whether the texture is opaque,
+//so the drawing can be done faster.
+//
+//This is the current texture hierarchy:
+//
+//Texture
+//-- ColorTexture
+//-- FadeInTexture
+//-- BasicTexture
+// -- UploadedTexture
+// -- BitmapTexture
+// -- Tile
+// -- ResourceTexture
+// -- NinePatchTexture
+// -- CanvasTexture
+// -- StringTexture
+//
+public interface Texture {
+ public int getWidth();
+ public int getHeight();
+ public void draw(GLCanvas canvas, int x, int y);
+ public void draw(GLCanvas canvas, int x, int y, int w, int h);
+ public boolean isOpaque();
+}