diff options
| author | 2015-08-04 16:55:35 +0800 | |
|---|---|---|
| committer | 2015-08-04 19:46:01 +0800 | |
| commit | d538d30e2f498de12a46e2aa3b0814c8d9526226 (patch) | |
| tree | 3ab1643d6affabaf8fc4f3f74343d42ea10cd7f7 /libs/hwui/Extensions.h | |
| parent | 40f0efe03df87cf340de089bcb09010a88f8a120 (diff) | |
hwui: add extension to support unpack operations in OpenGL ES 2.0
OpenGL ES 3.0+ lets us specify the row length for unpack operations
such as glTexSubImage2D(). This allows us to upload a sub-rectangle
of a texture. Also, the GL_EXT_unpack_subimage extension can also
support this feature in OpenGL ES 2.0
Change-Id: Id43c2c55c5eaefbace67087c955f0b4324fb2c35
Signed-off-by: xiaozhengdong <xiaozhengdong@xiaomi.com>
Diffstat (limited to 'libs/hwui/Extensions.h')
| -rw-r--r-- | libs/hwui/Extensions.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/hwui/Extensions.h b/libs/hwui/Extensions.h index 25d4c5ea05c3..b3cc45195a2a 100644 --- a/libs/hwui/Extensions.h +++ b/libs/hwui/Extensions.h @@ -41,7 +41,7 @@ public: inline bool has1BitStencil() const { return mHas1BitStencil; } inline bool has4BitStencil() const { return mHas4BitStencil; } inline bool hasNvSystemTime() const { return mHasNvSystemTime; } - inline bool hasUnpackRowLength() const { return mVersionMajor >= 3; } + inline bool hasUnpackRowLength() const { return mVersionMajor >= 3 || mHasUnpackSubImage; } inline bool hasPixelBufferObjects() const { return mVersionMajor >= 3; } inline bool hasOcclusionQueries() const { return mVersionMajor >= 3; } inline bool hasFloatTextures() const { return mVersionMajor >= 3; } @@ -74,6 +74,7 @@ private: bool mHas1BitStencil; bool mHas4BitStencil; bool mHasNvSystemTime; + bool mHasUnpackSubImage; int mVersionMajor; int mVersionMinor; |