Bug 929513 Part 10: Convert ScreenSizeChanged to use gfx::IntSize r=nical

This commit is contained in:
David Zbarsky 2013-10-27 17:53:28 -04:00
parent 389f48f575
commit 94738173ba
7 changed files with 18 additions and 14 deletions

View File

@ -1213,7 +1213,7 @@ ContentChild::RecvAddPermission(const IPC::Permission& permission)
}
bool
ContentChild::RecvScreenSizeChanged(const gfxIntSize& size)
ContentChild::RecvScreenSizeChanged(const gfx::IntSize& size)
{
#ifdef ANDROID
mScreenSize = size;

View File

@ -191,7 +191,7 @@ public:
virtual bool RecvAddPermission(const IPC::Permission& permission);
virtual bool RecvScreenSizeChanged(const gfxIntSize &size);
virtual bool RecvScreenSizeChanged(const gfx::IntSize &size);
virtual bool RecvFlushMemory(const nsString& reason);
@ -227,7 +227,7 @@ public:
virtual bool RecvNotifyPhoneStateChange(const nsString& state);
#ifdef ANDROID
gfxIntSize GetScreenSize() { return mScreenSize; }
gfx::IntSize GetScreenSize() { return mScreenSize; }
#endif
// Get the directory for IndexedDB files. We query the parent for this and
@ -272,7 +272,7 @@ private:
AppInfo mAppInfo;
#ifdef ANDROID
gfxIntSize mScreenSize;
gfx::IntSize mScreenSize;
#endif
bool mIsForApp;

View File

@ -55,7 +55,7 @@ using mozilla::dom::AudioChannelState;
using mozilla::dom::BlobConstructorParams;
using mozilla::dom::NativeThreadId;
using mozilla::hal::ProcessPriority;
using gfxIntSize;
using mozilla::gfx::IntSize;
namespace mozilla {
namespace dom {
@ -287,13 +287,13 @@ child:
// nsIPermissionManager messages
AddPermission(Permission permission);
ScreenSizeChanged(gfxIntSize size);
ScreenSizeChanged(IntSize size);
FlushMemory(nsString reason);
GarbageCollect();
CycleCollect();
/**
* Start accessibility engine in content process.
*/

View File

@ -29,6 +29,7 @@
#include "nsCOMPtr.h" // for already_AddRefed
#include "nsDebug.h" // for NS_ERROR
#include "prenv.h" // for PR_GetEnv
#include "gfx2DGlue.h"
using namespace mozilla::gl;
@ -115,7 +116,7 @@ SurfaceDescriptorX11::OpenForeign() const
}
bool
ISurfaceAllocator::PlatformAllocSurfaceDescriptor(const gfxIntSize& aSize,
ISurfaceAllocator::PlatformAllocSurfaceDescriptor(const gfx::IntSize& aSize,
gfxContentType aContent,
uint32_t aCaps,
SurfaceDescriptor* aBuffer)
@ -133,7 +134,8 @@ ISurfaceAllocator::PlatformAllocSurfaceDescriptor(const gfxIntSize& aSize,
}
gfxPlatform* platform = gfxPlatform::GetPlatform();
nsRefPtr<gfxASurface> buffer = platform->CreateOffscreenSurface(aSize, aContent);
nsRefPtr<gfxASurface> buffer = platform->CreateOffscreenSurface(ThebesIntSize(aSize),
aContent);
if (!buffer ||
buffer->GetType() != gfxSurfaceTypeXlib) {
NS_ERROR("creating Xlib front/back surfaces failed!");

View File

@ -8,6 +8,7 @@
#include "nsScreenManagerAndroid.h"
#include "nsWindow.h"
#include "AndroidBridge.h"
#include "mozilla/gfx/Point.h"
using namespace mozilla;
@ -22,7 +23,7 @@ nsScreenAndroid::~nsScreenAndroid()
NS_IMETHODIMP
nsScreenAndroid::GetRect(int32_t *outLeft, int32_t *outTop, int32_t *outWidth, int32_t *outHeight)
{
gfxIntSize sz = nsWindow::GetAndroidScreenBounds();
gfx::IntSize sz = nsWindow::GetAndroidScreenBounds();
*outLeft = 0;
*outTop = 0;

View File

@ -58,6 +58,7 @@ using mozilla::unused;
#include "nsString.h"
#include "GeckoProfiler.h" // For PROFILER_LABEL
#include "mozilla/gfx/Point.h"
using namespace mozilla;
using namespace mozilla::dom;
@ -68,7 +69,7 @@ NS_IMPL_ISUPPORTS_INHERITED0(nsWindow, nsBaseWidget)
// The dimensions of the current android view
static gfxIntSize gAndroidBounds = gfxIntSize(0, 0);
static gfxIntSize gAndroidScreenBounds;
static mozilla::gfx::IntSize gAndroidScreenBounds;
#include "mozilla/layers/AsyncPanZoomController.h"
#include "mozilla/layers/CompositorChild.h"
@ -1141,7 +1142,7 @@ nsWindow::InitEvent(WidgetGUIEvent& event, nsIntPoint* aPoint)
event.time = PR_Now() / 1000;
}
gfxIntSize
mozilla::gfx::IntSize
nsWindow::GetAndroidScreenBounds()
{
if (XRE_GetProcessType() == GeckoProcessType_Content) {

View File

@ -7,7 +7,7 @@
#define NSWINDOW_H_
#include "nsBaseWidget.h"
#include "gfxPoint.h"
#include "mozilla/gfx/Point.h"
#include "nsIIdleServiceInternal.h"
#include "nsTArray.h"
#include "AndroidJavaWrappers.h"
@ -42,7 +42,7 @@ public:
NS_DECL_ISUPPORTS_INHERITED
static void OnGlobalAndroidEvent(mozilla::AndroidGeckoEvent *ae);
static gfxIntSize GetAndroidScreenBounds();
static mozilla::gfx::IntSize GetAndroidScreenBounds();
static nsWindow* TopWindow();
nsWindow* FindWindowForPoint(const nsIntPoint& pt);