mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1200021 - Part 2: more diagnostics. r=bas
This commit is contained in:
parent
7de0462cdc
commit
4a96e4a25a
@ -53,6 +53,10 @@ TextureClientDIB::BorrowDrawTarget()
|
||||
gfxPlatform::GetPlatform()->CreateDrawTargetForSurface(mSurface, mSize);
|
||||
}
|
||||
|
||||
if (!mDrawTarget) {
|
||||
gfxCriticalNote << "DIB failed draw target surface " << mSize << ", " << (int)mIsLocked << ", " << IsAllocated();
|
||||
}
|
||||
|
||||
return mDrawTarget;
|
||||
}
|
||||
|
||||
|
@ -424,7 +424,7 @@ TextureClientD3D11::BorrowDrawTarget()
|
||||
mDrawTarget = Factory::CreateDrawTargetForD3D10Texture(mTexture10, mFormat);
|
||||
}
|
||||
if (!mDrawTarget) {
|
||||
gfxWarning() << "Invalid draw target for borrowing";
|
||||
gfxCriticalNote << "Invalid draw target for borrowing D3D11 " << (int)mFormat;
|
||||
}
|
||||
return mDrawTarget;
|
||||
}
|
||||
|
@ -541,6 +541,7 @@ TextureClientD3D9::BorrowDrawTarget()
|
||||
MOZ_ASSERT(mIsLocked && mD3D9Surface);
|
||||
if (!mIsLocked || !mD3D9Surface) {
|
||||
NS_WARNING("Calling BorrowDrawTarget on an Unlocked TextureClient");
|
||||
gfxCriticalNote << "BorrowDrawTarget on an Unlocked TextureClient";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -552,10 +553,14 @@ TextureClientD3D9::BorrowDrawTarget()
|
||||
nsRefPtr<gfxASurface> surface = new gfxWindowsSurface(mD3D9Surface);
|
||||
if (!surface || surface->CairoStatus()) {
|
||||
NS_WARNING("Could not create surface for d3d9 surface");
|
||||
gfxCriticalNote << "Failed creation on D3D9";
|
||||
return nullptr;
|
||||
}
|
||||
mDrawTarget =
|
||||
gfxPlatform::GetPlatform()->CreateDrawTargetForSurface(surface, mSize);
|
||||
if (!mDrawTarget) {
|
||||
gfxCriticalNote << "Bad draw target creation for surface D3D9 " << mSize;
|
||||
}
|
||||
} else {
|
||||
// gfxWindowsSurface don't support transparency so we can't use the d3d9
|
||||
// windows surface optimization.
|
||||
@ -569,6 +574,9 @@ TextureClientD3D9::BorrowDrawTarget()
|
||||
mDrawTarget =
|
||||
gfxPlatform::GetPlatform()->CreateDrawTargetForData((uint8_t*)rect.pBits, mSize,
|
||||
rect.Pitch, mFormat);
|
||||
if (!mDrawTarget) {
|
||||
gfxCriticalNote << "Bad draw target creation for data D3D9 " << mSize << ", " << (int)mFormat;
|
||||
}
|
||||
mLockRect = true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user