convert canvas::IColorBuffer::Format to scoped enum

Change-Id: I0013c0b14992062be97977bf00f4af89fb2766f5
Reviewed-on: https://gerrit.libreoffice.org/22633
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
This commit is contained in:
Noel Grandin
2016-02-23 10:06:19 +02:00
committed by Noel Grandin
parent b2bb094f6b
commit 02a320777f
3 changed files with 7 additions and 7 deletions

View File

@@ -381,7 +381,7 @@ namespace dxcanvas
{ {
switch( rSource.getFormat() ) switch( rSource.getFormat() )
{ {
case ::canvas::IColorBuffer::FMT_A8R8G8B8: case ::canvas::IColorBuffer::Format::A8R8G8B8:
{ {
const std::size_t nSourceBytesPerPixel(4); const std::size_t nSourceBytesPerPixel(4);
const std::size_t nSourcePitchInBytes(rSource.getStride()); const std::size_t nSourcePitchInBytes(rSource.getStride());
@@ -422,7 +422,7 @@ namespace dxcanvas
} }
break; break;
case ::canvas::IColorBuffer::FMT_X8R8G8B8: case ::canvas::IColorBuffer::Format::X8R8G8B8:
{ {
const std::size_t nSourceBytesPerPixel(4); const std::size_t nSourceBytesPerPixel(4);
const std::size_t nSourcePitchInBytes(rSource.getStride()); const std::size_t nSourcePitchInBytes(rSource.getStride());

View File

@@ -98,7 +98,7 @@ namespace dxcanvas
canvas::IColorBuffer::Format DXColorBuffer::getFormat() const canvas::IColorBuffer::Format DXColorBuffer::getFormat() const
{ {
return canvas::IColorBuffer::FMT_X8R8G8B8; return canvas::IColorBuffer::Format::X8R8G8B8;
} }
@@ -174,7 +174,7 @@ namespace dxcanvas
canvas::IColorBuffer::Format GDIColorBuffer::getFormat() const canvas::IColorBuffer::Format GDIColorBuffer::getFormat() const
{ {
return canvas::IColorBuffer::FMT_A8R8G8B8; return canvas::IColorBuffer::Format::A8R8G8B8;
} }
} }

View File

@@ -33,13 +33,13 @@ namespace canvas
struct IColorBuffer struct IColorBuffer
{ {
/// The underlying pixel format for this buffer /// The underlying pixel format for this buffer
enum Format enum class Format
{ {
// 32-bit ARGB pixel format with alpha, 8 bits per channel. // 32-bit ARGB pixel format with alpha, 8 bits per channel.
FMT_A8R8G8B8, A8R8G8B8,
// 32-bit RGB pixel format, 8 bits per channel. // 32-bit RGB pixel format, 8 bits per channel.
FMT_X8R8G8B8 X8R8G8B8
}; };
virtual ~IColorBuffer() {} virtual ~IColorBuffer() {}