X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fpublic-api%2Fimages%2Fpixel.cpp;h=b50816f32e3850bfbda18fa973cf10ad3a067780;hb=646f736e77b085c86e982c0d1d4b895c2a431330;hp=276e1c4f5f7cc20fdd15c689f0345148e0d52db1;hpb=066d1a8811c0036cb716ec9f369a6c5194b5994e;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/public-api/images/pixel.cpp b/dali/public-api/images/pixel.cpp index 276e1c4..b50816f 100644 --- a/dali/public-api/images/pixel.cpp +++ b/dali/public-api/images/pixel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -89,6 +89,8 @@ bool Pixel::HasAlpha(Format pixelformat) case COMPRESSED_SRGB8_ETC2: case COMPRESSED_RGB8_ETC1: case COMPRESSED_RGB_PVRTC_4BPPV1: + case RGB16F: + case RGB32F: case INVALID: { return false; @@ -97,7 +99,7 @@ bool Pixel::HasAlpha(Format pixelformat) return false; } -unsigned int Pixel::GetBytesPerPixel(Format pixelFormat) +uint32_t Pixel::GetBytesPerPixel(Format pixelFormat) { switch (pixelFormat) { @@ -131,6 +133,16 @@ unsigned int Pixel::GetBytesPerPixel(Format pixelFormat) return 4; } + case RGB16F: + { + return 12; + } + + case RGB32F: + { + return 24; + } + case COMPRESSED_R11_EAC: case COMPRESSED_SIGNED_R11_EAC: case COMPRESSED_RG11_EAC: @@ -274,6 +286,8 @@ void Pixel::GetAlphaOffsetAndMask(Format pixelFormat, int& byteOffset, int& bitM case COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR: case COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR: case COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR: + case RGB16F: + case RGB32F: case INVALID: { DALI_LOG_ERROR("Pixel formats for compressed images are not compatible with simple masking-out of per-pixel alpha.\n");