OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "GrGLGpu.h" | 8 #include "GrGLGpu.h" |
9 #include "GrGLBuffer.h" | 9 #include "GrGLBuffer.h" |
10 #include "GrGLGLSL.h" | 10 #include "GrGLGLSL.h" |
(...skipping 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1478 return (GR_GL_NO_ERROR == CHECK_ALLOC_ERROR(ctx.interface())); | 1478 return (GR_GL_NO_ERROR == CHECK_ALLOC_ERROR(ctx.interface())); |
1479 } | 1479 } |
1480 | 1480 |
1481 bool GrGLGpu::createRenderTargetObjects(const GrSurfaceDesc& desc, | 1481 bool GrGLGpu::createRenderTargetObjects(const GrSurfaceDesc& desc, |
1482 const GrGLTextureInfo& texInfo, | 1482 const GrGLTextureInfo& texInfo, |
1483 GrGLRenderTarget::IDDesc* idDesc) { | 1483 GrGLRenderTarget::IDDesc* idDesc) { |
1484 idDesc->fMSColorRenderbufferID = 0; | 1484 idDesc->fMSColorRenderbufferID = 0; |
1485 idDesc->fRTFBOID = 0; | 1485 idDesc->fRTFBOID = 0; |
1486 idDesc->fRTFBOOwnership = GrBackendObjectOwnership::kOwned; | 1486 idDesc->fRTFBOOwnership = GrBackendObjectOwnership::kOwned; |
1487 idDesc->fTexFBOID = 0; | 1487 idDesc->fTexFBOID = 0; |
1488 idDesc->fSampleConfig = (GrGLCaps::kMixedSamples_MSFBOType == this->glCaps()
.msFBOType() && | 1488 SkASSERT((GrGLCaps::kMixedSamples_MSFBOType == this->glCaps().msFBOType()) =
= |
1489 desc.fSampleCnt > 0) ? GrRenderTarget::kStencil_Samp
leConfig : | 1489 this->caps()->usesMixedSamples()); |
1490 GrRenderTarget::kUnified_Samp
leConfig; | 1490 idDesc->fSampleConfig = GrRenderTarget::ComputeSampleConfig(*this->caps(), d
esc.fSampleCnt); |
1491 | 1491 |
1492 GrGLenum status; | 1492 GrGLenum status; |
1493 | 1493 |
1494 GrGLenum colorRenderbufferFormat = 0; // suppress warning | 1494 GrGLenum colorRenderbufferFormat = 0; // suppress warning |
1495 | 1495 |
1496 if (desc.fSampleCnt > 0 && GrGLCaps::kNone_MSFBOType == this->glCaps().msFBO
Type()) { | 1496 if (desc.fSampleCnt > 0 && GrGLCaps::kNone_MSFBOType == this->glCaps().msFBO
Type()) { |
1497 goto FAILED; | 1497 goto FAILED; |
1498 } | 1498 } |
1499 | 1499 |
1500 GL_CALL(GenFramebuffers(1, &idDesc->fTexFBOID)); | 1500 GL_CALL(GenFramebuffers(1, &idDesc->fTexFBOID)); |
(...skipping 2769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4270 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() || | 4270 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() || |
4271 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) { | 4271 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) { |
4272 copyParams->fFilter = GrTextureParams::kNone_FilterMode; | 4272 copyParams->fFilter = GrTextureParams::kNone_FilterMode; |
4273 copyParams->fWidth = texture->width(); | 4273 copyParams->fWidth = texture->width(); |
4274 copyParams->fHeight = texture->height(); | 4274 copyParams->fHeight = texture->height(); |
4275 return true; | 4275 return true; |
4276 } | 4276 } |
4277 } | 4277 } |
4278 return false; | 4278 return false; |
4279 } | 4279 } |
OLD | NEW |