зеркало из https://github.com/mozilla/gecko-dev.git
Remove ifdefs from RenderTrace and enable it on composite
--HG-- extra : rebase_source : 6d6af824d02b90ac0e43855ce179aa0233b40c5b
This commit is contained in:
Родитель
8d197f4d70
Коммит
ceaa4127a7
|
@ -43,14 +43,13 @@
|
||||||
|
|
||||||
// Uncomment this line to enable RENDERTRACE
|
// Uncomment this line to enable RENDERTRACE
|
||||||
//#define MOZ_RENDERTRACE
|
//#define MOZ_RENDERTRACE
|
||||||
#ifdef MOZ_RENDERTRACE
|
|
||||||
|
|
||||||
#include "gfx3DMatrix.h"
|
|
||||||
#include "nsRect.h"
|
|
||||||
|
|
||||||
#ifndef GFX_RENDERTRACE_H
|
#ifndef GFX_RENDERTRACE_H
|
||||||
#define GFX_RENDERTRACE_H
|
#define GFX_RENDERTRACE_H
|
||||||
|
|
||||||
|
#include "gfx3DMatrix.h"
|
||||||
|
#include "nsRect.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace layers {
|
namespace layers {
|
||||||
|
|
||||||
|
@ -61,9 +60,19 @@ void RenderTraceLayers(Layer *aLayer, const char *aColor, gfx3DMatrix aRootTrans
|
||||||
void RenderTraceInvalidateStart(Layer *aLayer, const char *aColor, nsIntRect aRect);
|
void RenderTraceInvalidateStart(Layer *aLayer, const char *aColor, nsIntRect aRect);
|
||||||
void RenderTraceInvalidateEnd(Layer *aLayer, const char *aColor);
|
void RenderTraceInvalidateEnd(Layer *aLayer, const char *aColor);
|
||||||
|
|
||||||
|
#ifndef MOZ_RENDERTRACE
|
||||||
|
inline void RenderTraceLayers(Layer *aLayer, const char *aColor, gfx3DMatrix aRootTransform, bool aReset)
|
||||||
|
{}
|
||||||
|
|
||||||
|
inline void RenderTraceInvalidateStart(Layer *aLayer, const char *aColor, nsIntRect aRect)
|
||||||
|
{}
|
||||||
|
|
||||||
|
inline void RenderTraceInvalidateEnd(Layer *aLayer, const char *aColor)
|
||||||
|
{}
|
||||||
|
|
||||||
|
#endif // MOZ_RENDERTRACE
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //GFX_RENDERTRACE_H
|
#endif //GFX_RENDERTRACE_H
|
||||||
|
|
||||||
#endif // MOZ_RENDERTRACE
|
|
||||||
|
|
|
@ -690,9 +690,7 @@ BasicThebesLayer::PaintThebes(gfxContext* aContext,
|
||||||
|
|
||||||
nsIntRegion toDraw = IntersectWithClip(GetEffectiveVisibleRegion(), aContext);
|
nsIntRegion toDraw = IntersectWithClip(GetEffectiveVisibleRegion(), aContext);
|
||||||
|
|
||||||
#ifdef MOZ_RENDERTRACE
|
|
||||||
RenderTraceInvalidateStart(this, "FF00", toDraw.GetBounds());
|
RenderTraceInvalidateStart(this, "FF00", toDraw.GetBounds());
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!toDraw.IsEmpty() && !IsHidden()) {
|
if (!toDraw.IsEmpty() && !IsHidden()) {
|
||||||
if (!aCallback) {
|
if (!aCallback) {
|
||||||
|
@ -730,9 +728,7 @@ BasicThebesLayer::PaintThebes(gfxContext* aContext,
|
||||||
aContext->Restore();
|
aContext->Restore();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MOZ_RENDERTRACE
|
|
||||||
RenderTraceInvalidateEnd(this, "FF00");
|
RenderTraceInvalidateEnd(this, "FF00");
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -759,9 +755,7 @@ BasicThebesLayer::PaintThebes(gfxContext* aContext,
|
||||||
nsIntRegion extendedDrawRegion = state.mRegionToDraw;
|
nsIntRegion extendedDrawRegion = state.mRegionToDraw;
|
||||||
SetAntialiasingFlags(this, state.mContext);
|
SetAntialiasingFlags(this, state.mContext);
|
||||||
|
|
||||||
#ifdef MOZ_RENDERTRACE
|
|
||||||
RenderTraceInvalidateStart(this, "FF00", state.mRegionToDraw.GetBounds());
|
RenderTraceInvalidateStart(this, "FF00", state.mRegionToDraw.GetBounds());
|
||||||
#endif
|
|
||||||
|
|
||||||
PaintBuffer(state.mContext,
|
PaintBuffer(state.mContext,
|
||||||
state.mRegionToDraw, extendedDrawRegion, state.mRegionToInvalidate,
|
state.mRegionToDraw, extendedDrawRegion, state.mRegionToInvalidate,
|
||||||
|
@ -769,9 +763,7 @@ BasicThebesLayer::PaintThebes(gfxContext* aContext,
|
||||||
aCallback, aCallbackData);
|
aCallback, aCallbackData);
|
||||||
Mutated();
|
Mutated();
|
||||||
|
|
||||||
#ifdef MOZ_RENDERTRACE
|
|
||||||
RenderTraceInvalidateEnd(this, "FF00");
|
RenderTraceInvalidateEnd(this, "FF00");
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
// It's possible that state.mRegionToInvalidate is nonempty here,
|
// It's possible that state.mRegionToInvalidate is nonempty here,
|
||||||
// if we are shrinking the valid region to nothing.
|
// if we are shrinking the valid region to nothing.
|
||||||
|
@ -1617,10 +1609,8 @@ BasicLayerManager::EndTransactionInternal(DrawThebesLayerCallback aCallback,
|
||||||
mPhase = PHASE_DRAWING;
|
mPhase = PHASE_DRAWING;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MOZ_RENDERTRACE
|
|
||||||
Layer* aLayer = GetRoot();
|
Layer* aLayer = GetRoot();
|
||||||
RenderTraceLayers(aLayer, "FF00");
|
RenderTraceLayers(aLayer, "FF00");
|
||||||
#endif
|
|
||||||
|
|
||||||
mTransactionIncomplete = false;
|
mTransactionIncomplete = false;
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
#include "LayerManagerOGL.h"
|
#include "LayerManagerOGL.h"
|
||||||
#include "nsIWidget.h"
|
#include "nsIWidget.h"
|
||||||
#include "nsGkAtoms.h"
|
#include "nsGkAtoms.h"
|
||||||
|
#include "RenderTrace.h"
|
||||||
|
|
||||||
#if defined(MOZ_WIDGET_ANDROID)
|
#if defined(MOZ_WIDGET_ANDROID)
|
||||||
#include "AndroidBridge.h"
|
#include "AndroidBridge.h"
|
||||||
|
@ -177,17 +178,15 @@ CompositorParent::Composite()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MOZ_RENDERTRACE
|
|
||||||
Layer* aLayer = mLayerManager->GetRoot();
|
|
||||||
mozilla::layers::RenderTraceLayers(aLayer, "0000");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef MOZ_WIDGET_ANDROID
|
#ifdef MOZ_WIDGET_ANDROID
|
||||||
RequestViewTransform();
|
RequestViewTransform();
|
||||||
printf_stderr("Correcting for position fixed %i, %i\n", -mScrollOffset.x, -mScrollOffset.y);
|
printf_stderr("Correcting for position fixed %i, %i\n", -mScrollOffset.x, -mScrollOffset.y);
|
||||||
TransformShadowTree();
|
TransformShadowTree();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Layer* aLayer = mLayerManager->GetRoot();
|
||||||
|
mozilla::layers::RenderTraceLayers(aLayer, "0000");
|
||||||
|
|
||||||
mLayerManager->EndEmptyTransaction();
|
mLayerManager->EndEmptyTransaction();
|
||||||
|
|
||||||
#ifdef COMPOSITOR_PERFORMANCE_WARNING
|
#ifdef COMPOSITOR_PERFORMANCE_WARNING
|
||||||
|
|
|
@ -323,9 +323,7 @@ ShadowLayersParent::RecvUpdate(const InfallibleTArray<Edit>& cset,
|
||||||
static_cast<ShadowThebesLayer*>(shadow->AsLayer());
|
static_cast<ShadowThebesLayer*>(shadow->AsLayer());
|
||||||
const ThebesBuffer& newFront = op.newFrontBuffer();
|
const ThebesBuffer& newFront = op.newFrontBuffer();
|
||||||
|
|
||||||
#ifdef MOZ_RENDERTRACE
|
|
||||||
RenderTraceInvalidateStart(thebes, "00FF", op.updatedRegion().GetBounds());
|
RenderTraceInvalidateStart(thebes, "00FF", op.updatedRegion().GetBounds());
|
||||||
#endif
|
|
||||||
|
|
||||||
OptionalThebesBuffer newBack;
|
OptionalThebesBuffer newBack;
|
||||||
nsIntRegion newValidRegion;
|
nsIntRegion newValidRegion;
|
||||||
|
@ -340,9 +338,7 @@ ShadowLayersParent::RecvUpdate(const InfallibleTArray<Edit>& cset,
|
||||||
newBack, newValidRegion,
|
newBack, newValidRegion,
|
||||||
readonlyFront, frontUpdatedRegion));
|
readonlyFront, frontUpdatedRegion));
|
||||||
|
|
||||||
#ifdef MOZ_RENDERTRACE
|
|
||||||
RenderTraceInvalidateEnd(thebes, "00FF");
|
RenderTraceInvalidateEnd(thebes, "00FF");
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Edit::TOpPaintCanvas: {
|
case Edit::TOpPaintCanvas: {
|
||||||
|
@ -353,9 +349,7 @@ ShadowLayersParent::RecvUpdate(const InfallibleTArray<Edit>& cset,
|
||||||
ShadowCanvasLayer* canvas =
|
ShadowCanvasLayer* canvas =
|
||||||
static_cast<ShadowCanvasLayer*>(shadow->AsLayer());
|
static_cast<ShadowCanvasLayer*>(shadow->AsLayer());
|
||||||
|
|
||||||
#ifdef MOZ_RENDERTRACE
|
|
||||||
RenderTraceInvalidateStart(canvas, "00FF", canvas->GetVisibleRegion().GetBounds());
|
RenderTraceInvalidateStart(canvas, "00FF", canvas->GetVisibleRegion().GetBounds());
|
||||||
#endif
|
|
||||||
|
|
||||||
canvas->SetAllocator(this);
|
canvas->SetAllocator(this);
|
||||||
CanvasSurface newBack;
|
CanvasSurface newBack;
|
||||||
|
@ -364,9 +358,7 @@ ShadowLayersParent::RecvUpdate(const InfallibleTArray<Edit>& cset,
|
||||||
replyv.push_back(OpBufferSwap(shadow, NULL,
|
replyv.push_back(OpBufferSwap(shadow, NULL,
|
||||||
newBack));
|
newBack));
|
||||||
|
|
||||||
#ifdef MOZ_RENDERTRACE
|
|
||||||
RenderTraceInvalidateEnd(canvas, "00FF");
|
RenderTraceInvalidateEnd(canvas, "00FF");
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Edit::TOpPaintImage: {
|
case Edit::TOpPaintImage: {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче