Fix assertion about GPU memory size when the target is not FBO 0

Review URL: https://codereview.chromium.org/1313783007
This commit is contained in:
chinmaygarde 2015-08-27 06:36:33 -07:00 committed by Commit bot
parent ac856c97ac
commit fe495f0bae

View File

@ -40,7 +40,7 @@ void GrGLRenderTarget::init(const GrSurfaceDesc& desc, const IDDesc& idDesc) {
// We own one color value for each MSAA sample.
int colorValuesPerPixel = SkTMax(1, fDesc.fSampleCnt);
if (fTexFBOID != fRTFBOID) {
if (fTexFBOID != kUnresolvableFBOID && fTexFBOID != fRTFBOID) {
// If we own the resolve buffer then that is one more sample per pixel.
colorValuesPerPixel += 1;
} else if (fTexFBOID != 0) {