mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 913872 - Take nested enums out of gfxASurface - 2/3 : manual changes - r=jrmuizel
This commit is contained in:
parent
c1d7f88886
commit
1eebb52b07
@ -13,6 +13,7 @@ include protocol PPluginSurface;
|
||||
|
||||
include "mozilla/plugins/PluginMessageUtils.h";
|
||||
include "ipc/nsGUIEventIPC.h";
|
||||
include "gfxTypes.h";
|
||||
|
||||
using NPError;
|
||||
using NPRemoteWindow;
|
||||
@ -23,7 +24,7 @@ using NPNURLVariable;
|
||||
using NPCoordinateSpace;
|
||||
using NPNVariable;
|
||||
using mozilla::plugins::NativeWindowHandle;
|
||||
using mozilla::gfxSurfaceType;
|
||||
using gfxSurfaceType;
|
||||
using gfxIntSize;
|
||||
using mozilla::null_t;
|
||||
using mozilla::plugins::WindowsSharedMemoryHandle;
|
||||
|
@ -34,9 +34,7 @@
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
typedef gfxContentType gfxContentType;
|
||||
typedef gfxImageFormat PixelFormat;
|
||||
typedef gfxSurfaceType gfxSurfaceType;
|
||||
typedef gfxPattern::GraphicsFilter GraphicsFilterType;
|
||||
|
||||
} // namespace mozilla
|
||||
@ -186,14 +184,14 @@ struct ParamTraits<gfx3DMatrix>
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ParamTraits<mozilla::gfxContentType>
|
||||
: public EnumSerializer<mozilla::gfxContentType,
|
||||
struct ParamTraits<gfxContentType>
|
||||
: public EnumSerializer<gfxContentType,
|
||||
GFX_CONTENT_COLOR,
|
||||
GFX_CONTENT_SENTINEL>
|
||||
{};
|
||||
|
||||
template <>
|
||||
struct ParamTraits<mozilla::gfxSurfaceType>
|
||||
struct ParamTraits<gfxSurfaceType>
|
||||
: public EnumSerializer<gfxSurfaceType,
|
||||
gfxSurfaceTypeImage,
|
||||
gfxSurfaceTypeMax>
|
||||
|
@ -26,8 +26,6 @@ namespace layers {
|
||||
class MOZ_STACK_CLASS AutoOpenSurface
|
||||
{
|
||||
public:
|
||||
typedef gfxContentType gfxContentType;
|
||||
typedef gfxImageFormat gfxImageFormat;
|
||||
|
||||
/** |aDescriptor| must be valid while AutoOpenSurface is
|
||||
* in scope. */
|
||||
|
@ -45,7 +45,6 @@ class CompositableForwarder : public ISurfaceAllocator
|
||||
friend class AutoOpenSurface;
|
||||
friend class DeprecatedTextureClientShmem;
|
||||
public:
|
||||
typedef gfxContentType gfxContentType;
|
||||
|
||||
CompositableForwarder()
|
||||
: mMultiProcess(false)
|
||||
|
@ -16,7 +16,6 @@ using nsIntPoint;
|
||||
using nsIntRect;
|
||||
using nsIntRegion;
|
||||
using nsIntSize;
|
||||
using mozilla::gfxContentType;
|
||||
using mozilla::GraphicsFilterType;
|
||||
using mozilla::layers::FrameMetrics;
|
||||
using mozilla::layers::MagicGrallocBufferHandle;
|
||||
|
@ -137,8 +137,6 @@ class ShadowLayerForwarder : public CompositableForwarder
|
||||
friend class DeprecatedTextureClientShmem;
|
||||
friend class ContentClientIncremental;
|
||||
|
||||
typedef gfxImageFormat gfxImageFormat;
|
||||
|
||||
public:
|
||||
virtual ~ShadowLayerForwarder();
|
||||
|
||||
|
@ -44,7 +44,6 @@ friend already_AddRefed<Image> CreateSharedRGBImage(ImageContainer* aImageContai
|
||||
nsIntSize aSize,
|
||||
gfxImageFormat aImageFormat);
|
||||
public:
|
||||
typedef gfxImageFormat gfxImageFormat;
|
||||
struct Header {
|
||||
gfxImageFormat mImageFormat;
|
||||
};
|
||||
@ -103,7 +102,6 @@ protected:
|
||||
class SharedRGBImage : public Image
|
||||
, public ISharedImage
|
||||
{
|
||||
typedef gfxImageFormat gfxImageFormat;
|
||||
public:
|
||||
SharedRGBImage(ImageClient* aCompositable);
|
||||
~SharedRGBImage();
|
||||
|
@ -55,54 +55,6 @@ public:
|
||||
#endif
|
||||
|
||||
public:
|
||||
/**
|
||||
* The format for an image surface. For all formats with alpha data, 0
|
||||
* means transparent, 1 or 255 means fully opaque.
|
||||
*/
|
||||
typedef enum {
|
||||
gfxImageFormatARGB32, ///< ARGB data in native endianness, using premultiplied alpha
|
||||
gfxImageFormatRGB24, ///< xRGB data in native endianness
|
||||
gfxImageFormatA8, ///< Only an alpha channel
|
||||
gfxImageFormatA1, ///< Packed transparency information (one byte refers to 8 pixels)
|
||||
gfxImageFormatRGB16_565, ///< RGB_565 data in native endianness
|
||||
gfxImageFormatUnknown
|
||||
} gfxImageFormat;
|
||||
|
||||
typedef enum {
|
||||
gfxSurfaceTypeImage,
|
||||
gfxSurfaceTypePDF,
|
||||
gfxSurfaceTypePS,
|
||||
gfxSurfaceTypeXlib,
|
||||
gfxSurfaceTypeXcb,
|
||||
gfxSurfaceTypeGlitz, // unused, but needed for cairo parity
|
||||
gfxSurfaceTypeQuartz,
|
||||
gfxSurfaceTypeWin32,
|
||||
gfxSurfaceTypeBeOS,
|
||||
gfxSurfaceTypeDirectFB, // unused, but needed for cairo parity
|
||||
gfxSurfaceTypeSVG,
|
||||
gfxSurfaceTypeOS2,
|
||||
gfxSurfaceTypeWin32Printing,
|
||||
gfxSurfaceTypeQuartzImage,
|
||||
gfxSurfaceTypeScript,
|
||||
gfxSurfaceTypeQPainter,
|
||||
gfxSurfaceTypeRecording,
|
||||
gfxSurfaceTypeVG,
|
||||
gfxSurfaceTypeGL,
|
||||
gfxSurfaceTypeDRM,
|
||||
gfxSurfaceTypeTee,
|
||||
gfxSurfaceTypeXML,
|
||||
gfxSurfaceTypeSkia,
|
||||
gfxSurfaceTypeSubsurface,
|
||||
gfxSurfaceTypeD2D,
|
||||
gfxSurfaceTypeMax
|
||||
} gfxSurfaceType;
|
||||
|
||||
typedef enum {
|
||||
GFX_CONTENT_COLOR = 0x1000,
|
||||
GFX_CONTENT_ALPHA = 0x2000,
|
||||
GFX_CONTENT_COLOR_ALPHA = 0x3000,
|
||||
GFX_CONTENT_SENTINEL = 0xffff
|
||||
} gfxContentType;
|
||||
|
||||
/** Wrap the given cairo surface and return a gfxASurface for it.
|
||||
* This adds a reference to csurf (owned by the returned gfxASurface).
|
||||
@ -222,22 +174,11 @@ public:
|
||||
// to a sub-class of gfxASurface.)
|
||||
virtual bool SizeOfIsMeasured() const { return false; }
|
||||
|
||||
/**
|
||||
* The memory used by this surface (as reported by KnownMemoryUsed()) can
|
||||
* either live in this process's heap, in this process but outside the
|
||||
* heap, or in another process altogether.
|
||||
*/
|
||||
enum MemoryLocation {
|
||||
GFX_MEMORY_IN_PROCESS_HEAP,
|
||||
GFX_MEMORY_IN_PROCESS_NONHEAP,
|
||||
GFX_MEMORY_OUT_OF_PROCESS
|
||||
};
|
||||
|
||||
/**
|
||||
* Where does this surface's memory live? By default, we say it's in this
|
||||
* process's heap.
|
||||
*/
|
||||
virtual MemoryLocation GetMemoryLocation() const;
|
||||
virtual gfxMemoryLocation GetMemoryLocation() const;
|
||||
|
||||
static int32_t BytePerPixelFromFormat(gfxImageFormat format);
|
||||
|
||||
|
@ -121,8 +121,6 @@ const uint32_t kMaxLenPrefLangList = 32;
|
||||
|
||||
#define UNINITIALIZED_VALUE (-1)
|
||||
|
||||
typedef gfxImageFormat gfxImageFormat;
|
||||
|
||||
inline const char*
|
||||
GetBackendName(mozilla::gfx::BackendType aBackend)
|
||||
{
|
||||
|
@ -37,4 +37,64 @@ enum gfxBreakPriority {
|
||||
eNormalBreak
|
||||
};
|
||||
|
||||
/**
|
||||
* The format for an image surface. For all formats with alpha data, 0
|
||||
* means transparent, 1 or 255 means fully opaque.
|
||||
*/
|
||||
enum gfxImageFormat {
|
||||
gfxImageFormatARGB32, ///< ARGB data in native endianness, using premultiplied alpha
|
||||
gfxImageFormatRGB24, ///< xRGB data in native endianness
|
||||
gfxImageFormatA8, ///< Only an alpha channel
|
||||
gfxImageFormatA1, ///< Packed transparency information (one byte refers to 8 pixels)
|
||||
gfxImageFormatRGB16_565, ///< RGB_565 data in native endianness
|
||||
gfxImageFormatUnknown
|
||||
};
|
||||
|
||||
enum gfxSurfaceType {
|
||||
gfxSurfaceTypeImage,
|
||||
gfxSurfaceTypePDF,
|
||||
gfxSurfaceTypePS,
|
||||
gfxSurfaceTypeXlib,
|
||||
gfxSurfaceTypeXcb,
|
||||
gfxSurfaceTypeGlitz, // unused, but needed for cairo parity
|
||||
gfxSurfaceTypeQuartz,
|
||||
gfxSurfaceTypeWin32,
|
||||
gfxSurfaceTypeBeOS,
|
||||
gfxSurfaceTypeDirectFB, // unused, but needed for cairo parity
|
||||
gfxSurfaceTypeSVG,
|
||||
gfxSurfaceTypeOS2,
|
||||
gfxSurfaceTypeWin32Printing,
|
||||
gfxSurfaceTypeQuartzImage,
|
||||
gfxSurfaceTypeScript,
|
||||
gfxSurfaceTypeQPainter,
|
||||
gfxSurfaceTypeRecording,
|
||||
gfxSurfaceTypeVG,
|
||||
gfxSurfaceTypeGL,
|
||||
gfxSurfaceTypeDRM,
|
||||
gfxSurfaceTypeTee,
|
||||
gfxSurfaceTypeXML,
|
||||
gfxSurfaceTypeSkia,
|
||||
gfxSurfaceTypeSubsurface,
|
||||
gfxSurfaceTypeD2D,
|
||||
gfxSurfaceTypeMax
|
||||
};
|
||||
|
||||
enum gfxContentType {
|
||||
GFX_CONTENT_COLOR = 0x1000,
|
||||
GFX_CONTENT_ALPHA = 0x2000,
|
||||
GFX_CONTENT_COLOR_ALPHA = 0x3000,
|
||||
GFX_CONTENT_SENTINEL = 0xffff
|
||||
};
|
||||
|
||||
/**
|
||||
* The memory used by this surface (as reported by KnownMemoryUsed()) can
|
||||
* either live in this process's heap, in this process but outside the
|
||||
* heap, or in another process altogether.
|
||||
*/
|
||||
enum gfxMemoryLocation {
|
||||
GFX_MEMORY_IN_PROCESS_HEAP,
|
||||
GFX_MEMORY_IN_PROCESS_NONHEAP,
|
||||
GFX_MEMORY_OUT_OF_PROCESS
|
||||
};
|
||||
|
||||
#endif /* GFX_TYPES_H */
|
||||
|
@ -8,8 +8,6 @@
|
||||
#include "AndroidDirectTexture.h"
|
||||
#include "nsRect.h"
|
||||
|
||||
typedef gfxImageFormat gfxImageFormat;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
AndroidDirectTexture::AndroidDirectTexture(uint32_t width, uint32_t height, uint32_t usage,
|
||||
|
@ -21,8 +21,6 @@ typedef uint32_t EGLenum;
|
||||
typedef int32_t EGLint;
|
||||
typedef uint32_t EGLBoolean;
|
||||
|
||||
typedef gfxImageFormat gfxImageFormat;
|
||||
|
||||
#define EGL_TRUE 1
|
||||
#define EGL_FALSE 0
|
||||
#define EGL_NONE 0x3038
|
||||
@ -392,9 +390,9 @@ uint32_t
|
||||
AndroidGraphicBuffer::GetAndroidFormat(gfxImageFormat aFormat)
|
||||
{
|
||||
switch (aFormat) {
|
||||
case gfxImageFormat::gfxImageFormatRGB24:
|
||||
case gfxImageFormatRGB24:
|
||||
return HAL_PIXEL_FORMAT_RGBX_8888;
|
||||
case gfxImageFormat::gfxImageFormatRGB16_565:
|
||||
case gfxImageFormatRGB16_565:
|
||||
return HAL_PIXEL_FORMAT_RGB_565;
|
||||
default:
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user