From 10cfa9a30faf923692c35bb253f52cc9cf029429 Mon Sep 17 00:00:00 2001 From: Bas Schouten Date: Fri, 11 Feb 2011 23:46:28 +0100 Subject: [PATCH] Bug 633511: Detect surface content type in the correct spot. r=jrmuizel a=blocking-betan --- gfx/layers/d3d10/CanvasLayerD3D10.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gfx/layers/d3d10/CanvasLayerD3D10.cpp b/gfx/layers/d3d10/CanvasLayerD3D10.cpp index d580889fc070..475984c8d36c 100644 --- a/gfx/layers/d3d10/CanvasLayerD3D10.cpp +++ b/gfx/layers/d3d10/CanvasLayerD3D10.cpp @@ -78,6 +78,8 @@ CanvasLayerD3D10::Initialize(const Data& aData) mTexture = static_cast(data); mIsD2DTexture = PR_TRUE; device()->CreateShaderResourceView(mTexture, NULL, getter_AddRefs(mSRView)); + mHasAlpha = + mSurface->GetContentType() == gfxASurface::CONTENT_COLOR_ALPHA; return; } } @@ -93,8 +95,6 @@ CanvasLayerD3D10::Initialize(const Data& aData) // XXX for ANGLE, it's already the right-way up. If we start using NV GL-D3D interop // however, we'll need to do the right thing. mNeedsYFlip = PR_FALSE; - mHasAlpha = - mSurface->GetContentType() == gfxASurface::CONTENT_COLOR_ALPHA; } }