summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author John Reck <jreck@google.com> 2016-01-22 19:18:43 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2016-01-22 19:18:43 +0000
commita5b2029e1b88414bcd3b8d317cf4670219f95cd2 (patch)
treee324f68efb7be0f1e524d358e9e6c88e1991e1c8
parent21f255dea9c7831b2764c3f7d418a88d64a46aa3 (diff)
parentbd41ded59090e8cdf598e0c65693f1cf0885bbea (diff)
Merge "Fix accidental activateTexture(0)"
-rw-r--r--libs/hwui/Texture.cpp1
-rw-r--r--libs/hwui/renderstate/OffscreenBufferPool.cpp1
2 files changed, 1 insertions, 1 deletions
diff --git a/libs/hwui/Texture.cpp b/libs/hwui/Texture.cpp
index 92de89491127..0f02f4c0aba7 100644
--- a/libs/hwui/Texture.cpp
+++ b/libs/hwui/Texture.cpp
@@ -95,7 +95,6 @@ bool Texture::updateSize(uint32_t width, uint32_t height, GLint format) {
void Texture::upload(GLint internalformat, uint32_t width, uint32_t height,
GLenum format, GLenum type, const void* pixels) {
GL_CHECKPOINT();
- mCaches.textureState().activateTexture(0);
bool needsAlloc = updateSize(width, height, internalformat);
if (!mId) {
glGenTextures(1, &mId);
diff --git a/libs/hwui/renderstate/OffscreenBufferPool.cpp b/libs/hwui/renderstate/OffscreenBufferPool.cpp
index 98c94dfab1c5..54f38e848327 100644
--- a/libs/hwui/renderstate/OffscreenBufferPool.cpp
+++ b/libs/hwui/renderstate/OffscreenBufferPool.cpp
@@ -41,6 +41,7 @@ OffscreenBuffer::OffscreenBuffer(RenderState& renderState, Caches& caches,
, texture(caches) {
uint32_t width = computeIdealDimension(viewportWidth);
uint32_t height = computeIdealDimension(viewportHeight);
+ caches.textureState().activateTexture(0);
texture.resize(width, height, GL_RGBA);
texture.blend = true;
texture.setWrap(GL_CLAMP_TO_EDGE);