diff options
Diffstat (limited to 'src/gpu/gl/GrGpuGL.cpp')
-rw-r--r-- | src/gpu/gl/GrGpuGL.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp index 92bac03b8a..8ea7e5cde4 100644 --- a/src/gpu/gl/GrGpuGL.cpp +++ b/src/gpu/gl/GrGpuGL.cpp @@ -147,17 +147,17 @@ static bool fbo_test(const GrGLInterface* gl, int w, int h) { return status == GR_GL_FRAMEBUFFER_COMPLETE; } -GrGpuGL::GrGpuGL(const GrGLContextInfo& ctxInfo, GrContext* context) +GrGpuGL::GrGpuGL(const GrGLContext& ctx, GrContext* context) : GrGpu(context) - , fGLContextInfo(ctxInfo) { + , fGLContext(ctx) { - GrAssert(ctxInfo.isInitialized()); + GrAssert(ctx.isInitialized()); fillInConfigRenderableTable(); fPrintedCaps = false; - GrGLClearErr(fGLContextInfo.interface()); + GrGLClearErr(fGLContext.interface()); if (gPrintStartupSpew) { const GrGLubyte* ext; @@ -178,7 +178,7 @@ GrGpuGL::GrGpuGL(const GrGLContextInfo& ctxInfo, GrContext* context) this->initCaps(); - fProgramCache = SkNEW_ARGS(ProgramCache, (this->glContextInfo())); + fProgramCache = SkNEW_ARGS(ProgramCache, (this->glContext())); fHWGeometryState.setMaxAttribArrays(this->glCaps().maxVertexAttributes()); @@ -827,34 +827,34 @@ bool GrGpuGL::uploadTexData(const GrGLTexture::Desc& desc, } namespace { -bool renderbuffer_storage_msaa(GrGLContextInfo& ctxInfo, +bool renderbuffer_storage_msaa(GrGLContext& ctx, int sampleCount, GrGLenum format, int width, int height) { - CLEAR_ERROR_BEFORE_ALLOC(ctxInfo.interface()); - GrAssert(GrGLCaps::kNone_MSFBOType != ctxInfo.caps().msFBOType()); + CLEAR_ERROR_BEFORE_ALLOC(ctx.interface()); + GrAssert(GrGLCaps::kNone_MSFBOType != ctx.info().caps().msFBOType()); bool created = false; if (GrGLCaps::kNVDesktop_CoverageAAType == - ctxInfo.caps().coverageAAType()) { + ctx.info().caps().coverageAAType()) { const GrGLCaps::MSAACoverageMode& mode = - ctxInfo.caps().getMSAACoverageMode(sampleCount); - GL_ALLOC_CALL(ctxInfo.interface(), + ctx.info().caps().getMSAACoverageMode(sampleCount); + GL_ALLOC_CALL(ctx.interface(), RenderbufferStorageMultisampleCoverage(GR_GL_RENDERBUFFER, mode.fCoverageSampleCnt, mode.fColorSampleCnt, format, width, height)); - created = (GR_GL_NO_ERROR == CHECK_ALLOC_ERROR(ctxInfo.interface())); + created = (GR_GL_NO_ERROR == CHECK_ALLOC_ERROR(ctx.interface())); } if (!created) { // glRBMS will fail if requested samples is > max samples. - sampleCount = GrMin(sampleCount, ctxInfo.caps().maxSampleCount()); - GL_ALLOC_CALL(ctxInfo.interface(), + sampleCount = GrMin(sampleCount, ctx.info().caps().maxSampleCount()); + GL_ALLOC_CALL(ctx.interface(), RenderbufferStorageMultisample(GR_GL_RENDERBUFFER, sampleCount, format, width, height)); - created = (GR_GL_NO_ERROR == CHECK_ALLOC_ERROR(ctxInfo.interface())); + created = (GR_GL_NO_ERROR == CHECK_ALLOC_ERROR(ctx.interface())); } return created; } @@ -904,7 +904,7 @@ bool GrGpuGL::createRenderTargetObjects(int width, int height, GrAssert(desc->fSampleCnt > 0); GL_CALL(BindRenderbuffer(GR_GL_RENDERBUFFER, desc->fMSColorRenderbufferID)); - if (!renderbuffer_storage_msaa(fGLContextInfo, + if (!renderbuffer_storage_msaa(fGLContext, desc->fSampleCnt, msColorFormat, width, height)) { @@ -920,7 +920,7 @@ bool GrGpuGL::createRenderTargetObjects(int width, int height, if (status != GR_GL_FRAMEBUFFER_COMPLETE) { goto FAILED; } - fGLContextInfo.caps().markConfigAsValidColorAttachment( + fGLContext.info().caps().markConfigAsValidColorAttachment( desc->fConfig); } } @@ -935,7 +935,7 @@ bool GrGpuGL::createRenderTargetObjects(int width, int height, if (status != GR_GL_FRAMEBUFFER_COMPLETE) { goto FAILED; } - fGLContextInfo.caps().markConfigAsValidColorAttachment(desc->fConfig); + fGLContext.info().caps().markConfigAsValidColorAttachment(desc->fConfig); } return true; @@ -1131,7 +1131,7 @@ bool GrGpuGL::createStencilBufferForRenderTarget(GrRenderTarget* rt, // version on a GL that doesn't have an MSAA extension. bool created; if (samples > 0) { - created = renderbuffer_storage_msaa(fGLContextInfo, + created = renderbuffer_storage_msaa(fGLContext, samples, sFmt.fInternalFormat, width, height); @@ -1220,7 +1220,7 @@ bool GrGpuGL::attachStencilBufferToRenderTarget(GrStencilBuffer* sb, } return false; } else { - fGLContextInfo.caps().markColorConfigAndStencilFormatAsVerified( + fGLContext.info().caps().markColorConfigAndStencilFormatAsVerified( rt->config(), glsb->format()); } |