Bug 877115 - [Moz2Dify] Part 4. Change gfxIntSize to gfx::IntSize in GLScreenBuffer and friends. (carries r=nical)

This commit is contained in:
Andreas Pehrson 2013-12-10 17:12:18 +01:00
parent f3b2403568
commit 9f3925f915
6 changed files with 36 additions and 36 deletions

View File

@ -27,7 +27,7 @@ namespace gl {
GLScreenBuffer*
GLScreenBuffer::Create(GLContext* gl,
const gfxIntSize& size,
const gfx::IntSize& size,
const SurfaceCaps& caps)
{
if (caps.antialias &&
@ -339,7 +339,7 @@ GLScreenBuffer::AssureBlitted()
MOZ_ASSERT(drawFB != 0);
MOZ_ASSERT(drawFB != readFB);
MOZ_ASSERT(mGL->IsSupported(GLFeature::framebuffer_blit));
MOZ_ASSERT(ToIntSize(mDraw->Size()) == mRead->Size());
MOZ_ASSERT(mDraw->Size() == mRead->Size());
ScopedBindFramebuffer boundFB(mGL);
ScopedGLState scissor(mGL, LOCAL_GL_SCISSOR_TEST, false);
@ -347,7 +347,7 @@ GLScreenBuffer::AssureBlitted()
BindReadFB_Internal(drawFB);
BindDrawFB_Internal(readFB);
const gfxIntSize& srcSize = mDraw->Size();
const gfx::IntSize& srcSize = mDraw->Size();
const gfx::IntSize& destSize = mRead->Size();
mGL->raw_fBlitFramebuffer(0, 0, srcSize.width, srcSize.height,
@ -381,7 +381,7 @@ GLScreenBuffer::Morph(SurfaceFactory_GL* newFactory, SurfaceStreamType streamTyp
}
void
GLScreenBuffer::Attach(SharedSurface* surface, const gfxIntSize& size)
GLScreenBuffer::Attach(SharedSurface* surface, const gfx::IntSize& size)
{
ScopedBindFramebuffer autoFB(mGL);
@ -393,7 +393,7 @@ GLScreenBuffer::Attach(SharedSurface* surface, const gfxIntSize& size)
if (mRead &&
surf->AttachType() == SharedSurf()->AttachType() &&
ToIntSize(size) == Size())
size == Size())
{
// Same size, same type, ready for reuse!
mRead->Attach(surf);
@ -419,7 +419,7 @@ GLScreenBuffer::Attach(SharedSurface* surface, const gfxIntSize& size)
}
bool
GLScreenBuffer::Swap(const gfxIntSize& size)
GLScreenBuffer::Swap(const gfx::IntSize& size)
{
SharedSurface* nextSurf = mStream->SwapProducer(mFactory, size);
if (!nextSurf) {
@ -438,7 +438,7 @@ GLScreenBuffer::Swap(const gfxIntSize& size)
}
bool
GLScreenBuffer::PublishFrame(const gfxIntSize& size)
GLScreenBuffer::PublishFrame(const gfx::IntSize& size)
{
AssureBlitted();
@ -447,7 +447,7 @@ GLScreenBuffer::PublishFrame(const gfxIntSize& size)
}
bool
GLScreenBuffer::Resize(const gfxIntSize& size)
GLScreenBuffer::Resize(const gfx::IntSize& size)
{
SharedSurface* surface = mStream->Resize(mFactory, size);
if (!surface)
@ -458,7 +458,7 @@ GLScreenBuffer::Resize(const gfxIntSize& size)
}
DrawBuffer*
GLScreenBuffer::CreateDraw(const gfxIntSize& size)
GLScreenBuffer::CreateDraw(const gfx::IntSize& size)
{
GLContext* gl = mFactory->GL();
const GLFormats& formats = mFactory->Formats();
@ -514,7 +514,7 @@ DrawBuffer*
DrawBuffer::Create(GLContext* const gl,
const SurfaceCaps& caps,
const GLFormats& formats,
const gfxIntSize& size)
const gfx::IntSize& size)
{
if (!caps.color) {
MOZ_ASSERT(!caps.alpha && !caps.depth && !caps.stencil);

View File

@ -18,7 +18,7 @@
#include "SurfaceTypes.h"
#include "GLContextTypes.h"
#include "GLDefs.h"
#include "gfx2DGlue.h"
#include "mozilla/gfx/Point.h"
// Forwards:
class gfxImageSurface;
@ -48,18 +48,18 @@ public:
static DrawBuffer* Create(GLContext* const gl,
const SurfaceCaps& caps,
const GLFormats& formats,
const gfxIntSize& size);
const gfx::IntSize& size);
protected:
GLContext* const mGL;
const gfxIntSize mSize;
const gfx::IntSize mSize;
const GLuint mFB;
const GLuint mColorMSRB;
const GLuint mDepthRB;
const GLuint mStencilRB;
DrawBuffer(GLContext* gl,
const gfxIntSize& size,
const gfx::IntSize& size,
GLuint fb,
GLuint colorMSRB,
GLuint depthRB,
@ -75,7 +75,7 @@ protected:
public:
virtual ~DrawBuffer();
const gfxIntSize& Size() const {
const gfx::IntSize& Size() const {
return mSize;
}
@ -148,7 +148,7 @@ protected:
public:
// Infallible.
static GLScreenBuffer* Create(GLContext* gl,
const gfxIntSize& size,
const gfx::IntSize& size,
const SurfaceCaps& caps);
protected:
@ -233,7 +233,7 @@ public:
const gfx::IntSize& Size() const {
MOZ_ASSERT(mRead);
MOZ_ASSERT(!mDraw || ToIntSize(mDraw->Size()) == mRead->Size());
MOZ_ASSERT(!mDraw || mDraw->Size() == mRead->Size());
return mRead->Size();
}
@ -270,19 +270,19 @@ public:
protected:
// Returns false on error or inability to resize.
bool Swap(const gfxIntSize& size);
bool Swap(const gfx::IntSize& size);
public:
bool PublishFrame(const gfxIntSize& size);
bool PublishFrame(const gfx::IntSize& size);
bool Resize(const gfxIntSize& size);
bool Resize(const gfx::IntSize& size);
void Readback(SharedSurface_GL* src, gfxImageSurface* dest);
protected:
void Attach(SharedSurface* surface, const gfxIntSize& size);
void Attach(SharedSurface* surface, const gfx::IntSize& size);
DrawBuffer* CreateDraw(const gfxIntSize& size);
DrawBuffer* CreateDraw(const gfx::IntSize& size);
ReadBuffer* CreateRead(SharedSurface_GL* surf);
public:

View File

@ -21,7 +21,7 @@ SurfaceFactory::~SurfaceFactory()
}
SharedSurface*
SurfaceFactory::NewSharedSurface(const gfxIntSize& size)
SurfaceFactory::NewSharedSurface(const gfx::IntSize& size)
{
// Attempt to reuse an old surface.
while (!mScraps.empty()) {

View File

@ -35,7 +35,7 @@ protected:
std::queue<SharedSurface*> mScraps;
public:
SharedSurface* NewSharedSurface(const gfxIntSize& size);
SharedSurface* NewSharedSurface(const gfx::IntSize& size);
// Auto-deletes surfs of the wrong type.
void Recycle(SharedSurface*& surf);

View File

@ -57,7 +57,7 @@ SurfaceStream::CreateForType(SurfaceStreamType type, mozilla::gl::GLContext* glC
}
void
SurfaceStream::New(SurfaceFactory* factory, const gfxIntSize& size,
SurfaceStream::New(SurfaceFactory* factory, const gfx::IntSize& size,
SharedSurface*& surf)
{
MOZ_ASSERT(!surf);
@ -170,7 +170,7 @@ SurfaceStream::SwapConsumer()
}
SharedSurface*
SurfaceStream::Resize(SurfaceFactory* factory, const gfxIntSize& size)
SurfaceStream::Resize(SurfaceFactory* factory, const gfx::IntSize& size)
{
MonitorAutoLock lock(mMonitor);
@ -220,7 +220,7 @@ SurfaceStream_SingleBuffer::SurrenderSurfaces(SharedSurface*& producer,
SharedSurface*
SurfaceStream_SingleBuffer::SwapProducer(SurfaceFactory* factory,
const gfxIntSize& size)
const gfx::IntSize& size)
{
MonitorAutoLock lock(mMonitor);
if (mConsumer) {
@ -313,7 +313,7 @@ SurfaceStream_TripleBuffer_Copy::SurrenderSurfaces(SharedSurface*& producer,
SharedSurface*
SurfaceStream_TripleBuffer_Copy::SwapProducer(SurfaceFactory* factory,
const gfxIntSize& size)
const gfx::IntSize& size)
{
MonitorAutoLock lock(mMonitor);
@ -407,7 +407,7 @@ SurfaceStream_TripleBuffer::SurrenderSurfaces(SharedSurface*& producer,
SharedSurface*
SurfaceStream_TripleBuffer::SwapProducer(SurfaceFactory* factory,
const gfxIntSize& size)
const gfx::IntSize& size)
{
PROFILER_LABEL("SurfaceStream_TripleBuffer", "SwapProducer");

View File

@ -10,7 +10,7 @@
#include <set>
#include "mozilla/Monitor.h"
#include "mozilla/Attributes.h"
#include "gfxPoint.h"
#include "mozilla/gfx/Point.h"
#include "SurfaceTypes.h"
namespace mozilla {
@ -89,7 +89,7 @@ protected:
from = nullptr;
}
void New(SurfaceFactory* factory, const gfxIntSize& size,
void New(SurfaceFactory* factory, const gfx::IntSize& size,
SharedSurface*& surf);
void Delete(SharedSurface*& surf);
void Recycle(SurfaceFactory* factory, SharedSurface*& surf);
@ -117,9 +117,9 @@ public:
* One common failure is asking for a too-large |size|.
*/
virtual SharedSurface* SwapProducer(SurfaceFactory* factory,
const gfxIntSize& size) = 0;
const gfx::IntSize& size) = 0;
virtual SharedSurface* Resize(SurfaceFactory* factory, const gfxIntSize& size);
virtual SharedSurface* Resize(SurfaceFactory* factory, const gfx::IntSize& size);
protected:
// SwapCons will return the same surface more than once,
@ -148,7 +148,7 @@ public:
* SwapCons being called in Render.
*/
virtual SharedSurface* SwapProducer(SurfaceFactory* factory,
const gfxIntSize& size);
const gfx::IntSize& size);
virtual SharedSurface* SwapConsumer_NoWait();
@ -168,7 +168,7 @@ public:
virtual ~SurfaceStream_TripleBuffer_Copy();
virtual SharedSurface* SwapProducer(SurfaceFactory* factory,
const gfxIntSize& size);
const gfx::IntSize& size);
virtual SharedSurface* SwapConsumer_NoWait();
@ -200,7 +200,7 @@ private:
public:
// Done writing to prod, swap prod and staging
virtual SharedSurface* SwapProducer(SurfaceFactory* factory,
const gfxIntSize& size);
const gfx::IntSize& size);
virtual SharedSurface* SwapConsumer_NoWait();