Bug 909128 - Support snapshot source surfaces in DrawTargetCG's CopySurface. r=jrmuizel

This commit is contained in:
Matt Woodrow 2013-08-28 10:54:52 +12:00
parent 69fc8f5296
commit 829d88b2b4

View File

@ -1096,7 +1096,8 @@ DrawTargetCG::CopySurface(SourceSurface *aSurface,
CGImageRef image;
CGImageRef subimage = nullptr;
if (aSurface->GetType() == SURFACE_COREGRAPHICS_IMAGE) {
if (aSurface->GetType() == SURFACE_COREGRAPHICS_IMAGE ||
aSurface->GetType() == SURFACE_COREGRAPHICS_CGCONTEXT) {
image = GetImageFromSourceSurface(aSurface);
/* we have two options here:
* - create a subimage -- this is slower