diff --git a/gfx/layers/client/ContentClient.cpp b/gfx/layers/client/ContentClient.cpp index 76c9bbcca3c2..5ee32881d7b1 100644 --- a/gfx/layers/client/ContentClient.cpp +++ b/gfx/layers/client/ContentClient.cpp @@ -835,7 +835,8 @@ ContentClientIncremental::BeginPaintBuffer(ThebesLayer* aLayer, "BeginUpdate should always modify the draw region in the same way!"); FillSurface(onBlack, result.mRegionToDraw, nsIntPoint(drawBounds.x, drawBounds.y), gfxRGBA(0.0, 0.0, 0.0, 1.0)); FillSurface(onWhite, result.mRegionToDraw, nsIntPoint(drawBounds.x, drawBounds.y), gfxRGBA(1.0, 1.0, 1.0, 1.0)); - if (RefPtr onBlackDT = gfxPlatform::GetPlatform()->CreateDrawTargetForUpdateSurface(onBlack, onBlack->GetSize())) { + if (gfxPlatform::GetPlatform()->SupportsAzureContent()) { + RefPtr onBlackDT = gfxPlatform::GetPlatform()->CreateDrawTargetForUpdateSurface(onBlack, onBlack->GetSize()); RefPtr onWhiteDT = gfxPlatform::GetPlatform()->CreateDrawTargetForUpdateSurface(onWhite, onWhite->GetSize()); RefPtr dt = Factory::CreateDualDrawTarget(onBlackDT, onWhiteDT); result.mContext = new gfxContext(dt); @@ -861,7 +862,8 @@ ContentClientIncremental::BeginPaintBuffer(ThebesLayer* aLayer, } } else { nsRefPtr surf = GetUpdateSurface(BUFFER_BLACK, result.mRegionToDraw); - if (RefPtr dt = gfxPlatform::GetPlatform()->CreateDrawTargetForUpdateSurface(surf, surf->GetSize())) { + if (gfxPlatform::GetPlatform()->SupportsAzureContent()) { + RefPtr dt = gfxPlatform::GetPlatform()->CreateDrawTargetForUpdateSurface(surf, surf->GetSize()); result.mContext = new gfxContext(dt); } else { result.mContext = new gfxContext(surf);