From ada830f639591b99c3e40de22b07296c7932a33f Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Thu, 13 Jan 2011 12:13:20 -0800 Subject: Cleanup implementation of hardware layers. The new implementation relies on OpenGLRenderer's existing layer code instead of duplicating it. The new code is much cleaner, with simpler and better APIs and allows tracking of drawn regions inside layers. Region tracking is not yet enabled but this will be done in a future CL. Change-Id: Ie826121a2227de8252c77b992a61218defea5143 --- libs/hwui/DisplayListRenderer.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'libs/hwui/DisplayListRenderer.cpp') diff --git a/libs/hwui/DisplayListRenderer.cpp b/libs/hwui/DisplayListRenderer.cpp index fdb4e8c..57df976 100644 --- a/libs/hwui/DisplayListRenderer.cpp +++ b/libs/hwui/DisplayListRenderer.cpp @@ -242,8 +242,7 @@ void DisplayList::replay(OpenGLRenderer& renderer) { } break; case DrawLayer: { - renderer.drawLayer(getInt(), getFloat(), getFloat(), getFloat(), getFloat(), - getFloat(), getFloat(), getPaint()); + renderer.drawLayer((Layer*) getInt(), getFloat(), getFloat(), getPaint()); } break; case DrawBitmap: { @@ -488,13 +487,10 @@ void DisplayListRenderer::drawDisplayList(DisplayList* displayList) { addDisplayList(displayList); } -void DisplayListRenderer::drawLayer(int texture, float left, float top, float right, float bottom, - float u, float v, SkPaint* paint) { +void DisplayListRenderer::drawLayer(Layer* layer, float x, float y, SkPaint* paint) { addOp(DisplayList::DrawLayer); - addInt(texture); - addBounds(left, top, right, bottom); - addFloat(u); - addFloat(v); + addInt((int) layer); + addPoint(x, y); addPaint(paint); } -- cgit v1.1