[Tizen] Add Pixel format for depth and stencil
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / npatch-loader.cpp
index 209840b..1bc1ce4 100644 (file)
@@ -1,5 +1,5 @@
  /*
- * Copyright (c) 2016 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.
@@ -148,6 +148,9 @@ void GetRedOffsetAndMask( Dali::Pixel::Format pixelFormat, int& byteOffset, int&
     }
     case Dali::Pixel::RGB16F:
     case Dali::Pixel::RGB32F:
+    case Dali::Pixel::DEPTH_UNSIGNED_INT:
+    case Dali::Pixel::DEPTH_FLOAT:
+    case Dali::Pixel::DEPTH_STENCIL:
     {
       DALI_LOG_ERROR("Pixel format not compatible.\n");
       byteOffset=0;
@@ -157,7 +160,7 @@ void GetRedOffsetAndMask( Dali::Pixel::Format pixelFormat, int& byteOffset, int&
   }
 }
 
-Uint16Pair ParseRange( unsigned int& index, unsigned int width, unsigned char* pixel, unsigned int pixelStride, int testByte, int testBits, int testValue )
+Uint16Pair ParseRange( unsigned int& index, unsigned int width, unsigned char*& pixel, unsigned int pixelStride, int testByte, int testBits, int testValue )
 {
   unsigned int start = 0xFFFF;
   for( ; index < width; ++index, pixel += pixelStride )