Review URL: http://codereview.appspot.com/
4809087/
git-svn-id: http://skia.googlecode.com/svn/trunk@2079
2bbb7eff-a529-9590-31e7-
b0007b416f81
}
virtual size_t sizeInBytes() const {
- return (size_t) this->width() *
- this->height() *
- fFormat.fTotalBits *
- GrMax(1,this->numSamples());
+ uint64_t size = this->width();
+ size *= this->height();
+ size *= fFormat.fTotalBits;
+ size *= GrMax(1,this->numSamples());
+ return (size_t)(size / 8);
}
GrGLuint renderbufferID() const {
} else {
colorBits = GrBytesPerPixel(fConfig);
}
- return (size_t) fAllocatedWidth *
- fAllocatedHeight *
- colorBits *
- GrMax(1,fSampleCnt);
+ uint64_t size = fAllocatedWidth;
+ size *= fAllocatedHeight;
+ size *= colorBits;
+ size *= GrMax(1,fSampleCnt);
+ return (size_t)(size / 8);
}
void GrRenderTarget::flagAsNeedingResolve(const GrIRect* rect) {
fStencilBuffer->wasAttachedToRenderTarget(this);
fStencilBuffer->ref();
}
-}
\ No newline at end of file
+}