From: Paul Wisbey
Date: Tue, 20 Jan 2015 12:46:14 +0000 (+0000)
Subject: Removed unnecessary for loop
X-Git-Tag: accepted/tizen/common/20150123.092456~2
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F43%2F34043%2F1;p=platform%2Fcore%2Fuifw%2Fdali-core.git
Removed unnecessary for loop
Change-Id: Iba497b5422dafdaa80a4d5e04cae73b2907cc434
---
diff --git a/dali/internal/render/gl-resources/bitmap-texture.cpp b/dali/internal/render/gl-resources/bitmap-texture.cpp
index c001da8..408a319 100644
--- a/dali/internal/render/gl-resources/bitmap-texture.cpp
+++ b/dali/internal/render/gl-resources/bitmap-texture.cpp
@@ -312,21 +312,10 @@ void BitmapTexture::Update( Integration::Bitmap* srcBitmap, std::size_t xOffset,
mContext.PixelStorei( GL_UNPACK_ALIGNMENT, 1 );
}
- const unsigned char* pixels = srcBitmap->GetBuffer();
- unsigned int srcWidth = srcBitmap->GetImageWidth();
- const unsigned int pixelDepth = Pixel::GetBytesPerPixel( mPixelFormat );
-
- unsigned int yBottom = yOffset + srcBitmap->GetImageHeight();
-
- for( unsigned int y = yOffset; y < yBottom; y++ )
- {
- mContext.TexSubImage2D( GL_TEXTURE_2D, 0,
- xOffset, y,
- srcWidth, 1,
- pixelFormat, pixelDataType, pixels );
-
- pixels += srcWidth * pixelDepth;
- }
+ mContext.TexSubImage2D( GL_TEXTURE_2D, 0,
+ xOffset, yOffset,
+ srcBitmap->GetImageWidth(), srcBitmap->GetImageHeight(),
+ pixelFormat, pixelDataType, srcBitmap->GetBuffer() );
}
}