Lines Matching defs:surface
824 bool GrGLGpu::onWritePixels(GrSurface* surface,
831 auto glTex = static_cast<GrGLTexture*>(surface->asTexture());
934 bool GrGLGpu::onTransferPixelsFrom(GrSurface* surface,
943 return this->readOrTransferPixelsFrom(surface,
2143 bool GrGLGpu::readOrTransferPixelsFrom(GrSurface* surface,
2149 SkASSERT(surface);
2151 auto format = surface->backendFormat().asGLFormat();
2152 GrGLRenderTarget* renderTarget = static_cast<GrGLRenderTarget*>(surface->asRenderTarget());
2158 this->glCaps().getReadPixelsFormat(surface->backendFormat().asGLFormat(),
2176 this->bindSurfaceFBOForPixelOps(surface, 0, GR_GL_FRAMEBUFFER, kSrc_TempFBOTarget);
2201 this->unbindSurfaceFBOForPixelOps(surface, 0, GR_GL_FRAMEBUFFER);
2206 bool GrGLGpu::onReadPixels(GrSurface* surface,
2212 SkASSERT(surface);
2226 return this->readOrTransferPixelsFrom(surface,
2947 void GrGLGpu::bindSurfaceFBOForPixelOps(GrSurface* surface, int mipLevel, GrGLenum fboTarget,
2949 GrGLRenderTarget* rt = static_cast<GrGLRenderTarget*>(surface->asRenderTarget());
2951 SkASSERT(surface->asTexture());
2952 GrGLTexture* texture = static_cast<GrGLTexture*>(surface->asTexture());
2974 void GrGLGpu::unbindSurfaceFBOForPixelOps(GrSurface* surface, int mipLevel, GrGLenum fboTarget) {
2976 if (mipLevel > 0 || !surface->asRenderTarget()) {
2977 SkASSERT(surface->asTexture());
2978 GrGLenum textureTarget = static_cast<GrGLTexture*>(surface->asTexture())->target();