diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-02-17 16:43:10 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-02-17 16:43:10 +0000 |
commit | c6cf72381b212eb21e61d5c5e14247b483a77753 (patch) | |
tree | 766c1b8279c387b424bb8ac5c60004610c74ab9e /gpu/src/GrGLTexture.cpp | |
parent | dbbdad70511472d40ffb358750c53ae7891f3881 (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.cpp | 35 |
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; } } |