Make RT & TEX base classes aware of NPOT/min-RT bloated size
Review URL: http://codereview.appspot.com/4849045/
git-svn-id: http://skia.googlecode.com/svn/trunk@2057 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/src/GrGLTexture.cpp b/gpu/src/GrGLTexture.cpp
index caf001a..1dc9c1c 100644
--- a/gpu/src/GrGLTexture.cpp
+++ b/gpu/src/GrGLTexture.cpp
@@ -47,8 +47,6 @@
fUploadByteCount = textureDesc.fUploadByteCount;
fUploadType = textureDesc.fUploadType;
fOrientation = textureDesc.fOrientation;
- fAllocWidth = textureDesc.fAllocWidth;
- fAllocHeight = textureDesc.fAllocHeight;
fScaleX = GrIntToScalar(textureDesc.fContentWidth) /
textureDesc.fAllocWidth;
fScaleY = GrIntToScalar(textureDesc.fContentHeight) /
@@ -72,6 +70,8 @@
: INHERITED(gpu,
textureDesc.fContentWidth,
textureDesc.fContentHeight,
+ textureDesc.fAllocWidth,
+ textureDesc.fAllocHeight,
textureDesc.fFormat) {
this->init(gpu, textureDesc, NULL, initialTexParams);
}
@@ -83,6 +83,8 @@
: INHERITED(gpu,
textureDesc.fContentWidth,
textureDesc.fContentHeight,
+ textureDesc.fAllocWidth,
+ textureDesc.fAllocHeight,
textureDesc.fFormat) {
this->init(gpu, textureDesc, &rtDesc, initialTexParams);
}