summaryrefslogtreecommitdiffstats
path: root/libs/hwui/DisplayList.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make sure we register functor countJohn Reck2014-03-061-0/+3
| | | | | | Bug: 13339664 Change-Id: Iafb8ba77bdf1d971c1d0a345ff525e7f7fa80352
* Merge "Draw shadows from casters together if the Z values are similar"Chris Craik2014-03-061-18/+52
|\
| * Draw shadows from casters together if the Z values are similarChris Craik2014-03-051-18/+52
| | | | | | | | Change-Id: Ib5d00c83e81d9d4c384685a84988a681da8b4490
* | Fix warnings in hwuiChris Craik2014-03-051-1/+1
|/ | | | Change-Id: I6ad6b78531cc0426dc2ea82a32775f7b0265b5b1
* DisplayList overhaulJohn Reck2014-03-041-177/+90
| | | | Change-Id: I53418d580c98f706e971545cff81b9921c12cc5f
* Modulate shadow alpha by caster alphaChris Craik2014-02-211-1/+2
| | | | Change-Id: Ibc4b3958feb3b5dba91d30af470d76555a6209c8
* Make outline and shadow APIs publicChris Craik2014-02-181-1/+1
| | | | Change-Id: If40dc27b2fdc41c3ed355bc9029474b1344c1a03
* Merge "Removing SkiaColorFilter and inspecting the native object directly."Derek Sollenberger2014-02-101-12/+0
|\
| * Removing SkiaColorFilter and inspecting the native object directly.Derek Sollenberger2014-02-071-12/+0
| | | | | | | | | | bug: 10650594 Change-Id: I4fcf66d008765afa0e35d011f58bc792183cb74f
* | Add shadow casting / global perspective APIs, hidden for now.Chris Craik2014-02-071-7/+6
| | | | | | | | | | | | Global perspective isn't yet hooked up in rendering. Change-Id: I64ad272ea5dc523505260ce114f0a6bebdcfe9dc
* | Add the clipToOutline by just using the clipPathOpztenghui2014-02-071-0/+5
|/ | | | Change-Id: I6ba23b589e579599d018600d0744be0efe2028c1
* Merge "Keep the SkPaint used when creating a layer."Derek Sollenberger2014-02-071-2/+1
|\
| * Keep the SkPaint used when creating a layer.Derek Sollenberger2014-02-071-2/+1
| | | | | | | | | | | | | | | | This will allow us to inspect the paint for thing other than color and xfermode, such as SkColorFilters and SkShaders. bug: 10650594 Change-Id: I2c3ddd07a3966e1e77af34136307e2b59b2898c1
* | Merge "Rework and clean up DisplayList projection"Chris Craik2014-02-071-24/+44
|\ \
| * | Rework and clean up DisplayList projectionChris Craik2014-02-061-24/+44
| |/ | | | | | | | | | | | | | | | | | | 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
* | Simplify DisplayList matricesChris Craik2014-02-051-45/+44
|/ | | | | | | Somewhat unifies the ortho/perspecive paths - the property matrix (translate/scale/rotate) is now always a Matrix4. Change-Id: I36e4fe83d1150ee6e4be5f64f34d0fc8d6525cc6
* Add initial hidden outline APIsChris Craik2014-01-301-5/+5
| | | | | | | Background drawable outline usage and drawable outline calculation still to come. Change-Id: I8c7539f1638f86e1f8eb11f4fe49f705f61d58ba
* Update reordering method names, and make 3d reordering API publicChris Craik2014-01-291-4/+4
| | | | | | | | | | IsContainedVolume -> hasIsolatedZVolume conveys that this affects Z ordering of views ProjectToContainedBackground -> ProjectBackwards, since it ended up using its own projection target, separate from the 3d volume bit Change-Id: Ia2cde838cc4da134366fe6ff623290fbd65e50c3
* Remove logging of DisplayList stalenessChris Craik2014-01-271-32/+3
| | | | Change-Id: Ie6b3af3065d4d10ec0bc9b419223d3458d297ea8
* Clear root level reorder lists to prevent accessing stale DisplayListsChris Craik2014-01-241-6/+39
| | | | | | | | | bug:12581401 Adds temporary logging which should log/crash earlier on incorrectly reordering hierarchies. Change-Id: Iee00940718c3cc868161e754aff93cd3b2747094
* Fix view z translation with 3d projection disabledChris Craik2014-01-161-4/+9
| | | | | | | The ortho projection can't handle 3d translation, so skip that step if perspective projection isn't enabled. Change-Id: I231e6bcecc82e876b697e098e034f0fd3b06efde
* Support projection of DisplayLists onto ancestors.Chris Craik2014-01-151-23/+73
| | | | | | | | | | | | | | | 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
* Simplify Z reordering logicChris Craik2014-01-141-33/+31
| | | | Change-Id: I9e36f68d7be5cfd4d69a84a51824cb9a642fe18d
* Add DisplayList bit for projecting onto a contained volumeAlan Viverette2014-01-081-0/+1
| | | | | | Does not handle reordering/translating the projected DisplayList. Change-Id: I6f1ebb2b20b7436c86fe849b35d582fd9c8a8967
* Use const where possible for drawing parametersChris Craik2014-01-031-8/+8
| | | | | | They should never be modified by a Renderer, only read and copied. Change-Id: I9d8d55dca19115ee9dfeb2bb3f092ba2fb327cd4
* Fix Clang warnings/errorsChris Craik2014-01-021-2/+2
| | | | | | | Fix several build warnings (struct != class, int != size_t) and errors (variable leng non-POD arrays). Change-Id: I70b4e784365514303d8954bfcb1f39d7c22c1321
* Create abstract base class for OpenGLRendererChris Craik2013-12-271-2/+1
| | | | | | | | | | | | This will eventually serve as a base class to allow DisplayListRenderer to split off from OpenGLRenderer, and could eventually support other rendering approaches, such as an SkCanvas/SkPicture. This will also be the main source of (implementation-independent) documentation of the canvas/renderer methods. Change-Id: I52047f338f5cf86a3b0b3002af7154bff5c3c227
* Add initial APIs for 3d view manipulation.Chris Craik2013-12-201-2/+2
| | | | Change-Id: I6de00bc577d5b3a1fbc9ca3a3b3668fcfa32b867
* Check mDisplayListData before derefChris Craik2013-12-171-2/+4
| | | | | bug:12191897 Change-Id: I72ed3801e72c657b9d7736b0efb33c5e7cfd5b57
* Create private properties on GLCanvas for experimentation with 3dChris Craik2013-12-161-13/+13
| | | | Change-Id: I17772f61efce727cb4c1111f4d97f58c741786b8
* 3d view system!Chris Craik2013-12-121-55/+209
| | | | | | | | | | | | | | | | | | | True 3d transformations are now supported by DisplayLists and the renderer, initially with the translationZ property on view. Renderer operations used directly by DisplayList (formerly, clip/save/restore/saveLayer) are now more simply managed by allocating them temporarily on the handler's allocator, which exists for a single frame. This is much simpler than continuing to expand the pool of pre-allocated DisplayListOps now that more operations are called directly by DisplayList, especially with z ordered drawing. Still TODO: -APIs for camera positioning, shadows -Make Z apis public, and expose through XML -Make invalidation / input 3d aware Change-Id: I95fe6fa03f9b6ddd34a7e0c6ec8dd9fe47c6c6eb
* Clean up quick rejection, especially surrounding points + lines.Chris Craik2013-11-221-1/+1
| | | | | | | | | | | | | | | | | | | | bug:4351353 quickReject and quickRejectNoScissor have been renamed and refactored: - to make the scissor side effect clear and explicit - dangerous methods no longer public - to make the simple quick reject check logic const - simple quick reject is now conservative This CL also fixes several issues with line and point quickRejection - sub-pixel and hairline lines are much less likely to be incorrectly rejected, especially at small canvas scale. Additionally, alpha modulation for AA points < 1px in size is now correct, dumplicating SW behavior (similar to lines and stroked shapes work). Change-Id: Ibb0710c721b9fb415d05acf54dd3d2b4d602156a
* Always disable the clip for layersRomain Guy2013-09-121-4/+2
| | | | | Bug #8149344 Change-Id: Ifd413cadb171232eb846b3d91b05b2d2457b9f35
* Dump the right matrix when logging display listsChris Craik2013-09-051-1/+1
| | | | | bug:10631274 Change-Id: I6b32bfcb3e207321da60807091d7ac0ecf6112ab
* Refcount 9-patches and properly handle GC eventsRomain Guy2013-06-261-0/+12
| | | | | | | | | | | | | | | | | This change adds refcounting of Res_png_9patch instances, the native data structure used to represent 9-patches. The Dalvik NinePatch class now holds a native pointer instead of a Dalvik byte[]. This pointer is used whenever we need to draw the 9-patch (software or hardware.) Since we are now tracking garbage collection of NinePatch objects libhwui's PatchCache must keep a list of free blocks in the VBO used to store the meshes. This change also removes unnecessary instances tracking from GLES20DisplayList. Bitmaps and 9-patches are refcounted at the native level and do not need to be tracked by the Dalvik layer. Change-Id: Ib8682d573a538aaf1945f8ec5a9bd5da5d16f74b
* Fix various draw ops that may incorrectly not scissorChris Craik2013-06-131-4/+11
| | | | | | | | | | bug:8965976 Also consolidates quickReject scissor-ing and scissor-less paths. Renamed plain 'quickReject' method, as it has sideEffects beyond what the java and skia canvases do. Change-Id: I4bdf874d3c8f469d283eae1e71c5e7ea53d47016
* Remove crash workarounds, add loggingChris Craik2013-06-121-3/+11
| | | | | bug:9321162 Change-Id: I748c27f979af1a303be01db29aedcbad6d608c38
* am 8cb26c09: am cb5d644f: Merge "Workaround possible use after delete" into ↵Chris Craik2013-06-111-1/+2
|\ | | | | | | | | | | | | jb-mr2-dev * commit '8cb26c099dc6357340141c9d81a1131ee404ae41': Workaround possible use after delete
| * Workaround possible use after deleteChris Craik2013-06-101-1/+2
| | | | | | | | | | bug:9321162 Change-Id: Ic35af5b5925da56e9a143e6b33658831038f3b72
* | am 1bf58a5a: am cfbbc864: Merge "Restore previous alpha value on noop\'d ↵Chet Haase2013-05-231-1/+3
|\ \ | |/ | | | | | | | | | | DisplayList operations" into jb-mr2-dev * commit '1bf58a5a4c3275a8de676046da311ec0c3c61c78': Restore previous alpha value on noop'd DisplayList operations
| * Restore previous alpha value on noop'd DisplayList operationsChet Haase2013-05-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | Previously, when a DisplayList operation was rejected because it was not in the clip bounds, the code would not properly restore the previous state, leading to errors in alpha values of the noop'd op being applied to unrelated operations later in the DisplayList. Issue #9051935 Flash of grey background when transitioning to conversation view Change-Id: I56645cc9ebf2e07be0228ca5e249213dbeb10d7d
* | Fix DISPLAY_LIST_DEBUGChris Craik2013-05-211-0/+4
|/ | | | | | will now log ops Change-Id: I4e119999af7ceea0558225aa78926e761277fee2
* Fix off by one error in log trackingChris Craik2013-05-091-1/+1
| | | | | | | | | bug:8875715 Additionally moves op logging before the op is executed, to print correctly, in pre-order traversal Change-Id: I4e9566261f8363c73739d183e6d82b854f72ffad
* Fix scaled-view droppings artifactChet Haase2013-05-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Sometimes views that are scaled leave behind rows/columns on the screen as they move/scale around. The problem was that the pivot point around which the scale takes place (in the default case of scaling around the center of the view) was getting truncated to integer coordinates in the display list. Meanwhile, the pivot point at the Java level was using the true float values, resulting in a mis-match between the invalidation rectangle (computed at the Java level) and the drawing-operation rectangle (computed at the native level). This only occurred when views had odd bounds (thus the integer representation of the center differed from the float representation of the center), and only when some other drawing operation would expand the clip rect to allow the incorrect drawing operation (using the wrong pivot point) to draw outside of its clip boundaries. Issue #8617023 7x7 screen not updated correctly Change-Id: If88889b9450d34535df732b78077a29b1f24802d
* Fix quickReject logic to account for setClipChildren() settingChet Haase2013-04-191-16/+17
| | | | | | | | | | | | | | | | The rendering code optimizes by rejecting drawing operations that lie outside of the bounds of their views. This works in most situations, but breaks down when containers have called setClipChildren(false), because we reject drawing that is outside of that container, but which should be drawn anyway. Fix is to pass in the value of that flag to the DisplayList drawing routines which take that flag into account when deciding whether to quickReject any particular operation. Issue #8659277 animation clipping Change-Id: Ief568e4db01b533a97b3c5ea5ad777c03c0eea71
* Draw Operation mergingChris Craik2013-04-151-1/+1
| | | | | | | | | | | | | | | | | | Merge simple bitmap draw operations and text operations to avoid issuing individual gl draws for each operation. Merging other ops to be done eventually. The methods are different - the bitmap merging generates a single mesh for reused, unclipped images (esp. repeated images in a listview) The text approach queries just defers the normal font rendering until the last drawText in the sequence that can share the same shader. Patches are sorted and merged, but don't yet have a multiDraw implementation. For now, the pretending-to-merge gives better sorting behavior by keeping similar patches together. Change-Id: Ic300cdab0a53814cf7b09c58bf54b1bf0f58ccd6
* Update view's alpha and layer docsChris Craik2013-04-011-2/+7
| | | | | | | | | | | | bug:8501661 Makes the performance issues and interaction with layer type/paint more clear. Additionally, corrects change from 47ab7d6612e2b5b8b66fb261dafef7c91264e173 to still allow displayList alpha to override layer paint Change-Id: Ic94d75865700820489370461cd8ac9f9077a8d90
* Isolate tiling clip state from snapshotChris Craik2013-03-211-3/+3
| | | | | | | | | | 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
* Update snapshot upon saveLayer deferralChris Craik2013-03-201-1/+1
| | | | | | | | | | | | bug:8409891 In order to defer fbo-targetting saveLayer operations, it's necessary to update the snapshot at defer time so that deferred display state (namely, clip and transform) are fbo relative. Re-enables deferring, as the issues with saveLayer are fixed. Change-Id: I74b0779bc732675c747208f0757c3ea85f6dfbed
* Merge "Use snapshot alpha for layers" into jb-mr2-devChris Craik2013-03-201-16/+13
|\