OSDN Git Service

Make layer double drawing visible in overdraw debug mode
authorChris Craik <ccraik@google.com>
Mon, 15 Apr 2013 23:08:28 +0000 (16:08 -0700)
committerChris Craik <ccraik@google.com>
Tue, 16 Apr 2013 22:05:49 +0000 (15:05 -0700)
commit34416eaa1c07b3d7a139e780cea8f8d73219650e
tree76047dada59721c749e61801351017a56980b5c2
parent5584737fff6350ab09fb53e6a73bbff770930727
Make layer double drawing visible in overdraw debug mode

A clipped saveLayer will cause two draws - first to an onscreen
buffer, then again back to the framebuffer. This change - when in
overdraw debug - reissues draws associated with a clipped saveLayer,
but only to the stencil buffer. Operations within a saveLayer are
shown correctly to be twice drawn, and View.setAlpha() without an
associated hardware layer, or hasOverlappingRendering() are made more
visible.

Hardware layers, on any frame that they are updated, similarly draw
twice, and will also be counted against the stencil buffer doubly.

Note: greater depths of layers - e.g. a saveLayer within a saveLayer -
are not respected, as that would require additional region tracking.

Change-Id: I61fb0e61038fe66013d59914c20bb47a550dea7d
libs/hwui/Layer.cpp
libs/hwui/Layer.h
libs/hwui/OpenGLRenderer.cpp