summaryrefslogtreecommitdiffstats
path: root/libs/hwui/LayerRenderer.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/LayerRenderer.h')
-rw-r--r--libs/hwui/LayerRenderer.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/libs/hwui/LayerRenderer.h b/libs/hwui/LayerRenderer.h
index 5f86731..bf7828c 100644
--- a/libs/hwui/LayerRenderer.h
+++ b/libs/hwui/LayerRenderer.h
@@ -27,6 +27,8 @@
namespace android {
namespace uirenderer {
+class RenderState;
+
///////////////////////////////////////////////////////////////////////////////
// Defines
///////////////////////////////////////////////////////////////////////////////
@@ -44,30 +46,30 @@ namespace uirenderer {
class LayerRenderer: public OpenGLRenderer {
public:
- ANDROID_API LayerRenderer(Layer* layer);
+ LayerRenderer(RenderState& renderState, Layer* layer);
virtual ~LayerRenderer();
- virtual void setViewport(int width, int height);
+ virtual void onViewportInitialized() { /* do nothing */ }
virtual status_t prepareDirty(float left, float top, float right, float bottom, bool opaque);
virtual status_t clear(float left, float top, float right, float bottom, bool opaque);
virtual void finish();
- ANDROID_API static Layer* createTextureLayer(bool isOpaque);
- ANDROID_API static Layer* createLayer(uint32_t width, uint32_t height, bool isOpaque = false);
- ANDROID_API static bool resizeLayer(Layer* layer, uint32_t width, uint32_t height);
- ANDROID_API static void updateTextureLayer(Layer* layer, uint32_t width, uint32_t height,
- bool isOpaque, GLenum renderTarget, float* transform);
- ANDROID_API static void destroyLayer(Layer* layer);
+ static Layer* createTextureLayer(RenderState& renderState);
+ static Layer* createRenderLayer(RenderState& renderState, uint32_t width, uint32_t height);
+ static bool resizeLayer(Layer* layer, uint32_t width, uint32_t height);
+ static void updateTextureLayer(Layer* layer, uint32_t width, uint32_t height,
+ bool isOpaque, bool forceFilter, GLenum renderTarget, float* textureTransform);
+ static void destroyLayer(Layer* layer);
ANDROID_API static void destroyLayerDeferred(Layer* layer);
- ANDROID_API static bool copyLayer(Layer* layer, SkBitmap* bitmap);
+ static bool copyLayer(RenderState& renderState, Layer* layer, SkBitmap* bitmap);
- static void flushLayer(Layer* layer);
+ static void flushLayer(RenderState& renderState, Layer* layer);
protected:
virtual void ensureStencilBuffer();
virtual bool hasLayer() const;
virtual Region* getRegion() const;
- virtual GLint getTargetFbo() const;
+ virtual GLuint getTargetFbo() const;
virtual bool suppressErrorChecks() const;
private: