--- a/layout/base/nsLayoutUtils.h
+++ b/layout/base/nsLayoutUtils.h
@@ -107,16 +107,17 @@ class ImageIntRegion;
struct Resolution;
} // namespace image
namespace layers {
struct FrameMetrics;
struct ScrollMetadata;
class Image;
class StackingContextHelper;
class Layer;
+class WebRenderLayerManager;
} // namespace layers
} // namespace mozilla
// Flags to customize the behavior of nsLayoutUtils::DrawString.
enum class DrawStringFlags {
Default = 0x0,
ForceHorizontal = 0x1 // Forces the text to be drawn horizontally.
@@ -2700,31 +2701,31 @@ class nsLayoutUtils {
/**
* Log a key/value pair for APZ testing during a paint.
* @param aManager The data will be written to the APZTestData associated
* with this layer manager.
* @param aScrollId Identifies the scroll frame to which the data pertains.
* @param aKey The key under which to log the data.
* @param aValue The value of the data to be logged.
*/
- static void LogTestDataForPaint(mozilla::layers::LayerManager* aManager,
- ViewID aScrollId, const std::string& aKey,
- const std::string& aValue) {
+ static void LogTestDataForPaint(
+ mozilla::layers::WebRenderLayerManager* aManager, ViewID aScrollId,
+ const std::string& aKey, const std::string& aValue) {
DoLogTestDataForPaint(aManager, aScrollId, aKey, aValue);
}
/**
* A convenience overload of LogTestDataForPaint() that accepts any type
* as the value, and passes it through mozilla::ToString() to obtain a string
* value. The type passed must support streaming to an std::ostream.
*/
template <typename Value>
- static void LogTestDataForPaint(mozilla::layers::LayerManager* aManager,
- ViewID aScrollId, const std::string& aKey,
- const Value& aValue) {
+ static void LogTestDataForPaint(
+ mozilla::layers::WebRenderLayerManager* aManager, ViewID aScrollId,
+ const std::string& aKey, const Value& aValue) {
DoLogTestDataForPaint(aManager, aScrollId, aKey, mozilla::ToString(aValue));
}
/**
* Calculate a basic FrameMetrics with enough fields set to perform some
* layout calculations. The fields set are dev-to-css ratio, pres shell
* resolution, cumulative resolution, zoom, composition size, root
* composition size, scroll offset and scrollable rect.
@@ -2755,28 +2756,28 @@ class nsLayoutUtils {
* returns true for those, and returns false for other origins like APZ
* itself, or scroll position updates from the history restore code.
*/
static bool CanScrollOriginClobberApz(ScrollOrigin aScrollOrigin);
static ScrollMetadata ComputeScrollMetadata(
const nsIFrame* aForFrame, const nsIFrame* aScrollFrame,
nsIContent* aContent, const nsIFrame* aReferenceFrame,
- mozilla::layers::LayerManager* aLayerManager, ViewID aScrollParentId,
- const nsSize& aScrollPortSize, const mozilla::Maybe<nsRect>& aClipRect,
- bool aIsRoot);
+ mozilla::layers::WebRenderLayerManager* aLayerManager,
+ ViewID aScrollParentId, const nsSize& aScrollPortSize,
+ const mozilla::Maybe<nsRect>& aClipRect, bool aIsRoot);
/**
* Returns the metadata to put onto the root layer of a layer tree, if one is
* needed. The last argument is a callback function to check if the caller
* already has a metadata for a given scroll id.
*/
static mozilla::Maybe<ScrollMetadata> GetRootMetadata(
nsDisplayListBuilder* aBuilder,
- mozilla::layers::LayerManager* aLayerManager,
+ mozilla::layers::WebRenderLayerManager* aLayerManager,
const std::function<bool(ViewID& aScrollId)>& aCallback);
/**
* If the given scroll frame needs an area excluded from its composition
* bounds due to scrollbars, return that area, otherwise return an empty
* margin.
* There is no need to exclude scrollbars in the following cases:
* - If the scroll frame is not the RCD-RSF; in that case, the composition
@@ -3004,19 +3005,19 @@ class nsLayoutUtils {
* Note CSS clip or clip-path isn't accounted for.
**/
static nsIFrame* GetNearestOverflowClipFrame(nsIFrame* aFrame);
private:
/**
* Helper function for LogTestDataForPaint().
*/
- static void DoLogTestDataForPaint(mozilla::layers::LayerManager* aManager,
- ViewID aScrollId, const std::string& aKey,
- const std::string& aValue);
+ static void DoLogTestDataForPaint(
+ mozilla::layers::WebRenderLayerManager* aManager, ViewID aScrollId,
+ const std::string& aKey, const std::string& aValue);
static bool IsAPZTestLoggingEnabled();
static void ConstrainToCoordValues(gfxFloat& aStart, gfxFloat& aSize);
static void ConstrainToCoordValues(float& aStart, float& aSize);
};
MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(nsLayoutUtils::PaintFrameFlags)