Bug 913872 - Take nested enums out of gfxASurface - 3/3 : remove the now-useless inclusions of gfxASurface.h - r=jrmuizel

This commit is contained in:
Benoit Jacob 2013-09-24 16:45:14 -04:00
Родитель 42848d261c
Коммит eb8b1d73bb
48 изменённых файлов: 249 добавлений и 167 удалений

Просмотреть файл

@ -0,0 +1,40 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* vim: sw=4 ts=8 et :
*/
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "PluginBackgroundDestroyer.h"
#include "gfxSharedImageSurface.h"
using namespace mozilla;
using namespace plugins;
PluginBackgroundDestroyerParent::PluginBackgroundDestroyerParent(gfxASurface* aDyingBackground)
: mDyingBackground(aDyingBackground)
{
}
PluginBackgroundDestroyerParent::~PluginBackgroundDestroyerParent()
{
}
void
PluginBackgroundDestroyerParent::ActorDestroy(ActorDestroyReason why)
{
switch(why) {
case Deletion:
case AncestorDeletion:
if (gfxSharedImageSurface::IsSharedImage(mDyingBackground)) {
gfxSharedImageSurface* s =
static_cast<gfxSharedImageSurface*>(mDyingBackground.get());
DeallocShmem(s->GetShmem());
}
break;
default:
// We're shutting down or crashed, let automatic cleanup
// take care of our shmem, if we have one.
break;
}
}

Просмотреть файл

