mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset c1cc52b986f8 (bug 1049258) for breaking non-unified windows builds
This commit is contained in:
parent
73d872a4e5
commit
18b29adc19
@ -35,8 +35,6 @@
|
||||
#include "nsTArray.h" // for nsAutoTArray
|
||||
#include "TextRenderer.h" // for TextRenderer
|
||||
#include <vector>
|
||||
#include "GeckoProfiler.h" // for GeckoProfiler
|
||||
#include "ProfilerMarkers.h" // for ProfilerMarkers
|
||||
|
||||
#define CULLING_LOG(...)
|
||||
// #define CULLING_LOG(...) printf_stderr("CULLING: " __VA_ARGS__)
|
||||
@ -117,9 +115,7 @@ static void DrawLayerInfo(const RenderTargetIntRect& aClipRect,
|
||||
|
||||
static void PrintUniformityInfo(Layer* aLayer)
|
||||
{
|
||||
if (!profiler_is_active()) {
|
||||
return;
|
||||
}
|
||||
static TimeStamp t0 = TimeStamp::Now();
|
||||
|
||||
// Don't want to print a log for smaller layers
|
||||
if (aLayer->GetEffectiveVisibleRegion().GetBounds().width < 300 ||
|
||||
@ -131,10 +127,10 @@ static void PrintUniformityInfo(Layer* aLayer)
|
||||
if (!transform.Is2D()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Point translation = transform.As2D().GetTranslation();
|
||||
LayerTranslationPayload* payload = new LayerTranslationPayload(aLayer, translation);
|
||||
PROFILER_MARKER_PAYLOAD("LayerTranslation", payload);
|
||||
printf_stderr("UniformityInfo Layer_Move %llu %p %s\n",
|
||||
(unsigned long long)(TimeStamp::Now() - t0).ToMilliseconds(), aLayer,
|
||||
ToString(translation).c_str());
|
||||
}
|
||||
|
||||
/* all of the per-layer prepared data we need to maintain */
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include "ProfilerMarkers.h"
|
||||
#include "gfxASurface.h"
|
||||
#include "SyncProfile.h"
|
||||
#include "Layers.h"
|
||||
|
||||
ProfilerMarkerPayload::ProfilerMarkerPayload(ProfilerBacktrace* aStack)
|
||||
: mStack(aStack)
|
||||
@ -125,46 +124,9 @@ IOMarkerPayload::streamPayloadImp(JSStreamWriter& b)
|
||||
b.EndObject();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ProfilerJSEventMarker(const char *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 "mozilla/TimeStamp.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
|
||||
@ -129,43 +122,4 @@ private:
|
||||
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
|
||||
|
@ -15,7 +15,6 @@ if CONFIG['MOZ_ENABLE_PROFILER_SPS']:
|
||||
EXPORTS += [
|
||||
'GeckoProfilerFunc.h',
|
||||
'GeckoProfilerImpl.h',
|
||||
'JSStreamWriter.h',
|
||||
'ProfilerMarkers.h',
|
||||
'PseudoStack.h',
|
||||
'shared-libraries.h',
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "GeckoProfiler.h"
|
||||
#include "GeckoTouchDispatcher.h"
|
||||
#include "InputData.h"
|
||||
#include "ProfilerMarkers.h"
|
||||
#include "base/basictypes.h"
|
||||
#include "gfxPrefs.h"
|
||||
#include "libui/Input.h"
|
||||
@ -380,7 +379,7 @@ GeckoTouchDispatcher::DispatchTouchEvent(MultiTouchInput& aMultiTouch)
|
||||
WidgetTouchEvent event = aMultiTouch.ToWidgetTouchEvent(nullptr);
|
||||
nsEventStatus status = nsWindow::DispatchInputEvent(event, &captured);
|
||||
|
||||
if (mEnabledUniformityInfo && profiler_is_active()) {
|
||||
if (mEnabledUniformityInfo) {
|
||||
const char* touchAction = "Invalid";
|
||||
switch (aMultiTouch.mType) {
|
||||
case MultiTouchInput::MULTITOUCH_START:
|
||||
@ -395,9 +394,11 @@ GeckoTouchDispatcher::DispatchTouchEvent(MultiTouchInput& aMultiTouch)
|
||||
break;
|
||||
}
|
||||
|
||||
const ScreenIntPoint& touchPoint = aMultiTouch.mTouches[0].mScreenPoint;
|
||||
TouchDataPayload* payload = new TouchDataPayload(touchPoint);
|
||||
PROFILER_MARKER_PAYLOAD(touchAction, payload);
|
||||
const SingleTouchData& firstTouch = aMultiTouch.mTouches[0];
|
||||
const ScreenIntPoint& touchPoint = firstTouch.mScreenPoint;
|
||||
|
||||
LOG("UniformityInfo %s %llu %d %d", touchAction, systemTime(SYSTEM_TIME_MONOTONIC),
|
||||
touchPoint.x, touchPoint.y);
|
||||
}
|
||||
|
||||
if (!captured && (aMultiTouch.mTouches.Length() == 1)) {
|
||||
|
Loading…
Reference in New Issue
Block a user