18 #ifndef ION_GFX_IMAGE_H_
19 #define ION_GFX_IMAGE_H_
21 #include "base/integral_types.h"
206 void Set(
Format format, uint32
width, uint32 height,
209 void Set(
Format format, uint32
width, uint32 height, uint32 depth,
213 void SetArray(
Format format, uint32
width, uint32 num_planes,
216 void SetArray(
Format format, uint32
width, uint32 height, uint32 num_planes,
247 static const char* GetFormatString(Format format);
250 static const PixelFormat& GetPixelFormat(Format format);
254 static int GetNumComponentsForFormat(Format format);
258 static bool IsCompressedFormat(Format format);
263 static bool Is8BitPerChannelFormat(Format format);
267 static size_t ComputeDataSize(Format format, uint32
width, uint32 height);
268 static size_t ComputeDataSize(Format format, uint32
width, uint32 height,
279 if (notifier == data_.Get())
284 void SetData(Type
type, Dimensions dims, Format format, uint32
width,
316 return channels == bytes_per_pixel;
322 #endif // ION_GFX_IMAGE_H_
Format
Supported image formats.
bits exponent, half float data.
base::ReferentPtr< Image >::Type ImagePtr
Dimensions GetDimensions() const
Depth and depth/stencil renderbuffers.
A Notifier both sends notifications to and receives notifications from other Notifiers.
bit alpha, packed 5551 uint16 data.
bit alpha, packed 2,10,10,10 uint32 data.
Four channel RGBA images.
bool IsCompressed() const
Returns true if the image format is one of the compressed types.
Dimensions
The number of dimensions in the image.
Three channel RGB images.
static size_t ComputeDataSize(Format format, uint32 width, uint32 height)
Convenience functions that return the correct data size in bytes of an image having the given format ...
An Image represents 2D image data that can be used in a texture supplied to a shader.
Two-component red-green images.
bits exponent, packed 5999 uint32 data.
bits blue, packed 10f,11f,11f uint32 data.
bits exponent, float data.
const Grid & image
The original monochrome image data, as doubles (0 - 1).
size_t GetDataSize() const
bits blue, packed float data.
bits blue, packed half float data.
static int GetNumComponentsForFormat(Format format)
Convenience function that returns the number of components for a given format.
static bool IsCompressedFormat(Format format)
Convenience function that returns true if the given format represents compressed image data...
compatibility, where both format and internal_format are GL_RGBA).
Type
The kind of Image, either array or dense, or an EGL type.
static bool Is8BitPerChannelFormat(Format format)
Returns whether the specified format has 8 bits per channel.
const base::DataContainerPtr & GetData() const
A SharedPtr is a smart shared pointer to an instance of some class that implements reference counting...
static const uint32 kNumFormats
green, packed 565 uint16 data.