When a bitmap is texture-backed, change SkBitmap::copyTo() to do a deep
copy of the texels in VRAM rather than a readback and re-upload. This
gives a 3-10X speedup on recursive canvas-to-canvas draws.
N.B.: This introduces a new GM test, which will need new baselines.
git-svn-id: http://skia.googlecode.com/svn/trunk@2790 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index bc52159..5b48c0b 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -548,6 +548,12 @@
config, buffer, rowBytes, 0);
}
/**
+ * Copies all texels from one texture to another.
+ * @param src the texture to copy from.
+ * @param dst the render target to copy to.
+ */
+ void copyTexture(GrTexture* src, GrRenderTarget* dst);
+ /**
* Applies a 1D convolution kernel in the X direction to a rectangle of
* pixels from a given texture.
* @param texture the texture to read from