diff options
author | sergeyv <sergeyv@google.com> | 2016-10-25 15:21:50 -0700 |
---|---|---|
committer | sergeyv <sergeyv@google.com> | 2016-10-26 14:01:09 -0700 |
commit | 2a38c42e921451abebb4ee5f5ecd738f1b6b04ed (patch) | |
tree | 2074f10be351fa19cfd4fdb80a4e24ed649782ca /libs/hwui/Layer.h | |
parent | 98fa4f9e7b33a3004ce9142c9acd4300391b9a0e (diff) |
Add target to texture
Test: refactoring cl.
bug:32413624
Change-Id: I94b1c31cd4e0712dfcfd7777a0012424c1bf0dca
Diffstat (limited to 'libs/hwui/Layer.h')
-rw-r--r-- | libs/hwui/Layer.h | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/libs/hwui/Layer.h b/libs/hwui/Layer.h index 9874ce29cb3c..8e71cd11599d 100644 --- a/libs/hwui/Layer.h +++ b/libs/hwui/Layer.h @@ -75,7 +75,8 @@ public: } void setSize(uint32_t width, uint32_t height) { - texture.updateSize(width, height, texture.internalFormat(), texture.format()); + texture.updateSize(width, height, texture.internalFormat(), texture.format(), + texture.target()); } inline void setBlend(bool blend) { @@ -120,23 +121,23 @@ public: } inline GLenum getRenderTarget() const { - return renderTarget; + return texture.target(); } inline void setRenderTarget(GLenum renderTarget) { - this->renderTarget = renderTarget; + texture.mTarget = renderTarget; } inline bool isRenderable() const { - return renderTarget != GL_NONE; + return texture.target() != GL_NONE; } void setWrap(GLenum wrap, bool bindTexture = false, bool force = false) { - texture.setWrap(wrap, bindTexture, force, renderTarget); + texture.setWrap(wrap, bindTexture, force); } void setFilter(GLenum filter, bool bindTexture = false, bool force = false) { - texture.setFilter(filter, bindTexture, force, renderTarget); + texture.setFilter(filter, bindTexture, force); } inline SkColorFilter* getColorFilter() const { @@ -186,11 +187,6 @@ private: Texture texture; /** - * Indicates the render target. - */ - GLenum renderTarget = GL_TEXTURE_2D; - - /** * Color filter used to draw this layer. Optional. */ SkColorFilter* colorFilter = nullptr; |