@ -11,9 +11,10 @@
#include "mozilla/plugins/PPluginBackgroundDestroyerChild.h"
#include "mozilla/plugins/PPluginBackgroundDestroyerParent.h"
#include "gfxASurface.h"
#include "gfxSharedImageSurface.h"
class gfxASurface;
namespace mozilla {
namespace plugins {
@ -24,30 +25,12 @@ namespace plugins {
*/
class PluginBackgroundDestroyerParent : public PPluginBackgroundDestroyerParent {
public:
PluginBackgroundDestroyerParent(gfxASurface* aDyingBackground)
: mDyingBackground(aDyingBackground)
{ }
PluginBackgroundDestroyerParent(gfxASurface* aDyingBackground);
virtual ~PluginBackgroundDestroyerParent() { }
virtual ~PluginBackgroundDestroyerParent();
private:
virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE
{
switch(why) {
case Deletion:
case AncestorDeletion:
if (gfxSharedImageSurface::IsSharedImage(mDyingBackground)) {
gfxSharedImageSurface* s =
static_cast<gfxSharedImageSurface*>(mDyingBackground.get());
DeallocShmem(s->GetShmem());
}
break;
default:
// We're shutting down or crashed, let automatic cleanup
// take care of our shmem, if we have one.
break;
}
}
virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
nsRefPtr<gfxASurface> mDyingBackground;
};

Просмотреть файл

@ -30,7 +30,6 @@
#include "nsRect.h"
#include "nsTHashtable.h"
#include "mozilla/PaintTracker.h"
#include "gfxASurface.h"
#include <map>
@ -38,6 +37,8 @@
#include "gtk2xtbin.h"
#endif
class gfxASurface;
namespace mozilla {
namespace layers {

Просмотреть файл

@ -22,7 +22,6 @@
#include "nsDataHashtable.h"
#include "nsHashKeys.h"
#include "nsRect.h"
#include "gfxASurface.h"
#ifdef MOZ_X11
class gfxXlibSurface;
@ -30,6 +29,8 @@ class gfxXlibSurface;
#include "nsGUIEvent.h"
#include "mozilla/unused.h"
class gfxASurface;
namespace mozilla {
namespace layers {
class ImageContainer;

Просмотреть файл

@ -20,5 +20,9 @@ PluginSurfaceParent::PluginSurfaceParent(const WindowsSharedMemoryHandle& handle
mSurface = dibsurf;
}
PluginSurfaceParent::~PluginSurfaceParent()
{
}
}
}

Просмотреть файл

@ -7,7 +7,6 @@
#define dom_plugins_PluginSurfaceParent_h
#include "mozilla/plugins/PPluginSurfaceParent.h"
#include "gfxASurface.h"
#include "nsAutoPtr.h"
#include "mozilla/plugins/PluginMessageUtils.h"
@ -15,6 +14,8 @@
#error "This header is for Windows only."
#endif
class gfxASurface;
namespace mozilla {
namespace plugins {
@ -24,7 +25,7 @@ public:
PluginSurfaceParent(const WindowsSharedMemoryHandle& handle,
const gfxIntSize& size,
const bool transparent);
~PluginSurfaceParent() { }
~PluginSurfaceParent();
gfxASurface* Surface() { return mSurface; }

Просмотреть файл

@ -71,6 +71,7 @@ CPP_SOURCES += [
'BrowserStreamParent.cpp',
'ChildAsyncCall.cpp',
'ChildTimer.cpp',
'PluginBackgroundDestroyer.cpp',
'PluginIdentifierChild.cpp',
'PluginIdentifierParent.cpp',
'PluginInstanceChild.cpp',

Просмотреть файл

@ -9,11 +9,13 @@
#include "nsAutoPtr.h"
#include "nsRegion.h"
#include "nsTArray.h"
#include "gfxASurface.h"
#include "gfxTypes.h"
#include "GLContextTypes.h"
#include "gfxPattern.h"
#include "mozilla/gfx/Rect.h"
class gfxASurface;
namespace mozilla {
namespace gfx {
class DataSourceSurface;

Просмотреть файл

@ -11,7 +11,7 @@
#include "SurfaceTypes.h"
#include "GLContextTypes.h"
#include "nsAutoPtr.h"
#include "gfxASurface.h"
#include "gfxTypes.h"
#include "mozilla/Mutex.h"
#include <queue>

Просмотреть файл

@ -23,7 +23,7 @@
#include "gfxRect.h"
#include "nsRect.h"
#include "nsRegion.h"
#include "gfxASurface.h"
#include "gfxTypes.h"
#include "mozilla/layers/LayersTypes.h"
#include "mozilla/layers/CompositorTypes.h"
#include "FrameMetrics.h"

Просмотреть файл

@ -206,5 +206,28 @@ CopyableCanvasLayer::PaintWithOpacity(gfxContext* aContext,
}
}
gfxImageSurface*
CopyableCanvasLayer::GetTempSurface(const gfxIntSize& aSize, const gfxImageFormat aFormat)
{
if (!mCachedTempSurface ||
aSize.width != mCachedSize.width ||
aSize.height != mCachedSize.height ||
aFormat != mCachedFormat)
{
mCachedTempSurface = new gfxImageSurface(aSize, aFormat);
mCachedSize = aSize;
mCachedFormat = aFormat;
}
MOZ_ASSERT(mCachedTempSurface->Stride() == mCachedTempSurface->Width() * 4);
return mCachedTempSurface;
}
void
CopyableCanvasLayer::DiscardTempSurface()
{
mCachedTempSurface = nullptr;
}
}
}

Просмотреть файл

@ -11,7 +11,7 @@
#include "Layers.h" // for CanvasLayer, etc
#include "gfxASurface.h" // for gfxASurface
#include "gfxContext.h" // for gfxContext, etc
#include "gfxImageSurface.h" // for gfxImageSurface
#include "gfxTypes.h"
#include "gfxPlatform.h" // for gfxImageFormat
#include "gfxPoint.h" // for gfxIntSize
#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc
@ -64,26 +64,9 @@ protected:
gfxIntSize mCachedSize;
gfxImageFormat mCachedFormat;
gfxImageSurface* GetTempSurface(const gfxIntSize& aSize, const gfxImageFormat aFormat)
{
if (!mCachedTempSurface ||
aSize.width != mCachedSize.width ||
aSize.height != mCachedSize.height ||
aFormat != mCachedFormat)
{
mCachedTempSurface = new gfxImageSurface(aSize, aFormat);
mCachedSize = aSize;
mCachedFormat = aFormat;
}
gfxImageSurface* GetTempSurface(const gfxIntSize& aSize, const gfxImageFormat aFormat);
MOZ_ASSERT(mCachedTempSurface->Stride() == mCachedTempSurface->Width() * 4);
return mCachedTempSurface;
}
void DiscardTempSurface()
{
mCachedTempSurface = nullptr;
}
void DiscardTempSurface();
};
}

Просмотреть файл

@ -11,6 +11,7 @@
#include "mozilla/layers/ImageBridgeChild.h"
#include "mozilla/layers/GrallocTextureClient.h"
#include "gfx2DGlue.h"
#include "gfxImageSurface.h"
#include <OMX_IVCommon.h>
#include <ColorConverter.h>

Просмотреть файл

@ -13,7 +13,7 @@
#include "Units.h" // for LayerMargin, LayerPoint
#include "gfx3DMatrix.h" // for gfx3DMatrix
#include "gfxContext.h" // for GraphicsOperator
#include "gfxASurface.h" // for gfxASurface, etc
#include "gfxTypes.h"
#include "gfxColor.h" // for gfxRGBA
#include "gfxMatrix.h" // for gfxMatrix
#include "gfxPattern.h" // for gfxPattern, etc
@ -46,7 +46,7 @@
#include "nscore.h" // for nsACString, nsAString
#include "prlog.h" // for PRLogModuleInfo
class gfxASurface;
class gfxContext;
extern uint8_t gLayerManagerLayerBuilder;

Просмотреть файл

@ -0,0 +1,61 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GFX_AUTOMASKDATA_H_
#define GFX_AUTOMASKDATA_H_
#include "gfxASurface.h"
#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor
namespace mozilla {
namespace layers {
/**
* Drawing with a mask requires a mask surface and a transform.
* Sometimes the mask surface is a direct gfxASurface, but other times
* it's a SurfaceDescriptor. For SurfaceDescriptor, we need to use a
* scoped AutoOpenSurface to get a gfxASurface for the
* SurfaceDescriptor.
*
* This helper class manages the gfxASurface-or-SurfaceDescriptor
* logic.
*/
class MOZ_STACK_CLASS AutoMaskData {
public:
AutoMaskData() { }
~AutoMaskData() { }
/**
* Construct this out of either a gfxASurface or a
* SurfaceDescriptor. Construct() must only be called once.
* GetSurface() and GetTransform() must not be called until this has
* been constructed.
*/
void Construct(const gfxMatrix& aTransform,
gfxASurface* aSurface);
void Construct(const gfxMatrix& aTransform,
const SurfaceDescriptor& aSurface);
/** The returned surface can't escape the scope of |this|. */
gfxASurface* GetSurface();
const gfxMatrix& GetTransform();
private:
bool IsConstructed();
gfxMatrix mTransform;
nsRefPtr<gfxASurface> mSurface;
Maybe<AutoOpenSurface> mSurfaceOpener;
AutoMaskData(const AutoMaskData&) MOZ_DELETE;
AutoMaskData& operator=(const AutoMaskData&) MOZ_DELETE;
};
}
}
#endif // GFX_AUTOMASKDATA_H_

Просмотреть файл

@ -9,6 +9,9 @@
#include "mozilla/layers/Compositor.h"
#include "mozilla/layers/TextureHost.h"
#include "mozilla/gfx/2D.h"
#include "nsAutoPtr.h"
class gfxContext;
namespace mozilla {
namespace layers {

Просмотреть файл

@ -8,7 +8,7 @@
#include <stdint.h> // for INT32_MAX, int32_t
#include "Layers.h" // for Layer (ptr only), etc
#include "gfxASurface.h" // for gfxASurface, etc
#include "gfxTypes.h"
#include "gfxCachedTempSurface.h" // for gfxCachedTempSurface
#include "gfxContext.h" // for gfxContext
#include "mozilla/Attributes.h" // for MOZ_OVERRIDE

Просмотреть файл

@ -12,6 +12,7 @@
#include "mozilla/DebugOnly.h" // for DebugOnly
#include "mozilla/layers/CompositorTypes.h"
#include "mozilla/layers/ISurfaceAllocator.h"
#include "AutoMaskData.h"
using namespace mozilla::gfx;

Просмотреть файл

@ -15,7 +15,6 @@
#include "ipc/AutoOpenSurface.h" // for AutoOpenSurface
#include "mozilla/Attributes.h" // for MOZ_DELETE, MOZ_STACK_CLASS
#include "mozilla/Maybe.h" // for Maybe
#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor
#include "nsAutoPtr.h" // for nsRefPtr
#include "nsDebug.h" // for NS_ASSERTION
#include "nsISupportsImpl.h" // for gfxContext::Release, etc
@ -25,6 +24,7 @@
namespace mozilla {
namespace layers {
class AutoMaskData;
class BasicContainerLayer;
class Layer;
@ -74,49 +74,6 @@ protected:
}
};
/**
* Drawing with a mask requires a mask surface and a transform.
* Sometimes the mask surface is a direct gfxASurface, but other times
* it's a SurfaceDescriptor. For SurfaceDescriptor, we need to use a
* scoped AutoOpenSurface to get a gfxASurface for the
* SurfaceDescriptor.
*
* This helper class manages the gfxASurface-or-SurfaceDescriptor
* logic.
*/
class MOZ_STACK_CLASS AutoMaskData {
public:
AutoMaskData() { }
~AutoMaskData() { }
/**
* Construct this out of either a gfxASurface or a
* SurfaceDescriptor. Construct() must only be called once.
* GetSurface() and GetTransform() must not be called until this has
* been constructed.
*/
void Construct(const gfxMatrix& aTransform,
gfxASurface* aSurface);
void Construct(const gfxMatrix& aTransform,
const SurfaceDescriptor& aSurface);
/** The returned surface can't escape the scope of |this|. */
gfxASurface* GetSurface();
const gfxMatrix& GetTransform();
private:
bool IsConstructed();
gfxMatrix mTransform;
nsRefPtr<gfxASurface> mSurface;
Maybe<AutoOpenSurface> mSurfaceOpener;
AutoMaskData(const AutoMaskData&) MOZ_DELETE;
AutoMaskData& operator=(const AutoMaskData&) MOZ_DELETE;
};
/*
* Extract a mask surface for a mask layer
* Returns true and through outparams a surface for the mask layer if

Просмотреть файл

@ -26,6 +26,8 @@
#include "nsPoint.h" // for nsIntPoint
#include "nsRect.h" // for nsIntRect
#include "nsTArray.h" // for nsTArray, nsTArray_Impl
#include "AutoMaskData.h"
struct gfxMatrix;
using namespace mozilla::gfx;

Просмотреть файл

@ -8,7 +8,7 @@
#include <stdint.h> // for uint32_t
#include "ThebesLayerBuffer.h" // for ThebesLayerBuffer, etc
#include "gfxASurface.h" // for gfxASurface, etc
#include "gfxTypes.h"
#include "gfxPlatform.h" // for gfxPlatform
#include "mozilla/Assertions.h" // for MOZ_CRASH
#include "mozilla/Attributes.h" // for MOZ_OVERRIDE
@ -29,6 +29,7 @@
class gfxContext;
struct gfxMatrix;
class gfxASurface;
namespace mozilla {
namespace gfx {

Просмотреть файл

@ -383,6 +383,11 @@ DeprecatedTextureClientShmem::DeprecatedTextureClientShmem(CompositableForwarder
{
}
DeprecatedTextureClientShmem::~DeprecatedTextureClientShmem()
{
ReleaseResources();
}
void
DeprecatedTextureClientShmem::ReleaseResources()
{

Просмотреть файл

@ -12,8 +12,6 @@
#include "GLTextureImage.h" // for TextureImage
#include "ImageContainer.h" // for PlanarYCbCrImage, etc
#include "ImageTypes.h" // for StereoMode
#include "gfxASurface.h" // for gfxASurface, etc
#include "gfxImageSurface.h" // for gfxImageSurface
#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc
#include "mozilla/Attributes.h" // for MOZ_OVERRIDE
#include "mozilla/RefPtr.h" // for RefPtr, RefCounted
@ -29,6 +27,8 @@
#include "nsISupportsImpl.h" // for TextureImage::AddRef, etc
class gfxReusableSurfaceWrapper;
class gfxASurface;
class gfxImageSurface;
namespace mozilla {
namespace layers {
@ -490,8 +490,7 @@ class DeprecatedTextureClientShmem : public DeprecatedTextureClient
{
public:
DeprecatedTextureClientShmem(CompositableForwarder* aForwarder, const TextureInfo& aTextureInfo);
~DeprecatedTextureClientShmem() { ReleaseResources(); }
~DeprecatedTextureClientShmem();
virtual bool SupportsType(DeprecatedTextureClientType aType) MOZ_OVERRIDE
{
return aType == TEXTURE_SHMEM || aType == TEXTURE_CONTENT || aType == TEXTURE_FALLBACK;

Просмотреть файл

@ -13,8 +13,7 @@
#include "TiledLayerBuffer.h" // for TiledLayerBuffer
#include "Units.h" // for CSSPoint
#include "gfx3DMatrix.h" // for gfx3DMatrix
#include "gfxASurface.h" // for gfxASurface, etc
#include "gfxImageSurface.h" // for gfxImageSurface
#include "gfxTypes.h"
#include "gfxPoint.h" // for gfxSize
#include "mozilla/Attributes.h" // for MOZ_OVERRIDE
#include "mozilla/RefPtr.h" // for RefPtr
@ -31,6 +30,8 @@
#include "mozilla/layers/ISurfaceAllocator.h"
#include "gfxReusableSurfaceWrapper.h"
class gfxImageSurface;
namespace mozilla {
namespace layers {

Просмотреть файл

@ -8,7 +8,7 @@
#include <stddef.h> // for size_t
#include <stdint.h> // for uint64_t, uint32_t, uint8_t
#include "gfxASurface.h" // for gfxASurface, etc
#include "gfxTypes.h"
#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc
#include "mozilla/Attributes.h" // for MOZ_OVERRIDE
#include "mozilla/RefPtr.h" // for RefPtr, TemporaryRef, etc

Просмотреть файл

@ -7,10 +7,11 @@
#define GFX_CANVASLAYERD3D10_H
#include "LayerManagerD3D10.h"
#include "gfxASurface.h"
#include "mozilla/Preferences.h"
class gfxASurface;
namespace mozilla {
namespace gl {

Просмотреть файл

@ -8,7 +8,8 @@
#include "LayerManagerD3D9.h"
#include "GLContextTypes.h"
#include "gfxASurface.h"
class gfxASurface;
namespace mozilla {
namespace layers {

Просмотреть файл

@ -8,7 +8,7 @@
#define MOZILLA_LAYERS_COMPOSITABLEFORWARDER
#include <stdint.h> // for int32_t, uint64_t
#include "gfxASurface.h" // for gfxASurface, etc
#include "gfxTypes.h"
#include "mozilla/Attributes.h" // for MOZ_OVERRIDE
#include "mozilla/layers/CompositorTypes.h"
#include "mozilla/layers/ISurfaceAllocator.h" // for ISurfaceAllocator

Просмотреть файл

@ -8,7 +8,7 @@
#include <stddef.h> // for size_t
#include <stdint.h> // for uint32_t
#include "gfxASurface.h" // for gfxASurface, etc
#include "gfxTypes.h"
#include "gfxPoint.h" // for gfxIntSize
#include "mozilla/ipc/SharedMemory.h" // for SharedMemory, etc
@ -23,7 +23,6 @@
#define MOZ_HAVE_SURFACEDESCRIPTORGRALLOC
#endif
class gfxASurface;
class gfxSharedImageSurface;
namespace base {

Просмотреть файл

@ -10,7 +10,7 @@
#include <stddef.h> // for size_t
#include <stdint.h> // for uint64_t
#include "gfxASurface.h" // for gfxASurface, etc
#include "gfxTypes.h"
#include "gfxPoint.h" // for gfxIntSize
#include "mozilla/Attributes.h" // for MOZ_OVERRIDE
#include "mozilla/WidgetUtils.h" // for ScreenRotation
@ -24,6 +24,7 @@
struct nsIntPoint;
struct nsIntRect;
class gfxASurface;
namespace mozilla {
namespace layers {

Просмотреть файл

@ -8,7 +8,7 @@
#include <stddef.h> // for size_t
#include <stdint.h> // for uint8_t
#include "ImageContainer.h" // for ISharedImage, Image, etc
#include "gfxASurface.h" // for gfxASurface, etc
#include "gfxTypes.h"
#include "gfxPoint.h" // for gfxIntSize
#include "mozilla/Attributes.h" // for MOZ_OVERRIDE
#include "mozilla/RefPtr.h" // for RefPtr
@ -16,6 +16,8 @@
#include "mozilla/gfx/Types.h" // for SurfaceFormat
#include "nsCOMPtr.h" // for already_AddRefed
class gfxASurface;
namespace mozilla {
namespace ipc {
class Shmem;

Просмотреть файл

@ -46,6 +46,27 @@ using namespace mozilla::layers;
using namespace mozilla::gl;
using namespace mozilla::gfx;
CanvasLayerOGL::CanvasLayerOGL(LayerManagerOGL *aManager)
: CanvasLayer(aManager, nullptr)
, LayerOGL(aManager)
, mLayerProgram(RGBALayerProgramType)
, mTexture(0)
, mTextureTarget(LOCAL_GL_TEXTURE_2D)
, mDelayedUpdates(false)
, mIsGLAlphaPremult(false)
, mUploadTexture(0)
#if defined(GL_PROVIDER_GLX)
, mPixmap(0)
#endif
{
mImplData = static_cast<LayerOGL*>(this);
mForceReadback = Preferences::GetBool("webgl.force-layers-readback", false);
}
CanvasLayerOGL::~CanvasLayerOGL() {
Destroy();
}
static void
MakeTextureIfNeeded(GLContext* gl, GLuint& aTexture)
{
@ -361,3 +382,20 @@ CanvasLayerOGL::CleanupResources()
mUploadTexture = 0;
}
}
gfxImageSurface*
CanvasLayerOGL::GetTempSurface(const gfxIntSize& aSize,
const gfxImageFormat aFormat)
{
if (!mCachedTempSurface ||
aSize.width != mCachedSize.width ||
aSize.height != mCachedSize.height ||
aFormat != mCachedFormat)
{
mCachedTempSurface = new gfxImageSurface(aSize, aFormat);
mCachedSize = aSize;
mCachedFormat = aFormat;
}
return mCachedTempSurface;
}

Просмотреть файл

@ -10,8 +10,7 @@
#include "GLDefs.h" // for GLuint, LOCAL_GL_TEXTURE_2D
#include "LayerManagerOGL.h" // for LayerOGL::GLContext, etc
#include "Layers.h" // for CanvasLayer, etc
#include "gfxASurface.h" // for gfxASurface, etc
#include "gfxImageSurface.h" // for gfxImageSurface
#include "gfxTypes.h"
#include "gfxPoint.h" // for gfxIntSize
#include "mozilla/Preferences.h" // for Preferences
#include "mozilla/RefPtr.h" // for RefPtr
@ -25,7 +24,8 @@
#endif
struct nsIntPoint;
class gfxASurface;
class gfxImageSurface;
namespace mozilla {
namespace layers {
@ -35,26 +35,8 @@ class CanvasLayerOGL :
public LayerOGL
{
public:
CanvasLayerOGL(LayerManagerOGL *aManager)
: CanvasLayer(aManager, nullptr)
, LayerOGL(aManager)
, mLayerProgram(RGBALayerProgramType)
, mTexture(0)
, mTextureTarget(LOCAL_GL_TEXTURE_2D)
, mDelayedUpdates(false)
, mIsGLAlphaPremult(false)
, mUploadTexture(0)
#if defined(GL_PROVIDER_GLX)
, mPixmap(0)
#endif
{
mImplData = static_cast<LayerOGL*>(this);
mForceReadback = Preferences::GetBool("webgl.force-layers-readback", false);
}
~CanvasLayerOGL() {
Destroy();
}
CanvasLayerOGL(LayerManagerOGL *aManager);
~CanvasLayerOGL();
// CanvasLayer implementation
virtual void Initialize(const Data& aData);
@ -91,20 +73,7 @@ protected:
gfxImageFormat mCachedFormat;
gfxImageSurface* GetTempSurface(const gfxIntSize& aSize,
const gfxImageFormat aFormat)
{
if (!mCachedTempSurface ||
aSize.width != mCachedSize.width ||
aSize.height != mCachedSize.height ||
aFormat != mCachedFormat)
{
mCachedTempSurface = new gfxImageSurface(aSize, aFormat);
mCachedSize = aSize;
mCachedFormat = aFormat;
}
return mCachedTempSurface;
}
const gfxImageFormat aFormat);
void DiscardTempSurface() {
mCachedTempSurface = nullptr;

Просмотреть файл

@ -8,7 +8,7 @@
#include "GLDefs.h" // for GLint, GLenum, GLuint, etc
#include "gfx3DMatrix.h" // for gfx3DMatrix
#include "gfxASurface.h" // for gfxASurface, etc
#include "gfxTypes.h"
#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc
#include "mozilla/RefPtr.h" // for RefPtr
#include "mozilla/gfx/Matrix.h" // for Matrix4x4

Просмотреть файл

@ -7,7 +7,7 @@
#define MOZILLA_GFX_TEXTURECLIENTOGL_H
#include "GLContextTypes.h" // for SharedTextureHandle, etc
#include "gfxASurface.h" // for gfxASurface, etc
#include "gfxTypes.h"
#include "mozilla/Attributes.h" // for MOZ_OVERRIDE
#include "mozilla/gfx/Point.h" // for IntSize
#include "mozilla/layers/CompositorTypes.h"

Просмотреть файл

@ -13,7 +13,7 @@
#include "GLDefs.h" // for GLenum, LOCAL_GL_CLAMP_TO_EDGE, etc
#include "GLTextureImage.h" // for TextureImage
#include "gfx3DMatrix.h" // for gfx3DMatrix
#include "gfxASurface.h" // for gfxASurface, etc
#include "gfxTypes.h"
#include "mozilla/GfxMessageUtils.h" // for gfxContentType
#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc
#include "mozilla/Attributes.h" // for MOZ_OVERRIDE

Просмотреть файл

@ -21,11 +21,6 @@
#include "nsStringAPI.h"
#endif
typedef struct _cairo_surface cairo_surface_t;
typedef struct _cairo_user_data_key cairo_user_data_key_t;
typedef void (*thebes_destroy_func_t) (void *data);
class gfxImageSurface;
struct nsIntPoint;
struct nsIntRect;

Просмотреть файл

@ -14,7 +14,6 @@
#include "nsAutoPtr.h"
#include "gfxTypes.h"
#include "gfxASurface.h"
#include "gfxColor.h"
#include "nsRect.h"
@ -31,6 +30,7 @@
#undef OS2EMX_PLAIN_CHAR
#endif
class gfxASurface;
class gfxImageSurface;
class gfxFont;
class gfxFontGroup;

Просмотреть файл

@ -6,6 +6,11 @@
#ifndef GFX_TYPES_H
#define GFX_TYPES_H
typedef struct _cairo_surface cairo_surface_t;
typedef struct _cairo_user_data_key cairo_user_data_key_t;
typedef void (*thebes_destroy_func_t) (void *data);
/**
* Currently needs to be 'double' for Cairo compatibility. Could
* become 'float', perhaps, in some configurations.

Просмотреть файл

@ -9,7 +9,7 @@
#include "Decoder.h"
#include "gfxASurface.h"
#include "gfxTypes.h"
#include "nsCOMPtr.h"

Просмотреть файл

@ -8,7 +8,7 @@
#define mozilla_imagelib_FrameBlender_h_
#include "mozilla/MemoryReporting.h"
#include "gfxASurface.h"
#include "gfxTypes.h"
#include "FrameSequence.h"
#include "nsCOMPtr.h"

Просмотреть файл

@ -9,7 +9,7 @@
#include "nsTArray.h"
#include "mozilla/MemoryReporting.h"
#include "gfxASurface.h"
#include "gfxTypes.h"
#include "imgFrame.h"
namespace mozilla {

Просмотреть файл

@ -6,7 +6,7 @@
#ifndef AndroidDirectTexture_h_
#define AndroidDirectTexture_h_
#include "gfxASurface.h"
#include "gfxTypes.h"
#include "mozilla/Mutex.h"
#include "AndroidGraphicBuffer.h"

Просмотреть файл

@ -6,7 +6,7 @@
#ifndef AndroidGraphicBuffer_h_
#define AndroidGraphicBuffer_h_
#include "gfxASurface.h"
#include "gfxTypes.h"
typedef void* EGLImageKHR;
typedef void* EGLClientBuffer;

Просмотреть файл

@ -13,7 +13,6 @@
#include "nsCOMPtr.h"
#include "nsIAtom.h"
#include "nsNativeTheme.h"
#include "gfxASurface.h"
@class CellDrawView;
@class NSProgressBarCell;

Просмотреть файл

@ -19,8 +19,6 @@
#include "nsITimer.h"
#include "nsGkAtoms.h"
#include "gfxASurface.h"
#include "nsBaseWidget.h"
#include "nsGUIEvent.h"
#include <gdk/gdk.h>
@ -64,6 +62,7 @@ extern PRLogModuleInfo *gWidgetDrawLog;
#endif /* MOZ_LOGGING */
class gfxASurface;
class gfxPattern;
class nsDragService;
#if defined(MOZ_X11) && defined(MOZ_HAVE_SHAREDMEMORYSYSV)

Просмотреть файл

@ -48,7 +48,7 @@
#define _nswindow_h
#include "nsBaseWidget.h"
#include "gfxASurface.h"
#include "gfxTypes.h"
#define INCL_DOS
#define INCL_WIN
@ -72,6 +72,8 @@
#define WM_FOCUSCHANGED 0x000E
#endif
class gfxASurface;
extern "C" {
PVOID APIENTRY WinQueryProperty(HWND hwnd, PCSZ pszNameOrAtom);
PVOID APIENTRY WinRemoveProperty(HWND hwnd, PCSZ pszNameOrAtom);

Просмотреть файл

@ -16,7 +16,7 @@
#ifdef MOZ_HAVE_SHMIMAGE
#include "nsIWidget.h"
#include "gfxASurface.h"
#include "gfxTypes.h"
#include "nsAutoPtr.h"
#include "mozilla/X11Util.h"
@ -32,6 +32,7 @@
class QRect;
class QWidget;
class gfxASurface;
class nsShmImage {
NS_INLINE_DECL_REFCOUNTING(nsShmImage)