summaryrefslogtreecommitdiffstats
path: root/libs/hwui/Snapshot.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Prioritize reveal clipping over Outline clippingChris Craik2014-09-041-1/+9
| | | | | | | | | | bug:15780987 bug:17350602 Also update docs around clipping nesting behavior, and some Z ordering behavior. Change-Id: Iaa204350a0adfdcbd8c4b821fb4a9c0ae22f2613
* Define shadow casting behavior within layersChris Craik2014-08-151-1/+9
| | | | | | | | | | | | bug:15860114 Savelayers and HW layers both now support shadow casting. For save layers, the light source should always be correct, for HW layers, the light source position is set when the layer is created, and updated when it is resized. Change-Id: Ie85567dd43c2bb0a0b08fd0bd4db41efa793ac2b
* Use RoundRect clipping for circle reveal animationChris Craik2014-07-301-16/+13
| | | | | | | | bug:16630975 Also, remove inverse clipping feature from reveal animator. Change-Id: I770a4eb48cd123b0ca0f39d16a0f3eefd1be3653
* Round rect outline clippingChris Craik2014-05-151-2/+48
| | | | Change-Id: Iee9cf4f719f6f1917507b69189ad114fa365917b
* Combine projection matrix, and viewport managementChris Craik2014-05-141-5/+3
| | | | | | | Merge management of ortho projection matrix with the viewport size, since they should always be changed together. Change-Id: Iccb8f30828f4fb7848999ac54852e7ed2d6f2eb1
* Revert "Simplify projection matrix management."Jorim Jaggi2014-05-111-1/+0
| | | | This reverts commit 0efaa71d5414287ed4beac0a88cf76f7e33a1e74.
* Simplify projection matrix management.Chris Craik2014-05-091-0/+1
| | | | | | | Store in and use from snapshot, and remove the kFlagOrthoDirty flag, as it's redundant with kFlagIsFboLayer. Change-Id: I2bd380192d50117f4ce1fd2058213669a886f406
* Add logging utility methodsChris Craik2014-05-081-7/+19
| | | | Change-Id: I0f316830dcc0bbf438292a6d0fbe9f8154368500
* Rework and clean up DisplayList projectionChris Craik2014-02-061-4/+0
| | | | | | | | | | Move the projection surface to be a property of a DisplayList, set to true for every background drawable. Additionally, handle a projecting view background such that it doesn't try to project onto itself (which is undesirable). Change-Id: Ic70b17474bd87340e80767f8518f73b233419c7a
* Support projection of DisplayLists onto ancestors.Chris Craik2014-01-151-0/+4
| | | | | | | | | | | | | | | For now, ancestor views signal the acceptance of projections with a save(0x20)/restore pair. During the order traversal, each view with the save(0x20) code will collect descendent views with mProjectToContainedVolume (which still needs to be renamed) so that they can be drawn out of order later. - *Temporary* sample code added to HwAccelerationTest. - Note that a projected displaylist must not be clipped. Change-Id: I45c493e845961535b958d59c53e8aff3f8891d9f
* Isolate tiling clip state from snapshotChris Craik2013-03-211-0/+11
| | | | | | | | | | bug:8409891 Snapshots frequently have their clip overwritten due to applying deferred state - now, store tiling clip information in a separate rect, outside of the snapshot so it isn't overwritten. Change-Id: I21ca4c45dcd802eae99e8de86f11525196777ccb
* Fix clipping and stencil layer issuesChris Craik2013-02-211-9/+0
| | | | | | | | | | | | | bug:8235699 Ensure rectangle clipping operations disable deferring when necessary (i.e., when the op might create a non-rect region), including in DisplayList::setViewProperties Additionally, makes clipping with a kUnion always use a region, for consistency with software rendering Change-Id: I6730f1a80250bcf3f91cd4afde646d470a12dbc2
* Add a RenderBuffer object to store stencil buffers.Romain Guy2013-02-071-0/+3
| | | | | | | | | | | | | | | | | | Bug #7146141 This change is needed to add a render buffer cache to avoid creating and destroying stencil buffers on every frame. This change also allows the renderer to use a 1 bit or 4 bit stencil buffer whenever possible. Finally this change fixes a bug introduced by a previous CL which causes the stencil buffer to not be updated in certain conditions. The fix relies on a new optional parameter in drawColorRects() that can be used to avoid performing a quickReject on rectangles generated by the clip region. Change-Id: I2f55a8e807009887b276a83cde9f53fd5c01199f
* Fix Snapshot::resetClip to also reset the clip regionRomain Guy2013-02-061-0/+1
| | | | Change-Id: I979151e73f64ff9d45f8a5232d8700361b09fbc7
* Implement clipRect with a transform, clipRegion & clipPathRomain Guy2013-01-171-28/+16
| | | | | | | | | | | | | | | | | | | | | Bug #7146141 When non-rectangular clipping occurs in a layer the render buffer used as the stencil buffer is not cached. If this happens on a View's hardware layer the render buffer will live for as long as the layer is bound to the view. When a stencil buffer is required because of a call to Canvas.saveLayer() it will be allocated on every frame. A future change will address this problem. If "show GPU overdraw" is enabled, non-rectangular clips are not supported anymore and we fall back to rectangular clips instead. This is a limitation imposed by OpenGL ES that cannot be worked around at this time. This change also improves the Matrix4 implementation to easily detect when a rect remains a rect after transform. Change-Id: I0e69fb901792d38bc0c4ca1bf9fdb02d7db415b9
* Preliminary Support for region clippingRomain Guy2013-01-141-0/+2
| | | | | | | | | | | | | | | | | | | | Region clipping, using Canvas.clipPath or Canvas.clipRegion, requires a stencil buffer to be always present. In addition, extra wiring is required in JNI and display lists. This change only adds the necessary JNI/C++ APIs and some extra plumbing to start the real work on properly supporting region clipping. A new debug define called DEBUG_CLIP_REGIONS can be used to draw the current clip region. It is off by default, as is region clipping. The default implementation of clipPath() and clipRegion(), now in native, mimics the previous Dalvik implementation to prevent regressions. Change-Id: I7903e7cfd7412b9b9b622566d4dbfce7bdcec00c
* Fix a couple of rendering issuesRomain Guy2012-09-281-0/+4
| | | | | | | | | | | Bug #7253839 1. Make sure we don't make GL calls while recording display lists 2. Disable an early and trivial clip optimization in font renderer when a perspective transformation is used on the Canvas Change-Id: I3f1052164239329346854f72d0a0d401fbfecf06
* Revert "Revert "Add more support for transformed clip rects and paths""Romain Guy2012-08-311-59/+17
| | | | | | This reverts commit a8557d2169e14997637f57bc897640c8882d4a46. Change-Id: I36d4883d548fc47ba6c0b4a42012107d0d2f85a6
* Revert "Add more support for transformed clip rects and paths"Mathias Agopian2012-08-311-17/+59
| | | | | | | | | this introduced a dead lock in GradientCache's ctor. This reverts commit dfe082f63e94cde9aee271c94d13de5e7217e036. Bug: 7096001 Change-Id: I57b8bbab11fb7cb502fa58e3bbf5d19864db874f
* Add more support for transformed clip rects and pathsRomain Guy2012-08-311-59/+17
| | | | Change-Id: I41791b1e1bffef77d503dc9e52428395d2309688
* Optimization of alpha with DisplayList propertiesChet Haase2012-04-031-2/+2
| | | | | | | | | | | | Some views (such as ImageView and TextView) handle non-opaque alpha values directly. This was originally an optimization, but we can handle it faster in many cases without this optimization when DisplayList properties are enabled. Basically, if a view has non-overlapping rendering, we set the alpha value directly on the renderer (the equivalent of setting it on the Paint object) and draw each primitive with that alpha value. Doing it this way avoids re-creating DisplayLists while getting the same speedup that onSetAlpha() used to get pre-DisplayList properties. Change-Id: I0f7827f075d3b35093a882d4adbb300a1063c288
* Fix the systemRomain Guy2012-02-071-4/+4
| | | | Change-Id: Ie097ea5d6c0af9c5929b8c5deb76b4824d5de787
* Preliminary support for clipRect(Rect, Op)Romain Guy2012-02-071-19/+121
| | | | | | | This adds basic support for clip regions. It is currently disabled at compile time. Enabling clip regions will require setting up a stencil buffer. Change-Id: I638616a972276e38737f8ac0633692c3845eaa74
* Separate interface definition and implementation of SnapshotRomain Guy2012-02-021-0/+154
The Snapshot class is getting complicated enough that its implementation should now live in a separate .cpp file. This will become particularly useful when support for clip regions and paths will be added later on. Change-Id: I050fac5683a9f7a0ff2f7a6beec3dd28aa5eb0d8