summaryrefslogtreecommitdiffstats
path: root/libs/hwui/Snapshot.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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