зеркало из https://github.com/mozilla/pjs.git
Bug 589632 - Fix LayerManagerD3D9 debug output r=Bas, a=blocking2.0
This commit is contained in:
Родитель
e23facece9
Коммит
40535b1e32
|
@ -291,12 +291,12 @@ LayerManager::Dump(FILE* aFile, const char* aPrefix)
|
|||
|
||||
nsCAutoString pfx(aPrefix);
|
||||
pfx += " ";
|
||||
if (!mRoot) {
|
||||
if (!GetRoot()) {
|
||||
fprintf(file, "%s(null)", pfx.get());
|
||||
return;
|
||||
}
|
||||
|
||||
mRoot->Dump(file, pfx.get());
|
||||
GetRoot()->Dump(file, pfx.get());
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -317,12 +317,12 @@ LayerManager::Log(const char* aPrefix)
|
|||
|
||||
nsCAutoString pfx(aPrefix);
|
||||
pfx += " ";
|
||||
if (!mRoot) {
|
||||
if (!GetRoot()) {
|
||||
MOZ_LAYERS_LOG(("%s(null)", pfx.get()));
|
||||
return;
|
||||
}
|
||||
|
||||
mRoot->Log(pfx.get());
|
||||
GetRoot()->Log(pfx.get());
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -137,7 +137,7 @@ LayerManagerD3D9::EndTransaction(DrawThebesLayerCallback aCallback,
|
|||
void
|
||||
LayerManagerD3D9::SetRoot(Layer *aLayer)
|
||||
{
|
||||
mRootLayer = static_cast<LayerD3D9*>(aLayer->ImplData());
|
||||
mRoot = aLayer;
|
||||
}
|
||||
|
||||
already_AddRefed<ThebesLayer>
|
||||
|
@ -198,8 +198,8 @@ LayerManagerD3D9::Render()
|
|||
|
||||
device()->BeginScene();
|
||||
|
||||
if (mRootLayer) {
|
||||
const nsIntRect *clipRect = mRootLayer->GetLayer()->GetClipRect();
|
||||
if (mRoot) {
|
||||
const nsIntRect *clipRect = mRoot->GetClipRect();
|
||||
RECT r;
|
||||
if (clipRect) {
|
||||
r.left = (LONG)clipRect->x;
|
||||
|
@ -213,7 +213,7 @@ LayerManagerD3D9::Render()
|
|||
}
|
||||
device()->SetScissorRect(&r);
|
||||
|
||||
mRootLayer->RenderLayer();
|
||||
static_cast<LayerD3D9*>(mRoot->ImplData())->RenderLayer();
|
||||
}
|
||||
|
||||
device()->EndScene();
|
||||
|
|
|
@ -145,6 +145,10 @@ public:
|
|||
mDeviceManager = nsnull;
|
||||
}
|
||||
|
||||
#ifdef MOZ_LAYERS_HAVE_LOG
|
||||
virtual const char* Name() const { return "D3D9"; }
|
||||
#endif // MOZ_LAYERS_HAVE_LOG
|
||||
|
||||
private:
|
||||
/* Device manager instance */
|
||||
static DeviceManagerD3D9 *mDeviceManager;
|
||||
|
@ -160,9 +164,6 @@ private:
|
|||
*/
|
||||
nsRefPtr<gfxContext> mTarget;
|
||||
|
||||
/* Current root layer. */
|
||||
LayerD3D9 *mRootLayer;
|
||||
|
||||
/* Callback info for current transaction */
|
||||
CallbackInfo mCurrentCallbackInfo;
|
||||
|
||||
|
|
|
@ -293,6 +293,10 @@ public:
|
|||
aFlipped);
|
||||
}
|
||||
|
||||
#ifdef MOZ_LAYERS_HAVE_LOG
|
||||
virtual const char* Name() const { return "OGL"; }
|
||||
#endif // MOZ_LAYERS_HAVE_LOG
|
||||
|
||||
private:
|
||||
/** Widget associated with this layer manager */
|
||||
nsIWidget *mWidget;
|
||||
|
|
Загрузка…
Ссылка в новой задаче