mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 877115 - [Moz2Dify] Part 5. Minimize gfxIntSize usage in GLContext. r=nical
This commit is contained in:
parent
ffaa83ae75
commit
8884428616
@ -2469,7 +2469,7 @@ GLContext::OffscreenSize() const
|
||||
}
|
||||
|
||||
bool
|
||||
GLContext::CreateScreenBufferImpl(const gfxIntSize& size, const SurfaceCaps& caps)
|
||||
GLContext::CreateScreenBufferImpl(const IntSize& size, const SurfaceCaps& caps)
|
||||
{
|
||||
GLScreenBuffer* newScreen = GLScreenBuffer::Create(this, size, caps);
|
||||
if (!newScreen)
|
||||
@ -2492,7 +2492,7 @@ GLContext::CreateScreenBufferImpl(const gfxIntSize& size, const SurfaceCaps& cap
|
||||
}
|
||||
|
||||
bool
|
||||
GLContext::ResizeScreenBuffer(const gfxIntSize& size)
|
||||
GLContext::ResizeScreenBuffer(const IntSize& size)
|
||||
{
|
||||
if (!IsOffscreenSizeAllowed(size))
|
||||
return false;
|
||||
@ -2535,7 +2535,7 @@ GLContext::EmptyTexGarbageBin()
|
||||
}
|
||||
|
||||
bool
|
||||
GLContext::IsOffscreenSizeAllowed(const gfxIntSize& aSize) const {
|
||||
GLContext::IsOffscreenSizeAllowed(const IntSize& aSize) const {
|
||||
int32_t biggerDimension = std::max(aSize.width, aSize.height);
|
||||
int32_t maxAllowed = std::min(mMaxRenderbufferSize, mMaxTextureSize);
|
||||
return biggerDimension <= maxAllowed;
|
||||
|
@ -2494,7 +2494,7 @@ public:
|
||||
* Only valid if IsOffscreen() returns true.
|
||||
*/
|
||||
virtual bool ResizeOffscreen(const gfx::IntSize& size) {
|
||||
return ResizeScreenBuffer(ThebesIntSize(size));
|
||||
return ResizeScreenBuffer(size);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -2714,7 +2714,7 @@ public:
|
||||
return thisShared == otherShared;
|
||||
}
|
||||
|
||||
bool InitOffscreen(const gfxIntSize& size, const SurfaceCaps& caps) {
|
||||
bool InitOffscreen(const gfx::IntSize& size, const SurfaceCaps& caps) {
|
||||
if (!CreateScreenBuffer(size, caps))
|
||||
return false;
|
||||
|
||||
@ -2735,7 +2735,7 @@ public:
|
||||
|
||||
protected:
|
||||
// Note that it does -not- clear the resized buffers.
|
||||
bool CreateScreenBuffer(const gfxIntSize& size, const SurfaceCaps& caps) {
|
||||
bool CreateScreenBuffer(const gfx::IntSize& size, const SurfaceCaps& caps) {
|
||||
if (!IsOffscreenSizeAllowed(size))
|
||||
return false;
|
||||
|
||||
@ -2757,11 +2757,11 @@ protected:
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CreateScreenBufferImpl(const gfxIntSize& size,
|
||||
bool CreateScreenBufferImpl(const gfx::IntSize& size,
|
||||
const SurfaceCaps& caps);
|
||||
|
||||
public:
|
||||
bool ResizeScreenBuffer(const gfxIntSize& size);
|
||||
bool ResizeScreenBuffer(const gfx::IntSize& size);
|
||||
|
||||
protected:
|
||||
SurfaceCaps mCaps;
|
||||
@ -2861,7 +2861,7 @@ public:
|
||||
|
||||
void EmptyTexGarbageBin();
|
||||
|
||||
bool IsOffscreenSizeAllowed(const gfxIntSize& aSize) const;
|
||||
bool IsOffscreenSizeAllowed(const gfx::IntSize& aSize) const;
|
||||
|
||||
protected:
|
||||
GLuint mReadTextureImagePrograms[4];
|
||||
|
Loading…
Reference in New Issue
Block a user