Add target to texture
Test: refactoring cl.
bug:32413624
Change-Id: I94b1c31cd4e0712dfcfd7777a0012424c1bf0dca
diff --git a/libs/hwui/Layer.h b/libs/hwui/Layer.h
index 9874ce2..8e71cd1 100644
--- a/libs/hwui/Layer.h
+++ b/libs/hwui/Layer.h
@@ -75,7 +75,8 @@
}
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 @@
}
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 @@
Texture texture;
/**
- * Indicates the render target.
- */
- GLenum renderTarget = GL_TEXTURE_2D;
-
- /**
* Color filter used to draw this layer. Optional.
*/
SkColorFilter* colorFilter = nullptr;