Hide alloc size vs content size below API
Remove old gl shaders class
Move texture matrix to sampler class

git-svn-id: http://skia.googlecode.com/svn/trunk@808 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/include/GrGLTexture.h b/gpu/include/GrGLTexture.h
index 165320f..6f1b961 100644
--- a/gpu/include/GrGLTexture.h
+++ b/gpu/include/GrGLTexture.h
@@ -142,6 +142,30 @@
     GLenum uploadByteCount() const { return fUploadByteCount; }
     GLenum uploadType() const { return fUploadType; }
 
+    /**
+     * Retrieves the texture width actually allocated in texels.
+     *
+     * @return the width in texels
+     */
+    int allocWidth() const { return fAllocWidth; }
+
+    /**
+     * Retrieves the texture height actually allocated in texels.
+     *
+     * @return the height in texels
+     */
+    int allocHeight() const { return fAllocHeight; }
+
+    /**
+     * @return width() / allocWidth()
+     */
+    GrScalar contentScaleX() const { return fScaleX; }
+
+    /**
+     * @return height() / allocHeight()
+     */
+    GrScalar contentScaleY() const { return fScaleY; }
+
     // Ganesh assumes texture coordinates have their origin
     // in the top-left corner of the image. OpenGL, however,
     // has the origin in the lower-left corner. For content that
@@ -158,10 +182,15 @@
     GLenum              fUploadFormat;
     GLenum              fUploadByteCount;
     GLenum              fUploadType;
+    int                 fAllocWidth;
+    int                 fAllocHeight;
+    // precomputed content / alloc ratios
+    GrScalar            fScaleX;
+    GrScalar            fScaleY;
     Orientation         fOrientation;
-    GrGLRenderTarget*   fRenderTarget;    
+    GrGLRenderTarget*   fRenderTarget;
     GrGpuGL*            fGpuGL;
-    
+
     static const GLenum gWrapMode2GLWrap[];
 
     friend class GrGpuGL;