From: Seungho, Baek Date: Tue, 8 May 2018 07:27:13 +0000 (+0900) Subject: Add Pixel format for depth and stencil X-Git-Tag: dali_1.5.9~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=780a6dd13392de6dbf20b6aed5771b1a8372fb5f;p=platform%2Fcore%2Fuifw%2Fdali-adaptor-legacy.git Add Pixel format for depth and stencil - add cases on the switch to control pixel enum Change-Id: I19a6d9abc010cfc434e282b5af1245ed68541c5c Signed-off-by: Seungho, Baek --- diff --git a/dali/internal/imaging/common/pixel-manipulation.cpp b/dali/internal/imaging/common/pixel-manipulation.cpp index e37c88e..eaaca10 100644 --- a/dali/internal/imaging/common/pixel-manipulation.cpp +++ b/dali/internal/imaging/common/pixel-manipulation.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -82,6 +82,17 @@ bool HasChannel( Dali::Pixel::Format pixelFormat, Channel channel ) return ( channel == RED || channel == GREEN || channel == BLUE || channel == ALPHA ); } + case Dali::Pixel::DEPTH_UNSIGNED_INT: + case Dali::Pixel::DEPTH_FLOAT: + { + return ( channel == DEPTH ); + } + + case Dali::Pixel::DEPTH_STENCIL: + { + return ( channel == DEPTH || channel == STENCIL ); + } + case Dali::Pixel::INVALID: case Dali::Pixel::COMPRESSED_R11_EAC: case Dali::Pixel::COMPRESSED_SIGNED_R11_EAC: @@ -367,6 +378,13 @@ unsigned int ReadChannel( unsigned char* pixelData, else return 0u; } + case Dali::Pixel::DEPTH_UNSIGNED_INT: + case Dali::Pixel::DEPTH_FLOAT: + case Dali::Pixel::DEPTH_STENCIL: + { + return 0u; + } + default: { return 0u; @@ -640,6 +658,13 @@ void WriteChannel( unsigned char* pixelData, break; } + case Dali::Pixel::DEPTH_UNSIGNED_INT: + case Dali::Pixel::DEPTH_FLOAT: + case Dali::Pixel::DEPTH_STENCIL: + { + break; + } + default: break; } diff --git a/dali/internal/imaging/common/pixel-manipulation.h b/dali/internal/imaging/common/pixel-manipulation.h index 611b5a6..99c23e9 100644 --- a/dali/internal/imaging/common/pixel-manipulation.h +++ b/dali/internal/imaging/common/pixel-manipulation.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_ADAPTOR_PIXEL_MANIPULATION_H /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -35,6 +35,8 @@ enum Channel GREEN, BLUE, ALPHA, + DEPTH, + STENCIL, MAX_NUMBER_OF_CHANNELS };