mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-04-02 12:32:55 +00:00
Bug 877728 - Make the screen render offset a ScreenPoint. r=BenWa
This commit is contained in:
parent
1fa7c9cb13
commit
82a9f4437b
@ -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
|
||||
|
@ -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) { }
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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.");
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user