OSDN Git Service

update parameters in uploadToTexture() for GLES20
authorLu, Shenghua <shenghua.lu@intel.com>
Wed, 27 Nov 2013 12:16:43 +0000 (20:16 +0800)
committerShuo Gao <shuo.gao@intel.com>
Fri, 13 Jun 2014 01:42:33 +0000 (09:42 +0800)
commitc5e0a295418a1fd8c17608041962d70296af6794
treec4d1ecdd18fce61a65f7534dd368856a1872539e
parent77d28ca25378530f92d409fbd72a38a1e256b59f
update parameters in uploadToTexture() for GLES20

Google optimized the uploadToTexture with GLES3.0+,
This allows us to upload a sub-rectangle of texture,
but this has compliance issue with GLES 2.0.

With OpenGL ES 2.0 we need to copy the bitmap in a
temporary buffer if the stride doesn't match the width,
and then upload entire temporary stripes.

Change-Id: I8987cd8347913c61b7fa45bd47be1189aa6bdb05
Signed-off-by: Shenghua Lu <shenghua.lu@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Guobin Zhang<guobin.zhang@intel.com>
libs/hwui/TextureCache.cpp
libs/hwui/TextureCache.h