summaryrefslogtreecommitdiffstats
path: root/libs/hwui/Layer.h
Commit message (Collapse)AuthorAgeFilesLines
* Constructor cleanupChris Craik2015-03-021-19/+19
| | | | Change-Id: Ic39911d08f44c3174de91fb92fcd4cab73fe4654
* Glop layer mesh renderingChris Craik2015-02-191-1/+5
| | | | Change-Id: I2d902819d5d77f496b67d4d25a298782903e410d
* resolved conflicts for merge of fe5ac4fc to masterJohn Reck2015-01-291-0/+6
|\ | | | | | | Change-Id: I6c0cc82db14b56297586469f940e408c0e218b3b
| * am 5f3e21ce: am 6efc3ac6: Merge "Allow ~Layer() to happen after ↵John Reck2015-01-291-0/+6
| |\ | | | | | | | | | | | | | | | | | | onGLContextDestroyed" into lmp-mr1-dev * commit '5f3e21cebeecf042e8e18a5021b3965415d9ff60': Allow ~Layer() to happen after onGLContextDestroyed
| | * Allow ~Layer() to happen after onGLContextDestroyedJohn Reck2015-01-291-0/+6
| | | | | | | | | | | | | | | Bug: 19146354 Change-Id: I9e885936168bd541bfbed4064ad67ab524f58e32
* | | Cleanup various clang warnings, use unique_ptrs in several placesChris Craik2014-12-231-3/+4
| | | | | | | | | | | | Change-Id: I347904b25e51fcc7de14b1e72f1acd0f6ba26f3f
* | | partially fix build.Nick Kralevich2014-11-011-0/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Addresses the following compile time errors: In file included from frameworks/base/libs/hwui/LayerRenderer.cpp:24:0: frameworks/base/libs/hwui/RenderState.h:77:24: error: 'VirtualLightRefBase' has not been declared void postDecStrong(VirtualLightRefBase* object); ^ In file included from frameworks/base/libs/hwui/LayerCache.h:21:0, from frameworks/base/libs/hwui/LayerRenderer.cpp:25: frameworks/base/libs/hwui/Layer.h:55:42: error: expected class-name before '{' token class Layer : public VirtualLightRefBase { ^ In file included from frameworks/base/libs/hwui/RenderState.cpp:16:0: frameworks/base/libs/hwui/RenderState.h:77:24: error: 'VirtualLightRefBase' has not been declared void postDecStrong(VirtualLightRefBase* object); ^ Change-Id: I2be439b373ea356b861f413ff6ce323e8d9baf2d
* | am a8d83d63: Merge "Layer changes" into lmp-mr1-devJohn Reck2014-10-311-1/+7
|\ \ | |/ | | | | | | | | | | automerge: a51fba0 * commit 'a51fba0bf037844bcb911e69e8af733e6d2cccf6': Layer changes
| * Layer changesJohn Reck2014-10-311-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | Bug: 17208461 * Switch Layer to be VirtualLightRefBase instead of Caches' side-channel ref-counting * Include active layers in gfxinfo dump * Run gfxinfo dump on the correct thread * Dump gfxinfo on Layer creation failure Change-Id: I28d195699e2334518e215ab28c7a17355aee9678
* | resolved conflicts for merge of 3028394c to stage-aosp-masterNarayan Kamath2014-10-291-1/+1
|\ \ | |/ |/| | | Change-Id: I980e4c95cdc6a4778cef3298338692656d23e7c6
| * Suppress Clang compilation warnings.Chih-Hung Hsieh2014-10-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Ignore warnings about unused parameters and initialization of static constant float data members. Change one potential error of allocating variable length array of non-POD element type on stack. Fix mismatch of class and struct declaration tags. BUG: 17512760 Change-Id: I3a09c945fb1c17f27aff74a7e439dd4c35d1fb32
* | Additional layer loggingChris Craik2014-09-101-0/+11
| | | | | | | | | | | | | | | | bug:17208461 Track layer's last known state. Change-Id: Ic1799191f5839a1d6cc56f598f2ac2671dc27a6f
* | Don't track TextureLayer lifecycles in RenderStateChris Craik2014-09-081-9/+9
| | | | | | | | | | | | | | | | | | | | bug:17208461 They are destroyed via finalizer-enqueued destroy method, so it's not valid to check that they've been destroyed at gl context destruction time. Change-Id: I670f69825547facd5f31d44acb406418881fee00
* | Yet more layer tracking loggingJohn Reck2014-09-041-0/+1
| | | | | | | | | | | | Bug: 17208461 Change-Id: I55e7d0921eb565867e966d68b798b7b92c391b55
* | Define shadow casting behavior within layersChris Craik2014-08-151-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | No-fail invokeFunctorJohn Reck2014-06-231-1/+4
| | | | | | | | | | | | | | Bug: 15513308 Bug: 15449247 Change-Id: I13a29f9c8d4975cdda6dcb33b6332c2555ff0f7c
* | Update 'DisplayList' vs 'RenderNode' naming in several placesChris Craik2014-06-231-3/+2
| | | | | | | | Change-Id: I635c6627d098b661fb9b0ba1bd42fa6d7277d287
* | Clip TouchFeedbackDrawable effect to receiver OutlineChris Craik2014-04-231-0/+15
| | | | | | | | | | | | | | | | Projected RenderNodes are now wrapped with a ClipRect or masked SaveLayer, so that they are clipped to the outline of the projection receiver surface. Change-Id: I1d4afc1bb5d638d650bc0b1dac51a498f216773e
* | Refcount RenderNodeJohn Reck2014-04-071-8/+3
| | | | | | | | Change-Id: I7a86db8acc2b78ef33d987a43a119f5933d7d752
* | Async drawing!John Reck2014-03-271-2/+4
| | | | | | | | Change-Id: I7e728356f58af88174328a8c0b90d27b128bfe01
* | Rename DisplayList->RenderNodeJohn Reck2014-03-121-3/+3
| | | | | | | | Change-Id: Id42e23c9a1a6eb6eaeafef707ced7fa6887b03d0
* | Fix TextureView texture filtering.Chris Craik2014-02-251-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | bug:11748993 TextureView should always be drawn with linear filtering if drawing a buffer sized differently from the layer. This fixes a bug where TextureViews that were sized differently from their contents wouldn't be drawn with texture filtering, causing visible scaling artifacts. Change-Id: I8a5d27452fe7269ec53896992f37cff51e3ce15a
* | Reapply "Refactor setting an SkPaint onto a hwui Layer."Derek Sollenberger2014-02-201-1/+1
| | | | | | | | | | | | This reverts commit 90d0c75e94a32fb7d993fae69762820aabc2fcbb. Change-Id: Ie807761231edf7c848b019931dccbf466208c0be
* | Revert "Refactor setting an SkPaint onto a hwui Layer."Derek Sollenberger2014-02-121-1/+1
| | | | | | | | | | | | This reverts commit e889298cd6ae1fc0d76bc00d7d12586db03eb261. Change-Id: I4b1d609b2d4280595d40cb10d6c18875c22999f8
* | Refactor setting an SkPaint onto a hwui Layer.Derek Sollenberger2014-02-121-1/+1
| | | | | | | | | | | | | | This CL removes the unecessary JNI call to set the colorFilter on a layer. Change-Id: I9e088f888938d4315745aa618334bfdb9e61343a
* | Removing SkiaColorFilter and inspecting the native object directly.Derek Sollenberger2014-02-071-4/+5
| | | | | | | | | | bug: 10650594 Change-Id: I4fcf66d008765afa0e35d011f58bc792183cb74f
* | Fix Clang warnings/errorsChris Craik2014-01-021-1/+2
|/ | | | | | | Fix several build warnings (struct != class, int != size_t) and errors (variable leng non-POD arrays). Change-Id: I70b4e784365514303d8954bfcb1f39d7c22c1321
* Use global indices array to draw layersRomain Guy2013-07-221-1/+0
| | | | | | | | | | | | An array of indices local to a layer would only be necessary if we changed the way we resolve T-junctions. Since we only ever draw quads, let's just use the indices we use everywhere else. This change also uses the global indices array to render list of colored rectangles to save on the number of vertices generated CPU-side. Change-Id: Ia6d1970b0e9247805af5a114ca2a84b5d0b7c282
* Cancel layer update when a layer is about to be destroyedRomain Guy2013-06-171-0/+1
| | | | | | Bug #9310706 Change-Id: I73eea6314c326f15a979617e3a05b525935f0d3f
* Introduce Caches::bindTexture() to reduce glBindTexture callsRomain Guy2013-06-041-37/+9
| | | | Change-Id: Ic345422567c020c0a9035ff51dcf2ae2a1fc59f4
* Make layer double drawing visible in overdraw debug modeChris Craik2013-04-161-0/+1
| | | | | | | | | | | | | | | | | | 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
* First OpenGL ES 3.0 based optimizationRomain Guy2013-04-041-3/+4
| | | | | | | | | | | | | | | This change uses a new OpenGL ES 3.0 feature to upload less data when the font cache needs to be update. This can result in significant performance improvements on device with large textures or with locales that use a lot of glyphs (CJK for instance.) This change also fixes various unpack alignment issues. The unpack alignment, as well as the unpack row length, is not texture specific but a global state that affect all glTex/SubImage2D calls. Some of them were missing the appropriate glPixelStorei() call. This could result in corrupted textures. Change-Id: Iefb429d4d0d0b4e0faeadf27daafee6d30a21d85
* Prevent crash when a single layer is enqueued several times for updatesRomain Guy2013-03-291-0/+1
| | | | | | Bug #8504687 Change-Id: I9b01bbc4e3f37af23dfe5e68d3d03ad3d238b94a
* Avoid multiple font cache texture uploadsRomain Guy2013-03-261-0/+11
| | | | | | | | | | Bug #8378964 This change defers drawing into layers until after the renderer for FBO0 is ready to draw. At that point, all the precaching is done which means all glyphs can be uploaded at once in the font caches. Change-Id: Ie1f7a7ff30f76f06fb3dbc72c7d05e66207d1ecb
* Merge "Add a RenderBuffer object to store stencil buffers. Bug #7146141"Romain Guy2013-02-071-28/+28
|\
| * Add a RenderBuffer object to store stencil buffers.Romain Guy2013-02-071-28/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | am f5f85022: Merge "Fix graphical corruption on QCOM GPU Bug #7146141"Romain Guy2013-01-291-0/+4
|\ \ | |/ | | | | | | | | # Via Android (Google) Code Review (1) and Romain Guy (1) * commit 'f5f8502271b04d63c518e3aecfd5eaf557904e72': Fix graphical corruption on QCOM GPU Bug #7146141
| * Fix graphical corruption on QCOM GPURomain Guy2013-01-291-0/+4
| | | | | | | | | | | | | | | | | | Bug #7146141 The GL_QCOM_tiled_rendering extension requires careful use of start/endTiling when attaching a renderbuffer dynamically. Change-Id: I20036683ed3909ffaf40cc3d57a25257e35b6fa2
* | am 49464796: Merge "Allow layers with a stencil buffer to be resized on the ↵Romain Guy2013-01-181-1/+30
|\ \ | |/ | | | | | | | | | | fly Bug #7146141" * commit '494647961feb21d925d5e6e5ce1d42aa8b6949db': Allow layers with a stencil buffer to be resized on the fly Bug #7146141
| * Allow layers with a stencil buffer to be resized on the flyRomain Guy2013-01-181-1/+30
| | | | | | | | | | | | | | | | | | Bug #7146141 This change moves the resizeLayer() from LayerCache (where it should never have been anyway) to Layer. This makes a little more sense. Change-Id: I8b2f9c19c558e738405a58b9e71ec5799fc6be88
* | am b12db26f: Merge "Implement clipRect with a transform, clipRegion & ↵Romain Guy2013-01-171-5/+20
|\ \ | |/ | | | | | | | | | | clipPath Bug #7146141" * commit 'b12db26fec178794915d819c3dd64f13d788c461': Implement clipRect with a transform, clipRegion & clipPath Bug #7146141
| * Implement clipRect with a transform, clipRegion & clipPathRomain Guy2013-01-171-5/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Update framework to support r5967 of Skia.Derek Sollenberger2012-12-121-0/+1
|/ | | | | bug: 6906025 Change-Id: Iefdb830ec3aa2ab3472c1c142484a7aa21788a15
* Apply dev. settings at runtimeRomain Guy2012-11-301-0/+1
| | | | | | Bug #7434649 Change-Id: I16f00eaa8a5eefd9f9849e196cf2cb1659215390
* Defer layer rendering to avoid stallsRomain Guy2012-10-181-0/+14
| | | | | | | | | | | | | | | | | | | | Bug #7326824 When a layer is taken out of the cache and initialized it gets cleared to prepare it for future rendering. This triggers the following sequence of operations: glBindFramebuffer(layer.fbo) attach texture storage to FBO glClear() glBindFramebuffer(defaultFbo) The clear forces a resolve on tilers which stalls the CPU for a little while, thus producing jank during animations. This change moves the clear to the next frame when we know we will have to execute a resolve anyway. Change-Id: Ic1939c25df20ed65a4c48dc81ee549b2cd8b6ec3
* Take into account the texture layer's transform for clippingRomain Guy2012-10-171-0/+3
| | | | | | Bug #7370212 Change-Id: Ibdc3161306f54a1cfe66e08458f05ee01a13b1df
* Assign default texture id of 0Chet Haase2012-09-261-1/+1
| | | | | | | | | | Some logic depends on a default value of 0, which was not being assigned. Issue #7195815 chrome url bar is corrupted Issue #7190656 Textures corrupted on mr1 Change-Id: I346b7b76e885bf8f04740e711fd88f917a5418c7
* Revert "Deleting objects on the wrong thread is a silly idea Bug #7195815"Dave Burke2012-09-251-0/+2
| | | | | | This reverts commit 8a1374946a928fcba7495c87ff6adda327fdfb9f Change-Id: I53564a6c531d334afcc1fce0bea1e57ae266aa78
* Deleting objects on the wrong thread is a silly ideaRomain Guy2012-09-251-2/+0
| | | | | | | | Bug #7195815 Turns out that multi-threading is hard. Change-Id: Ib0b4bd6dc3caea27f7ced22cbb363bb955fe58ab
* Don't destroy the same texture twiceRomain Guy2012-09-251-7/+19
| | | | | | | | | | | | | Bug #7221449 SurfaceTexture already deletes the GL texture when detachFromContext is invoked. The newly introduced refcount would casue the Layer object to be destroyed later and attempt to delete the GL texture again. By the time the second cleanup occurs, the texture name might have been reused by somebody else, resulting in erroneous behaviors. Change-Id: I257c589fea64b34c00f46fbfaa7732e6854a5e41