diff --git a/gfx/layers/Compositor.h b/gfx/layers/Compositor.h index af8dc5677a9f..f8c50354ff65 100644 --- a/gfx/layers/Compositor.h +++ b/gfx/layers/Compositor.h @@ -257,7 +257,7 @@ public: * Declare an offset to use when rendering layers. This will be ignored when * rendering to a target instead of the screen. */ - virtual void SetScreenRenderOffset(const gfx::Point& aOffset) = 0; + virtual void SetScreenRenderOffset(const ScreenPoint& aOffset) = 0; /** * Tell the compositor to actually draw a quad. What to do draw and how it is diff --git a/gfx/layers/basic/BasicCompositor.h b/gfx/layers/basic/BasicCompositor.h index 6f838d4fbffe..196467860148 100644 --- a/gfx/layers/basic/BasicCompositor.h +++ b/gfx/layers/basic/BasicCompositor.h @@ -83,7 +83,7 @@ public: mCopyTarget = aTarget; } - virtual void SetScreenRenderOffset(const gfx::Point& aOffset) MOZ_OVERRIDE { + virtual void SetScreenRenderOffset(const ScreenPoint& aOffset) MOZ_OVERRIDE { } virtual void MakeCurrent(MakeCurrentFlags aFlags = 0) { } diff --git a/gfx/layers/composite/AsyncCompositionManager.cpp b/gfx/layers/composite/AsyncCompositionManager.cpp index a44b86e345f5..f69e4294d6fa 100644 --- a/gfx/layers/composite/AsyncCompositionManager.cpp +++ b/gfx/layers/composite/AsyncCompositionManager.cpp @@ -354,7 +354,7 @@ AsyncCompositionManager::ApplyAsyncContentTransformToTree(TimeStamp aCurrentFram gfx::Rect displayPortLayersPixels(metrics.mCriticalDisplayPort.IsEmpty() ? metrics.mDisplayPort : metrics.mCriticalDisplayPort); gfx::Margin fixedLayerMargins(0, 0, 0, 0); - gfx::Point offset(0, 0); + ScreenPoint offset(0, 0); SyncFrameMetrics(scrollOffset, treeTransform.mScale.width, metrics.mScrollableRect, mLayersUpdated, displayPortLayersPixels, 1 / rootTransform.GetXScale(), mIsFirstPaint, fixedLayerMargins, offset); @@ -435,7 +435,7 @@ AsyncCompositionManager::TransformScrollableLayer(Layer* aLayer, const gfx3DMatr displayPort.y += scrollOffsetLayerPixels.y; gfx::Margin fixedLayerMargins(0, 0, 0, 0); - gfx::Point offset(0, 0); + ScreenPoint offset(0, 0); ScreenPoint scrollOffset(0, 0); float scaleX = 1.0, scaleY = 1.0; @@ -577,7 +577,7 @@ AsyncCompositionManager::SyncViewportInfo(const LayerIntRect& aDisplayPort, ScreenPoint& aScrollOffset, float& aScaleX, float& aScaleY, gfx::Margin& aFixedLayerMargins, - gfx::Point& aOffset) + ScreenPoint& aOffset) { #ifdef MOZ_WIDGET_ANDROID AndroidBridge::Bridge()->SyncViewportInfo(aDisplayPort, @@ -599,7 +599,7 @@ AsyncCompositionManager::SyncFrameMetrics(const gfx::Point& aScrollOffset, float aDisplayResolution, bool aIsFirstPaint, gfx::Margin& aFixedLayerMargins, - gfx::Point& aOffset) + ScreenPoint& aOffset) { #ifdef MOZ_WIDGET_ANDROID AndroidBridge::Bridge()->SyncFrameMetrics(aScrollOffset, aZoom, aCssPageRect, diff --git a/gfx/layers/composite/AsyncCompositionManager.h b/gfx/layers/composite/AsyncCompositionManager.h index ae3bbb12d0c7..9e932ef6c94f 100644 --- a/gfx/layers/composite/AsyncCompositionManager.h +++ b/gfx/layers/composite/AsyncCompositionManager.h @@ -125,7 +125,7 @@ private: ScreenPoint& aScrollOffset, float& aScaleX, float& aScaleY, gfx::Margin& aFixedLayerMargins, - gfx::Point& aOffset); + ScreenPoint& aOffset); void SyncFrameMetrics(const gfx::Point& aScrollOffset, float aZoom, const CSSRect& aCssPageRect, @@ -134,7 +134,7 @@ private: float aDisplayResolution, bool aIsFirstPaint, gfx::Margin& aFixedLayerMargins, - gfx::Point& aOffset); + ScreenPoint& aOffset); /** * Recursively applies the given translation to all top-level fixed position diff --git a/gfx/layers/d3d11/CompositorD3D11.h b/gfx/layers/d3d11/CompositorD3D11.h index 81d1923d079e..61900acb0814 100644 --- a/gfx/layers/d3d11/CompositorD3D11.h +++ b/gfx/layers/d3d11/CompositorD3D11.h @@ -74,7 +74,7 @@ public: * Declare an offset to use when rendering layers. This will be ignored when * rendering to a target instead of the screen. */ - virtual void SetScreenRenderOffset(const gfx::Point& aOffset) MOZ_OVERRIDE { + virtual void SetScreenRenderOffset(const ScreenPoint& aOffset) MOZ_OVERRIDE { if (aOffset.x || aOffset.y) { NS_RUNTIMEABORT("SetScreenRenderOffset not supported by CompositorD3D11."); } diff --git a/gfx/layers/opengl/CompositorOGL.h b/gfx/layers/opengl/CompositorOGL.h index 5ff3a7e4cea3..666445efbd45 100644 --- a/gfx/layers/opengl/CompositorOGL.h +++ b/gfx/layers/opengl/CompositorOGL.h @@ -93,7 +93,7 @@ public: */ virtual void SetDestinationSurfaceSize(const gfx::IntSize& aSize) MOZ_OVERRIDE; - virtual void SetScreenRenderOffset(const gfx::Point& aOffset) MOZ_OVERRIDE { + virtual void SetScreenRenderOffset(const ScreenPoint& aOffset) MOZ_OVERRIDE { mRenderOffset = aOffset; } @@ -148,7 +148,7 @@ private: /** The size of the surface we are rendering to */ nsIntSize mSurfaceSize; - gfx::Point mRenderOffset; + ScreenPoint mRenderOffset; /** Helper-class used by Initialize **/ class ReadDrawFPSPref MOZ_FINAL : public nsRunnable { diff --git a/widget/android/AndroidBridge.cpp b/widget/android/AndroidBridge.cpp index aa73ecd821f0..b4f7fbdcabff 100644 --- a/widget/android/AndroidBridge.cpp +++ b/widget/android/AndroidBridge.cpp @@ -2134,7 +2134,7 @@ AndroidBridge::SetPageRect(const CSSRect& aCssPageRect) void AndroidBridge::SyncViewportInfo(const LayerIntRect& aDisplayPort, float aDisplayResolution, bool aLayersUpdated, ScreenPoint& aScrollOffset, float& aScaleX, float& aScaleY, - gfx::Margin& aFixedLayerMargins, gfx::Point& aOffset) + gfx::Margin& aFixedLayerMargins, ScreenPoint& aOffset) { AndroidGeckoLayerClient *client = mLayerClient; if (!client) @@ -2147,7 +2147,7 @@ AndroidBridge::SyncViewportInfo(const LayerIntRect& aDisplayPort, float aDisplay void AndroidBridge::SyncFrameMetrics(const gfx::Point& aScrollOffset, float aZoom, const CSSRect& aCssPageRect, bool aLayersUpdated, const gfx::Rect& aDisplayPort, float aDisplayResolution, - bool aIsFirstPaint, gfx::Margin& aFixedLayerMargins, gfx::Point& aOffset) + bool aIsFirstPaint, gfx::Margin& aFixedLayerMargins, ScreenPoint& aOffset) { AndroidGeckoLayerClient *client = mLayerClient; if (!client) diff --git a/widget/android/AndroidBridge.h b/widget/android/AndroidBridge.h index 4624f17b3985..82dfc98d355e 100644 --- a/widget/android/AndroidBridge.h +++ b/widget/android/AndroidBridge.h @@ -375,10 +375,10 @@ public: void SetPageRect(const CSSRect& aCssPageRect); void SyncViewportInfo(const LayerIntRect& aDisplayPort, float aDisplayResolution, bool aLayersUpdated, ScreenPoint& aScrollOffset, float& aScaleX, float& aScaleY, - gfx::Margin& aFixedLayerMargins, gfx::Point& aOffset); + gfx::Margin& aFixedLayerMargins, ScreenPoint& aOffset); void SyncFrameMetrics(const gfx::Point& aScrollOffset, float aZoom, const CSSRect& aCssPageRect, bool aLayersUpdated, const gfx::Rect& aDisplayPort, float aDisplayResolution, - bool aIsFirstPaint, gfx::Margin& aFixedLayerMargins, gfx::Point& aOffset); + bool aIsFirstPaint, gfx::Margin& aFixedLayerMargins, ScreenPoint& aOffset); void AddPluginView(jobject view, const gfxRect& rect, bool isFullScreen); void RemovePluginView(jobject view, bool isFullScreen); diff --git a/widget/android/AndroidJavaWrappers.cpp b/widget/android/AndroidJavaWrappers.cpp index 393be40d5957..21eea206ff76 100644 --- a/widget/android/AndroidJavaWrappers.cpp +++ b/widget/android/AndroidJavaWrappers.cpp @@ -892,7 +892,7 @@ AndroidGeckoLayerClient::SetPageRect(const CSSRect& aCssPageRect) void AndroidGeckoLayerClient::SyncViewportInfo(const LayerIntRect& aDisplayPort, float aDisplayResolution, bool aLayersUpdated, ScreenPoint& aScrollOffset, float& aScaleX, float& aScaleY, - gfx::Margin& aFixedLayerMargins, gfx::Point& aOffset) + gfx::Margin& aFixedLayerMargins, ScreenPoint& aOffset) { NS_ASSERTION(!isNull(), "SyncViewportInfo called on null layer client!"); JNIEnv *env = GetJNIForThread(); // this is called on the compositor thread @@ -924,7 +924,7 @@ AndroidGeckoLayerClient::SyncViewportInfo(const LayerIntRect& aDisplayPort, floa void AndroidGeckoLayerClient::SyncFrameMetrics(const gfx::Point& aScrollOffset, float aZoom, const CSSRect& aCssPageRect, bool aLayersUpdated, const gfx::Rect& aDisplayPort, float aDisplayResolution, - bool aIsFirstPaint, gfx::Margin& aFixedLayerMargins, gfx::Point& aOffset) + bool aIsFirstPaint, gfx::Margin& aFixedLayerMargins, ScreenPoint& aOffset) { NS_ASSERTION(!isNull(), "SyncFrameMetrics called on null layer client!"); JNIEnv *env = GetJNIForThread(); // this is called on the compositor thread diff --git a/widget/android/AndroidJavaWrappers.h b/widget/android/AndroidJavaWrappers.h index 36c8b6e671e5..67ff75141ffb 100644 --- a/widget/android/AndroidJavaWrappers.h +++ b/widget/android/AndroidJavaWrappers.h @@ -273,10 +273,10 @@ public: void SetPageRect(const CSSRect& aCssPageRect); void SyncViewportInfo(const LayerIntRect& aDisplayPort, float aDisplayResolution, bool aLayersUpdated, ScreenPoint& aScrollOffset, float& aScaleX, float& aScaleY, - gfx::Margin& aFixedLayerMargins, gfx::Point& aOffset); + gfx::Margin& aFixedLayerMargins, ScreenPoint& aOffset); void SyncFrameMetrics(const gfx::Point& aScrollOffset, float aZoom, const CSSRect& aCssPageRect, bool aLayersUpdated, const gfx::Rect& aDisplayPort, float aDisplayResolution, - bool aIsFirstPaint, gfx::Margin& aFixedLayerMargins, gfx::Point& aOffset); + bool aIsFirstPaint, gfx::Margin& aFixedLayerMargins, ScreenPoint& aOffset); bool ProgressiveUpdateCallback(bool aHasPendingNewThebesContent, const gfx::Rect& aDisplayPort, float aDisplayResolution, bool aDrawingCritical, gfx::Rect& aViewport, float& aScaleX, float& aScaleY); bool CreateFrame(AutoLocalJNIFrame *jniFrame, AndroidLayerRendererFrame& aFrame); bool ActivateProgram(AutoLocalJNIFrame *jniFrame);