Lines Matching defs:dst
2549 // We need to work around a driver bug by using a blend state that preserves the dst color,
2867 // Determines whether glBlitFramebuffer could be used between src and dst by onCopySurface.
2868 static inline bool can_blit_framebuffer_for_copy_surface(const GrSurface* dst,
2875 if (const GrRenderTarget* rt = dst->asRenderTarget()) {
2881 SkASSERT((dstSampleCnt > 0) == SkToBool(dst->asRenderTarget()));
2884 GrGLFormat dstFormat = dst->backendFormat().asGLFormat();
2887 const GrGLTexture* dstTex = static_cast<const GrGLTexture*>(dst->asTexture());
2916 static inline bool can_copy_texsubimage(const GrSurface* dst, const GrSurface* src,
2919 const GrGLRenderTarget* dstRT = static_cast<const GrGLRenderTarget*>(dst->asRenderTarget());
2921 const GrGLTexture* dstTex = static_cast<const GrGLTexture*>(dst->asTexture());
2927 GrGLFormat dstFormat = dst->backendFormat().asGLFormat();
3033 bool GrGLGpu::onCopySurface(GrSurface* dst, GrSurface* src, const SkIRect& srcRect,
3035 // Don't prefer copying as a draw if the dst doesn't already have a FBO object.
3037 bool preferCopy = SkToBool(dst->asRenderTarget());
3038 auto dstFormat = dst->backendFormat().asGLFormat();
3040 GrRenderTarget* dstRT = dst->asRenderTarget();
3042 if (this->copySurfaceAsDraw(dst, drawToMultisampleFBO, src, srcRect, dstPoint)) {
3047 if (can_copy_texsubimage(dst, src, this->glCaps())) {
3048 this->copySurfaceAsCopyTexSubImage(dst, src, srcRect, dstPoint);
3052 if (can_blit_framebuffer_for_copy_surface(dst, src, srcRect, dstPoint, this->glCaps())) {
3053 return this->copySurfaceAsBlitFramebuffer(dst, src, srcRect, dstPoint);
3057 GrRenderTarget* dstRT = dst->asRenderTarget();
3059 if (this->copySurfaceAsDraw(dst, drawToMultisampleFBO, src, srcRect, dstPoint)) {
3334 bool GrGLGpu::copySurfaceAsDraw(GrSurface* dst, bool drawToMultisampleFBO, GrSurface* src,
3342 if (auto* dstRT = static_cast<GrGLRenderTarget*>(dst->asRenderTarget())) {
3351 this->bindSurfaceFBOForPixelOps(dst, 0, GR_GL_FRAMEBUFFER, kDst_TempFBOTarget);
3361 this->flushViewport(SkIRect::MakeSize(dst->dimensions()),
3362 dst->height(),
3373 // dst rect edges in NDC (-1 to 1)
3374 int dw = dst->width();
3375 int dh = dst->height();
3407 this->unbindSurfaceFBOForPixelOps(dst, 0, GR_GL_FRAMEBUFFER);
3409 this->didWriteToSurface(dst, kTopLeft_GrSurfaceOrigin, &dstRect);
3413 void GrGLGpu::copySurfaceAsCopyTexSubImage(GrSurface* dst, GrSurface* src, const SkIRect& srcRect,
3415 SkASSERT(can_copy_texsubimage(dst, src, this->glCaps()));
3417 GrGLTexture* dstTex = static_cast<GrGLTexture *>(dst->asTexture());
3431 this->didWriteToSurface(dst, kTopLeft_GrSurfaceOrigin, &dstRect);
3434 bool GrGLGpu::copySurfaceAsBlitFramebuffer(GrSurface* dst, GrSurface* src, const SkIRect& srcRect,
3436 SkASSERT(can_blit_framebuffer_for_copy_surface(dst, src, srcRect, dstPoint, this->glCaps()));
3439 if (dst == src) {
3445 this->bindSurfaceFBOForPixelOps(dst, 0, GR_GL_DRAW_FRAMEBUFFER, kDst_TempFBOTarget);
3463 this->unbindSurfaceFBOForPixelOps(dst, 0, GR_GL_DRAW_FRAMEBUFFER);
3467 this->didWriteToSurface(dst, kTopLeft_GrSurfaceOrigin, &dstRect);