Bug 990683 - Stop calling DeprecatedGetCurrentAsSurface in nsLayoutUtils::SurfaceFromElement(HTMLVideoElement* aElement,...). (Moz2D migration.) r=mattwoodrow

This commit is contained in:
Jonathan Watt 2014-04-02 12:32:24 +01:00
parent 6f3265ad02
commit fcf83c889b

View File

@ -5346,11 +5346,10 @@ nsLayoutUtils::SurfaceFromElement(HTMLVideoElement* aElement,
return result;
mozilla::gfx::IntSize size;
nsRefPtr<gfxASurface> surf = container->DeprecatedGetCurrentAsSurface(&size);
if (!surf)
result.mSourceSurface = container->GetCurrentAsSourceSurface(&size);
if (!result.mSourceSurface)
return result;
result.mSourceSurface = gfxPlatform::GetPlatform()->GetSourceSurfaceForSurface(aTarget, surf);
result.mCORSUsed = aElement->GetCORSMode() != CORS_NONE;
result.mSize = ThebesIntSize(size);
result.mPrincipal = principal.forget();