aboutsummaryrefslogtreecommitdiffhomepage
path: root/gpu/src/GrGLTexture.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-02-17 16:43:10 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-02-17 16:43:10 +0000
commitc6cf72381b212eb21e61d5c5e14247b483a77753 (patch)
tree766c1b8279c387b424bb8ac5c60004610c74ab9e /gpu/src/GrGLTexture.cpp
parentdbbdad70511472d40ffb358750c53ae7891f3881 (diff)
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
Diffstat (limited to 'gpu/src/GrGLTexture.cpp')
-rw-r--r--gpu/src/GrGLTexture.cpp35
1 files changed, 20 insertions, 15 deletions
diff --git a/gpu/src/GrGLTexture.cpp b/gpu/src/GrGLTexture.cpp
index 9460086fe2..110535f3ea 100644
--- a/gpu/src/GrGLTexture.cpp
+++ b/gpu/src/GrGLTexture.cpp
@@ -76,20 +76,25 @@ const GLenum GrGLTexture::gWrapMode2GLWrap[] = {
GrGLTexture::GrGLTexture(const GLTextureDesc& textureDesc,
const GLRenderTargetIDs& rtIDs,
const TexParams& initialTexParams,
- GrGpuGL* gl) :
- INHERITED(textureDesc.fContentWidth,
- textureDesc.fContentHeight,
- textureDesc.fAllocWidth,
- textureDesc.fAllocHeight,
- textureDesc.fFormat),
- fTexParams(initialTexParams),
- fTextureID(textureDesc.fTextureID),
- fUploadFormat(textureDesc.fUploadFormat),
- fUploadByteCount(textureDesc.fUploadByteCount),
- fUploadType(textureDesc.fUploadType),
- fOrientation(textureDesc.fOrientation),
- fRenderTarget(NULL),
- fGpuGL(gl) {
+ GrGpuGL* gl)
+ : INHERITED(textureDesc.fContentWidth,
+ textureDesc.fContentHeight,
+ textureDesc.fFormat) {
+
+ fTexParams = initialTexParams;
+ fTextureID = textureDesc.fTextureID;
+ fUploadFormat = textureDesc.fUploadFormat;
+ 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) /
+ textureDesc.fAllocHeight;
+ fRenderTarget = NULL;
+ fGpuGL = gl;
GrAssert(0 != textureDesc.fTextureID);
@@ -135,7 +140,7 @@ void GrGLTexture::removeRenderTarget() {
// must do this notify before the delete
fGpuGL->notifyTextureRemoveRenderTarget(this);
delete fRenderTarget;
- fRenderTarget = NULL;
+ fRenderTarget = NULL;
}
}