diff --git a/gfx/layers/ImageContainer.h b/gfx/layers/ImageContainer.h index 24925bf0998a..87618599dde1 100644 --- a/gfx/layers/ImageContainer.h +++ b/gfx/layers/ImageContainer.h @@ -960,8 +960,6 @@ public: CairoImage() : Image(nullptr, CAIRO_SURFACE) {} -private: - nsCountedRef mDeprecatedSurface; gfx::IntSize mSize; diff --git a/gfx/layers/d3d10/ImageLayerD3D10.cpp b/gfx/layers/d3d10/ImageLayerD3D10.cpp index 9968065611f5..e5f72c62de06 100644 --- a/gfx/layers/d3d10/ImageLayerD3D10.cpp +++ b/gfx/layers/d3d10/ImageLayerD3D10.cpp @@ -213,14 +213,14 @@ ImageLayerD3D10::RenderLayer() ID3D10EffectTechnique *technique; nsRefPtr keyedMutex; - nsRefPtr surf = image->DeprecatedGetAsSurface(); if (image->GetFormat() == ImageFormat::CAIRO_SURFACE || image->GetFormat() == ImageFormat::REMOTE_IMAGE_BITMAP || image->GetFormat() == ImageFormat::REMOTE_IMAGE_DXGI_TEXTURE || image->GetFormat() == ImageFormat::D3D9_RGB32_TEXTURE) { NS_ASSERTION(image->GetFormat() != ImageFormat::CAIRO_SURFACE || - !surf || surf->GetContentType() != gfxContentType::ALPHA, + !static_cast(image)->mDeprecatedSurface || + static_cast(image)->mDeprecatedSurface->GetContentType() != gfxContentType::ALPHA, "Image layer has alpha image"); bool hasAlpha = false; diff --git a/gfx/layers/d3d9/ImageLayerD3D9.cpp b/gfx/layers/d3d9/ImageLayerD3D9.cpp index aacd25d2dcb5..4e0ccfaa4886 100644 --- a/gfx/layers/d3d9/ImageLayerD3D9.cpp +++ b/gfx/layers/d3d9/ImageLayerD3D9.cpp @@ -414,9 +414,9 @@ ImageLayerD3D9::RenderLayer() image->GetFormat() == REMOTE_IMAGE_BITMAP || image->GetFormat() == D3D9_RGB32_TEXTURE) { - nsRefPtr surf = image->DeprecatedGetAsSurface(); NS_ASSERTION(image->GetFormat() != CAIRO_SURFACE || - !surf || surf->GetContentType() != gfxContentType::ALPHA, + !static_cast(image)->mDeprecatedSurface || + static_cast(image)->mDeprecatedSurface->GetContentType() != gfxContentType::ALPHA, "Image layer has alpha image"); bool hasAlpha = false;