aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/batches/GrCopySurfaceBatch.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/batches/GrCopySurfaceBatch.h')
-rw-r--r--src/gpu/batches/GrCopySurfaceBatch.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gpu/batches/GrCopySurfaceBatch.h b/src/gpu/batches/GrCopySurfaceBatch.h
index 7bf8d8d8c2..3926643f8a 100644
--- a/src/gpu/batches/GrCopySurfaceBatch.h
+++ b/src/gpu/batches/GrCopySurfaceBatch.h
@@ -17,6 +17,16 @@ class GrCopySurfaceBatch final : public GrBatch {
public:
DEFINE_BATCH_CLASS_ID
+ /** This should not really be exposed as Create() will apply this clipping, but there is
+ * currently a workaround in GrContext::copySurface() for non-render target dsts that relies
+ * on it. */
+ static bool ClipSrcRectAndDstPoint(const GrSurface* dst,
+ const GrSurface* src,
+ const SkIRect& srcRect,
+ const SkIPoint& dstPoint,
+ SkIRect* clippedSrcRect,
+ SkIPoint* clippedDstPoint);
+
static GrBatch* Create(GrSurface* dst, GrSurface* src, const SkIRect& srcRect,
const SkIPoint& dstPoint);