aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGLRenderTarget.cpp
diff options
context:
space:
mode:
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);