aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGLRenderTarget.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-11-15 16:47:16 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-11-15 16:47:16 +0000
commit9962108c400dadcae913614e8a5ab781780981d8 (patch)
tree476244a17c316b527077384c2ae471c87d110b2b /src/gpu/GrGLRenderTarget.cpp
parentcc586511839400941420160b1ef2bf19a7f7f2de (diff)
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
Diffstat (limited to 'src/gpu/GrGLRenderTarget.cpp')
-rw-r--r--src/gpu/GrGLRenderTarget.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gpu/GrGLRenderTarget.cpp b/src/gpu/GrGLRenderTarget.cpp
index 290ae2e47d..c98914a3b8 100644
--- a/src/gpu/GrGLRenderTarget.cpp
+++ b/src/gpu/GrGLRenderTarget.cpp
@@ -36,8 +36,6 @@ GrGLRenderTarget::GrGLRenderTarget(GrGpuGL* gpu,
texture,
viewport.fWidth,
viewport.fHeight,
- texture->allocatedWidth(),
- texture->allocatedHeight(),
desc.fConfig,
desc.fSampleCnt) {
GrAssert(NULL != texID);
@@ -45,6 +43,11 @@ GrGLRenderTarget::GrGLRenderTarget(GrGpuGL* gpu,
// FBO 0 can't also be a texture, right?
GrAssert(0 != desc.fRTFBOID);
GrAssert(0 != desc.fTexFBOID);
+
+ // we assume this is true, TODO: get rid of viewport as a param.
+ GrAssert(viewport.fWidth == texture->width());
+ GrAssert(viewport.fHeight == texture->height());
+
this->init(desc, viewport, texID);
}
@@ -55,8 +58,6 @@ GrGLRenderTarget::GrGLRenderTarget(GrGpuGL* gpu,
NULL,
viewport.fWidth,
viewport.fHeight,
- viewport.fWidth, // don't really need separate alloc w/h for
- viewport.fHeight, // non-texture RTs, repeat viewport values
desc.fConfig,
desc.fSampleCnt) {
this->init(desc, viewport, NULL);