Remove allocated size vs content size in textures

Review URL: http://codereview.appspot.com/5373100/



git-svn-id: http://skia.googlecode.com/svn/trunk@2687 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/gpu/GrTexture.h b/include/gpu/GrTexture.h
index 5a86b08..0192688 100644
--- a/include/gpu/GrTexture.h
+++ b/include/gpu/GrTexture.h
@@ -33,20 +33,6 @@
     int height() const { return fHeight; }
 
     /**
-     * Retrieves the allocated width. It may differ from width for
-     * NPOT or min-RT size reasons.
-     * @return allocated width in texels
-     */
-    int allocatedWidth() const { return fAllocatedWidth; }
-
-    /**
-     * Retrieves the allocated height. It may differ from height for
-     * NPOT or min-RT size reasons.
-     * @return allocated height in texels
-     */
-    int allocatedHeight() const { return fAllocatedHeight; }
-
-    /**
      * Convert from texels to normalized texture coords for POT textures
      * only.
      */
@@ -64,9 +50,7 @@
      *  Approximate number of bytes used by the texture
      */
     virtual size_t sizeInBytes() const {
-        return (size_t) fAllocatedWidth *
-                        fAllocatedHeight *
-                        GrBytesPerPixel(fConfig);
+        return (size_t) fWidth * fHeight * GrBytesPerPixel(fConfig);
     }
 
     /**
@@ -141,15 +125,11 @@
     GrTexture(GrGpu* gpu,
               int width,
               int height,
-              int allocatedWidth,
-              int allocatedHeight,
               GrPixelConfig config)
     : INHERITED(gpu)
     , fRenderTarget(NULL)
     , fWidth(width)
     , fHeight(height)
-    , fAllocatedWidth(allocatedWidth)
-    , fAllocatedHeight(allocatedHeight)
     , fConfig(config) {
         // only make sense if alloc size is pow2
         fShiftFixedX = 31 - Gr_clz(fWidth);
@@ -166,8 +146,6 @@
 private:
     int fWidth;
     int fHeight;
-    int fAllocatedWidth;
-    int fAllocatedHeight;
 
     // these two shift a fixed-point value into normalized coordinates
     // for this texture if the texture is power of two sized.