diff options
author | Romain Guy <romainguy@google.com> | 2011-09-07 17:55:15 -0700 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2011-09-07 17:55:15 -0700 |
commit | 8a3957d43bcae93fbb9f6b4b4c3de8abdb3c953c (patch) | |
tree | 53c8d8bbf6c229316644bdc8d492a658ceb8a4e3 /libs | |
parent | 7a57009c3ab5e4a55db448596a650261e878c975 (diff) | |
download | frameworks_base-8a3957d43bcae93fbb9f6b4b4c3de8abdb3c953c.zip frameworks_base-8a3957d43bcae93fbb9f6b4b4c3de8abdb3c953c.tar.gz frameworks_base-8a3957d43bcae93fbb9f6b4b4c3de8abdb3c953c.tar.bz2 |
Add reminder in the code to fix T-junctions
Change-Id: I52b112694f930e641f01fb78dc55412986023411
Diffstat (limited to 'libs')
-rw-r--r-- | libs/hwui/LayerRenderer.cpp | 7 | ||||
-rw-r--r-- | libs/hwui/OpenGLRenderer.cpp | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/libs/hwui/LayerRenderer.cpp b/libs/hwui/LayerRenderer.cpp index 7e8c7fd..349b9e3 100644 --- a/libs/hwui/LayerRenderer.cpp +++ b/libs/hwui/LayerRenderer.cpp @@ -91,6 +91,13 @@ Region* LayerRenderer::getRegion() { #endif } +// TODO: This implementation is flawed and can generate T-junctions +// in the mesh, which will in turn produce cracks when the +// mesh is rotated/skewed. The easiest way to fix this would +// be, for each row, to add new vertices shared with the previous +// row when the two rows share an edge. +// In practice, T-junctions do not appear often so this has yet +// to be fixed. void LayerRenderer::generateMesh() { #if RENDER_LAYERS_AS_REGIONS if (mLayer->region.isRect() || mLayer->region.isEmpty()) { diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index a20a88e..24784af 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -724,6 +724,8 @@ void OpenGLRenderer::composeLayerRegion(Layer* layer, const Rect& rect) { return; } + // TODO: See LayerRenderer.cpp::generateMesh() for important + // information about this implementation if (!layer->region.isEmpty()) { size_t count; const android::Rect* rects = layer->region.getArray(&count); |