Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: src/gpu/gl/GrGLGpu.cpp

Issue 1937553002: Add Gr*Proxy classes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix memory bugs Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/GrTextureProxy.cpp ('k') | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1456 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 return (GR_GL_NO_ERROR == CHECK_ALLOC_ERROR(ctx.interface())); 1467 return (GR_GL_NO_ERROR == CHECK_ALLOC_ERROR(ctx.interface()));
1468 } 1468 }
1469 1469
1470 bool GrGLGpu::createRenderTargetObjects(const GrSurfaceDesc& desc, 1470 bool GrGLGpu::createRenderTargetObjects(const GrSurfaceDesc& desc,
1471 const GrGLTextureInfo& texInfo, 1471 const GrGLTextureInfo& texInfo,
1472 GrGLRenderTarget::IDDesc* idDesc) { 1472 GrGLRenderTarget::IDDesc* idDesc) {
1473 idDesc->fMSColorRenderbufferID = 0; 1473 idDesc->fMSColorRenderbufferID = 0;
1474 idDesc->fRTFBOID = 0; 1474 idDesc->fRTFBOID = 0;
1475 idDesc->fRTFBOOwnership = GrBackendObjectOwnership::kOwned; 1475 idDesc->fRTFBOOwnership = GrBackendObjectOwnership::kOwned;
1476 idDesc->fTexFBOID = 0; 1476 idDesc->fTexFBOID = 0;
1477 idDesc->fSampleConfig = (GrGLCaps::kMixedSamples_MSFBOType == this->glCaps() .msFBOType() && 1477 SkASSERT((GrGLCaps::kMixedSamples_MSFBOType == this->glCaps().msFBOType()) = =
1478 desc.fSampleCnt > 0) ? GrRenderTarget::kStencil_Samp leConfig : 1478 this->caps()->usesMixedSamples());
1479 GrRenderTarget::kUnified_Samp leConfig; 1479 idDesc->fSampleConfig = GrRenderTarget::ComputeSampleConfig(*this->caps(), d esc.fSampleCnt);
1480 1480
1481 GrGLenum status; 1481 GrGLenum status;
1482 1482
1483 GrGLenum colorRenderbufferFormat = 0; // suppress warning 1483 GrGLenum colorRenderbufferFormat = 0; // suppress warning
1484 1484
1485 if (desc.fSampleCnt > 0 && GrGLCaps::kNone_MSFBOType == this->glCaps().msFBO Type()) { 1485 if (desc.fSampleCnt > 0 && GrGLCaps::kNone_MSFBOType == this->glCaps().msFBO Type()) {
1486 goto FAILED; 1486 goto FAILED;
1487 } 1487 }
1488 1488
1489 GL_CALL(GenFramebuffers(1, &idDesc->fTexFBOID)); 1489 GL_CALL(GenFramebuffers(1, &idDesc->fTexFBOID));
(...skipping 2756 matching lines...) Expand 10 before | Expand all | Expand 10 after
4246 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() || 4246 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() ||
4247 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) { 4247 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) {
4248 copyParams->fFilter = GrTextureParams::kNone_FilterMode; 4248 copyParams->fFilter = GrTextureParams::kNone_FilterMode;
4249 copyParams->fWidth = texture->width(); 4249 copyParams->fWidth = texture->width();
4250 copyParams->fHeight = texture->height(); 4250 copyParams->fHeight = texture->height();
4251 return true; 4251 return true;
4252 } 4252 }
4253 } 4253 }
4254 return false; 4254 return false;
4255 } 4255 }
OLDNEW
« no previous file with comments | « src/gpu/GrTextureProxy.cpp ('k') | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698