author | Kartikaya Gupta <kgupta@mozilla.com> |
Tue, 25 Nov 2014 08:45:20 -0500 | |
changeset 217485 | a607fab88b666fb1d575a555fdc81b57a0c01132 |
parent 217484 | 049a47cc8b9cb8e168d482e1d4773cfd506f4e5a |
child 217486 | bfd17ac260a0272f8c52c166131ec00055b1a860 |
push id | 27882 |
push user | ryanvm@gmail.com |
push date | Tue, 25 Nov 2014 21:56:56 +0000 |
treeherder | mozilla-central@ced1402861b8 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | mattwoodrow |
bugs | 1104266 |
milestone | 36.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/gfx/layers/LayersLogging.cpp +++ b/gfx/layers/LayersLogging.cpp @@ -103,16 +103,33 @@ AppendToString(std::stringstream& aStrea aStream << pfx; aStream << nsPrintfCString( "(x=%d, y=%d, w=%d, h=%d)", r.x, r.y, r.width, r.height).get(); aStream << sfx; } void +AppendToString(std::stringstream& aStream, const nsRegion& r, + const char* pfx, const char* sfx) +{ + aStream << pfx; + + nsRegionRectIterator it(r); + aStream << "< "; + while (const nsRect* sr = it.Next()) { + AppendToString(aStream, *sr); + aStream << "; "; + } + aStream << ">"; + + aStream << sfx; +} + +void AppendToString(std::stringstream& aStream, const nsIntRegion& r, const char* pfx, const char* sfx) { aStream << pfx; nsIntRegionRectIterator it(r); aStream << "< "; while (const nsIntRect* sr = it.Next()) {
--- a/gfx/layers/LayersLogging.h +++ b/gfx/layers/LayersLogging.h @@ -8,17 +8,17 @@ #include "FrameMetrics.h" // for FrameMetrics, etc #include "GraphicsFilter.h" // for GraphicsFilter #include "mozilla/gfx/Point.h" // for IntSize, etc #include "mozilla/gfx/Types.h" // for Filter, SurfaceFormat #include "mozilla/layers/CompositorTypes.h" // for TextureFlags #include "nsAString.h" #include "nsPrintfCString.h" // for nsPrintfCString -#include "nsRegion.h" // for nsIntRegion +#include "nsRegion.h" // for nsRegion, nsIntRegion #include "nscore.h" // for nsACString, etc struct gfxRGBA; struct nsIntPoint; struct nsIntRect; struct nsIntSize; namespace mozilla { @@ -89,16 +89,20 @@ AppendToString(std::stringstream& aStrea aStream << pfx; aStream << nsPrintfCString( "(x=%d, y=%d, w=%d, h=%d)", r.x, r.y, r.width, r.height).get(); aStream << sfx; } void +AppendToString(std::stringstream& aStream, const nsRegion& r, + const char* pfx="", const char* sfx=""); + +void AppendToString(std::stringstream& aStream, const nsIntRegion& r, const char* pfx="", const char* sfx=""); void AppendToString(std::stringstream& aStream, const EventRegions& e, const char* pfx="", const char* sfx=""); void
--- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -2983,16 +2983,32 @@ nsDisplayLayerEventRegions::AddFrame(nsD } void nsDisplayLayerEventRegions::AddInactiveScrollPort(const nsRect& aRect) { mDispatchToContentHitRegion.Or(mDispatchToContentHitRegion, aRect); } +#ifdef MOZ_DUMP_PAINTING +void +nsDisplayLayerEventRegions::WriteDebugInfo(std::stringstream& aStream) +{ + if (!mHitRegion.IsEmpty()) { + AppendToString(aStream, mHitRegion, " (hitRegion ", ")"); + } + if (!mMaybeHitRegion.IsEmpty()) { + AppendToString(aStream, mMaybeHitRegion, " (maybeHitRegion ", ")"); + } + if (!mDispatchToContentHitRegion.IsEmpty()) { + AppendToString(aStream, mDispatchToContentHitRegion, " (dispatchToContentRegion ", ")"); + } +} +#endif + nsDisplayCaret::nsDisplayCaret(nsDisplayListBuilder* aBuilder, nsIFrame* aCaretFrame) : nsDisplayItem(aBuilder, aCaretFrame) , mCaret(aBuilder->GetCaret()) , mBounds(aBuilder->GetCaretRect() + ToReferenceFrame()) { MOZ_COUNT_CTOR(nsDisplayCaret); }
--- a/layout/base/nsDisplayList.h +++ b/layout/base/nsDisplayList.h @@ -2624,16 +2624,20 @@ public: // dispatch-to-content region, to ensure that APZ lets content create a // displayport. void AddInactiveScrollPort(const nsRect& aRect); const nsRegion& HitRegion() { return mHitRegion; } const nsRegion& MaybeHitRegion() { return mMaybeHitRegion; } const nsRegion& DispatchToContentHitRegion() { return mDispatchToContentHitRegion; } +#ifdef MOZ_DUMP_PAINTING + virtual void WriteDebugInfo(std::stringstream& aStream) MOZ_OVERRIDE; +#endif + private: // Relative to aFrame's reference frame. // These are the points that are definitely in the hit region. nsRegion mHitRegion; // These are points that may or may not be in the hit region. Only main-thread // event handling can tell for sure (e.g. because complex shapes are present). nsRegion mMaybeHitRegion; // These are points that need to be dispatched to the content thread for