gecko/gfx/gl/SurfaceTypes.h
jdashg 4e9300d191 Bug 1066280 - Fixes. - r=kamidphish,mattwoodrow
From 4e9f52ab105333e8b1120342e9583b2d833a4465 Mon Sep 17 00:00:00 2001
---
 dom/canvas/WebGLContext.cpp                | 10 +++++--
 gfx/gl/GLContext.cpp                       | 20 --------------
 gfx/gl/GLContext.h                         |  3 --
 gfx/gl/GLReadTexImageHelper.cpp            |  5 +++-
 gfx/gl/GLScreenBuffer.cpp                  | 13 +++++++--
 gfx/gl/GLUploadHelpers.cpp                 | 27 ++++++++++++++++++
 gfx/gl/SharedSurfaceGralloc.cpp            | 14 ++++------
 gfx/gl/SharedSurfaceGralloc.h              | 10 +++++--
 gfx/gl/SurfaceTypes.cpp                    |  2 ++
 gfx/gl/SurfaceTypes.h                      |  1 +
 gfx/layers/client/CanvasClient.cpp         | 44 ++++++++++++++++++------------
 gfx/layers/client/CanvasClient.h           |  8 +++---
 gfx/layers/client/ClientCanvasLayer.cpp    |  6 ++++
 gfx/layers/client/ClientCanvasLayer.h      |  2 +-
 gfx/layers/client/TextureClient.cpp        | 11 ++++----
 gfx/layers/client/TextureClient.h          |  6 ++--
 gfx/layers/composite/TextureHost.cpp       | 15 +++++-----
 gfx/layers/composite/TextureHost.h         | 10 +++----
 gfx/layers/d3d10/CanvasLayerD3D10.cpp      |  9 ++++--
 gfx/layers/d3d9/CanvasLayerD3D9.cpp        |  8 ++++--
 gfx/layers/ipc/LayersSurfaces.ipdlh        |  4 +--
 gfx/layers/moz.build                       |  4 ++-
 gfx/layers/opengl/GrallocTextureClient.cpp | 26 +++++++++++++++++-
 gfx/layers/opengl/GrallocTextureClient.h   |  3 ++
 24 files changed, 171 insertions(+), 90 deletions(-)
2014-10-07 21:11:54 -07:00

108 lines
2.1 KiB
C++

/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
/* 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 SURFACE_TYPES_H_
#define SURFACE_TYPES_H_
#include "mozilla/TypedEnum.h"
#include "mozilla/RefPtr.h"
#include "mozilla/Attributes.h"
#include <stdint.h>
namespace mozilla {
namespace layers {
class ISurfaceAllocator;
}
namespace gl {
struct SurfaceCaps MOZ_FINAL
{
bool any;
bool color, alpha;
bool bpp16;
bool depth, stencil;
bool antialias;
bool premultAlpha;
bool preserve;
// The surface allocator that we want to create this
// for. May be null.
RefPtr<layers::ISurfaceAllocator> surfaceAllocator;
SurfaceCaps();
SurfaceCaps(const SurfaceCaps& other);
~SurfaceCaps();
void Clear();
SurfaceCaps& operator=(const SurfaceCaps& other);
// We can't use just 'RGB' here, since it's an ancient Windows macro.
static SurfaceCaps ForRGB() {
SurfaceCaps caps;
caps.color = true;
return caps;
}
static SurfaceCaps ForRGBA() {
SurfaceCaps caps;
caps.color = true;
caps.alpha = true;
return caps;
}
static SurfaceCaps Any() {
SurfaceCaps caps;
caps.any = true;
return caps;
}
};
MOZ_BEGIN_ENUM_CLASS(SharedSurfaceType, uint8_t)
Unknown = 0,
Basic,
GLTextureShare,
EGLImageShare,
EGLSurfaceANGLE,
DXGLInterop,
DXGLInterop2,
Gralloc,
IOSurface,
Max
MOZ_END_ENUM_CLASS(SharedSurfaceType)
MOZ_BEGIN_ENUM_CLASS(SurfaceStreamType, uint8_t)
SingleBuffer,
TripleBuffer_Copy,
TripleBuffer_Async,
TripleBuffer,
Max
MOZ_END_ENUM_CLASS(SurfaceStreamType)
MOZ_BEGIN_ENUM_CLASS(AttachmentType, uint8_t)
Screen = 0,
GLTexture,
GLRenderbuffer,
Max
MOZ_END_ENUM_CLASS(AttachmentType)
} /* namespace gfx */
} /* namespace mozilla */
#endif /* SURFACE_TYPES_H_ */