Backed out changeset c1cc52b986f8 (bug 1049258) for breaking non-unified windows builds
This commit is contained in:
@@ -35,8 +35,6 @@
|
|||||||
#include "nsTArray.h" // for nsAutoTArray
|
#include "nsTArray.h" // for nsAutoTArray
|
||||||
#include "TextRenderer.h" // for TextRenderer
|
#include "TextRenderer.h" // for TextRenderer
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "GeckoProfiler.h" // for GeckoProfiler
|
|
||||||
#include "ProfilerMarkers.h" // for ProfilerMarkers
|
|
||||||
|
|
||||||
#define CULLING_LOG(...)
|
#define CULLING_LOG(...)
|
||||||
// #define CULLING_LOG(...) printf_stderr("CULLING: " __VA_ARGS__)
|
// #define CULLING_LOG(...) printf_stderr("CULLING: " __VA_ARGS__)
|
||||||
@@ -117,9 +115,7 @@ static void DrawLayerInfo(const RenderTargetIntRect& aClipRect,
|
|||||||
|
|
||||||
static void PrintUniformityInfo(Layer* aLayer)
|
static void PrintUniformityInfo(Layer* aLayer)
|
||||||
{
|
{
|
||||||
if (!profiler_is_active()) {
|
static TimeStamp t0 = TimeStamp::Now();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Don't want to print a log for smaller layers
|
// Don't want to print a log for smaller layers
|
||||||
if (aLayer->GetEffectiveVisibleRegion().GetBounds().width < 300 ||
|
if (aLayer->GetEffectiveVisibleRegion().GetBounds().width < 300 ||
|
||||||
@@ -131,10 +127,10 @@ static void PrintUniformityInfo(Layer* aLayer)
|
|||||||
if (!transform.Is2D()) {
|
if (!transform.Is2D()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Point translation = transform.As2D().GetTranslation();
|
Point translation = transform.As2D().GetTranslation();
|
||||||
LayerTranslationPayload* payload = new LayerTranslationPayload(aLayer, translation);
|
printf_stderr("UniformityInfo Layer_Move %llu %p %s\n",
|
||||||
PROFILER_MARKER_PAYLOAD("LayerTranslation", payload);
|
(unsigned long long)(TimeStamp::Now() - t0).ToMilliseconds(), aLayer,
|
||||||
|
ToString(translation).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
/* all of the per-layer prepared data we need to maintain */
|
/* all of the per-layer prepared data we need to maintain */
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
#include "ProfilerMarkers.h"
|
#include "ProfilerMarkers.h"
|
||||||
#include "gfxASurface.h"
|
#include "gfxASurface.h"
|
||||||
#include "SyncProfile.h"
|
#include "SyncProfile.h"
|
||||||
#include "Layers.h"
|
|
||||||
|
|
||||||
ProfilerMarkerPayload::ProfilerMarkerPayload(ProfilerBacktrace* aStack)
|
ProfilerMarkerPayload::ProfilerMarkerPayload(ProfilerBacktrace* aStack)
|
||||||
: mStack(aStack)
|
: mStack(aStack)
|
||||||
@@ -125,46 +124,9 @@ IOMarkerPayload::streamPayloadImp(JSStreamWriter& b)
|
|||||||
b.EndObject();
|
b.EndObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ProfilerJSEventMarker(const char *event)
|
ProfilerJSEventMarker(const char *event)
|
||||||
{
|
{
|
||||||
PROFILER_MARKER(event);
|
PROFILER_MARKER(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
LayerTranslationPayload::LayerTranslationPayload(mozilla::layers::Layer* aLayer,
|
|
||||||
mozilla::gfx::Point aPoint)
|
|
||||||
: ProfilerMarkerPayload(mozilla::TimeStamp::Now(), mozilla::TimeStamp::Now(), nullptr)
|
|
||||||
, mLayer(aLayer)
|
|
||||||
, mPoint(aPoint)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
LayerTranslationPayload::streamPayloadImpl(JSStreamWriter& b)
|
|
||||||
{
|
|
||||||
const size_t bufferSize = 32;
|
|
||||||
char buffer[bufferSize];
|
|
||||||
snprintf(buffer, bufferSize, "%p", mLayer);
|
|
||||||
|
|
||||||
b.BeginObject();
|
|
||||||
b.NameValue("layer", buffer);
|
|
||||||
b.NameValue("x", mPoint.x);
|
|
||||||
b.NameValue("y", mPoint.y);
|
|
||||||
b.NameValue("category", "LayerTranslation");
|
|
||||||
b.EndObject();
|
|
||||||
}
|
|
||||||
|
|
||||||
TouchDataPayload::TouchDataPayload(const mozilla::ScreenIntPoint& aPoint)
|
|
||||||
: ProfilerMarkerPayload(mozilla::TimeStamp::Now(), mozilla::TimeStamp::Now(), nullptr)
|
|
||||||
{
|
|
||||||
mPoint = aPoint;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
TouchDataPayload::streamPayloadImpl(JSStreamWriter& b)
|
|
||||||
{
|
|
||||||
b.BeginObject();
|
|
||||||
b.NameValue("x", mPoint.x);
|
|
||||||
b.NameValue("y", mPoint.y);
|
|
||||||
b.EndObject();
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -9,13 +9,6 @@
|
|||||||
#include "JSStreamWriter.h"
|
#include "JSStreamWriter.h"
|
||||||
#include "mozilla/TimeStamp.h"
|
#include "mozilla/TimeStamp.h"
|
||||||
#include "nsAutoPtr.h"
|
#include "nsAutoPtr.h"
|
||||||
#include "Units.h" // For ScreenIntPoint
|
|
||||||
|
|
||||||
namespace mozilla {
|
|
||||||
namespace layers {
|
|
||||||
class Layer;
|
|
||||||
} // layers
|
|
||||||
} // mozilla
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is an abstract object that can be implied to supply
|
* This is an abstract object that can be implied to supply
|
||||||
@@ -129,43 +122,4 @@ private:
|
|||||||
char* mFilename;
|
char* mFilename;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* Contains the translation applied to a 2d layer so we can
|
|
||||||
* track the layer position at each frame.
|
|
||||||
*/
|
|
||||||
class LayerTranslationPayload : public ProfilerMarkerPayload
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
LayerTranslationPayload(mozilla::layers::Layer* aLayer,
|
|
||||||
mozilla::gfx::Point aPoint);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual void
|
|
||||||
streamPayload(JSStreamWriter& b) { return streamPayloadImpl(b); }
|
|
||||||
|
|
||||||
private:
|
|
||||||
void streamPayloadImpl(JSStreamWriter& b);
|
|
||||||
mozilla::layers::Layer* mLayer;
|
|
||||||
mozilla::gfx::Point mPoint;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tracks when touch events are processed by gecko, not when
|
|
||||||
* the touch actually occured in gonk/android.
|
|
||||||
*/
|
|
||||||
class TouchDataPayload : public ProfilerMarkerPayload
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
TouchDataPayload(const mozilla::ScreenIntPoint& aPoint);
|
|
||||||
virtual ~TouchDataPayload() {}
|
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual void
|
|
||||||
streamPayload(JSStreamWriter& b) { return streamPayloadImpl(b); }
|
|
||||||
|
|
||||||
private:
|
|
||||||
void streamPayloadImpl(JSStreamWriter& b);
|
|
||||||
mozilla::ScreenIntPoint mPoint;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // PROFILER_MARKERS_H
|
#endif // PROFILER_MARKERS_H
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ if CONFIG['MOZ_ENABLE_PROFILER_SPS']:
|
|||||||
EXPORTS += [
|
EXPORTS += [
|
||||||
'GeckoProfilerFunc.h',
|
'GeckoProfilerFunc.h',
|
||||||
'GeckoProfilerImpl.h',
|
'GeckoProfilerImpl.h',
|
||||||
'JSStreamWriter.h',
|
|
||||||
'ProfilerMarkers.h',
|
'ProfilerMarkers.h',
|
||||||
'PseudoStack.h',
|
'PseudoStack.h',
|
||||||
'shared-libraries.h',
|
'shared-libraries.h',
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
#include "GeckoProfiler.h"
|
#include "GeckoProfiler.h"
|
||||||
#include "GeckoTouchDispatcher.h"
|
#include "GeckoTouchDispatcher.h"
|
||||||
#include "InputData.h"
|
#include "InputData.h"
|
||||||
#include "ProfilerMarkers.h"
|
|
||||||
#include "base/basictypes.h"
|
#include "base/basictypes.h"
|
||||||
#include "gfxPrefs.h"
|
#include "gfxPrefs.h"
|
||||||
#include "libui/Input.h"
|
#include "libui/Input.h"
|
||||||
@@ -380,7 +379,7 @@ GeckoTouchDispatcher::DispatchTouchEvent(MultiTouchInput& aMultiTouch)
|
|||||||
WidgetTouchEvent event = aMultiTouch.ToWidgetTouchEvent(nullptr);
|
WidgetTouchEvent event = aMultiTouch.ToWidgetTouchEvent(nullptr);
|
||||||
nsEventStatus status = nsWindow::DispatchInputEvent(event, &captured);
|
nsEventStatus status = nsWindow::DispatchInputEvent(event, &captured);
|
||||||
|
|
||||||
if (mEnabledUniformityInfo && profiler_is_active()) {
|
if (mEnabledUniformityInfo) {
|
||||||
const char* touchAction = "Invalid";
|
const char* touchAction = "Invalid";
|
||||||
switch (aMultiTouch.mType) {
|
switch (aMultiTouch.mType) {
|
||||||
case MultiTouchInput::MULTITOUCH_START:
|
case MultiTouchInput::MULTITOUCH_START:
|
||||||
@@ -395,9 +394,11 @@ GeckoTouchDispatcher::DispatchTouchEvent(MultiTouchInput& aMultiTouch)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ScreenIntPoint& touchPoint = aMultiTouch.mTouches[0].mScreenPoint;
|
const SingleTouchData& firstTouch = aMultiTouch.mTouches[0];
|
||||||
TouchDataPayload* payload = new TouchDataPayload(touchPoint);
|
const ScreenIntPoint& touchPoint = firstTouch.mScreenPoint;
|
||||||
PROFILER_MARKER_PAYLOAD(touchAction, payload);
|
|
||||||
|
LOG("UniformityInfo %s %llu %d %d", touchAction, systemTime(SYSTEM_TIME_MONOTONIC),
|
||||||
|
touchPoint.x, touchPoint.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!captured && (aMultiTouch.mTouches.Length() == 1)) {
|
if (!captured && (aMultiTouch.mTouches.Length() == 1)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user