aboutsummaryrefslogtreecommitdiffhomepage
path: root/gpu/src/GrRenderTarget.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-08-08 13:21:05 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-08-08 13:21:05 +0000
commit0168afc7196fe82da8af230c93c56f3035d54d2b (patch)
tree936ea16266be15bc7e58c6351df39ba7cb0c531d /gpu/src/GrRenderTarget.cpp
parent2f9462d29fe4c66660251734c64d16628326f8e5 (diff)
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
Diffstat (limited to 'gpu/src/GrRenderTarget.cpp')
-rw-r--r--gpu/src/GrRenderTarget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/gpu/src/GrRenderTarget.cpp b/gpu/src/GrRenderTarget.cpp
index 042bc59395..8a73a84f67 100644
--- a/gpu/src/GrRenderTarget.cpp
+++ b/gpu/src/GrRenderTarget.cpp
@@ -31,7 +31,7 @@ size_t GrRenderTarget::sizeInBytes() const {
} else {
colorBits = GrBytesPerPixel(fConfig);
}
- return fWidth * fHeight * colorBits;
+ return fAllocatedWidth * fAllocatedHeight * colorBits * GrMax(1,fSampleCnt);
}
void GrRenderTarget::flagAsNeedingResolve(const GrIRect* rect) {