summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/CanvasContext.cpp
AgeCommit message (Collapse)Author
2016-03-21Revert "Move text logic from jni to hwui level"Sergei Vasilinetc
This reverts commit a7f6bba1a3565c19715e878dfe7f0e01022944ff. Change-Id: If4f36f87a85411b6128fd92d391313803ccaf9dd
2016-03-21Merge "Move text logic from jni to hwui level" into nyc-devSergei Vasilinetc
2016-03-17Move updating window position off RTJohn Reck
Bug: 27385141 Change-Id: I6c75b5f1d9ef55ef64dde050f71d0e28fb8714bf
2016-03-17Move text logic from jni to hwui levelsergeyv
bug:25865834 Change-Id: I2d8c9c9544afcb5ce1784f732aed3e54e0eda372
2016-03-04Support GPU profiling vis in new pipelineChris Craik
bug:27353099 Change-Id: I905c1a998d9a9e2097c047dab9de87a70d7a370e
2016-02-26Always swap buffers if using partial update extensionJohn Reck
Bug: 27379093 Change-Id: Ifda18287248e4ae07d4bf2ae9642a9d23039e81f
2016-02-09updates to FrameStatsObserver APIAndres Morales
- Rename to FrameMetrics to avoid collision with existing android.view.FrameStats class - Make FrameMetricsObserver implementation detail, exposing FrameMetricsListener interface as public API and wrapping in FrameStatsObserver to maintain state - Remove dropped frame count call, in favor of passing as parameter to callback method. - Move away from raw timestamp access in favor of Metric IDs which represent higher-level, more stable stages in a frame lifecycle and match the categories exposed in the onscreen bars. - Support many-to-many Window<->FrameMetricsListener relationship Change-Id: I00e741d664d4c868b1b6d0131a23f8316bd8c5c2
2016-02-04Merge "Have RT drive window positioning"John Reck
2016-02-04Have RT drive window positioningJohn Reck
Bug: 22802885 Change-Id: I6beed5474d3a943b16e9097f7bd61ce3cbd37505
2016-02-02Early kickoff of shadow tasksChris Craik
bug:26562703 Change-Id: I7cdf18f2c662380bd31c7ffeefd5c3f569e5c1c6
2016-01-26Restore code to draw backdrop and content nodesChong Zhang
bug: 26626661 Change-Id: I9e4dd41708e8ed93d3cf64242ad81815a653d269
2016-01-26Merge "Add internal Canvas save flags"Florin Malita
2016-01-26Merge "Add fine-grained debug layer"John Reck
2016-01-25Add fine-grained debug layerJohn Reck
Full GLES error checking layer via -include trickery. Change DEBUG_OPENGL to a level system. HIGH = every GL call is error checked MODERATE = checkpointing at interesting spots LOW = only asserts there are no errors at the end of a frame or when the FBO changes NONE = AIN'T GOT NO TIME FOR ERRORS GOTTA GO FAST! Change-Id: Ibe81aae93d942059c4ddf1cbb11c828b7ce4c10b
2016-01-25Add internal Canvas save flagsFlorin Malita
Skia's SkCanvas::SaveFlags are being deprecated. This CL introduces the equivalent android::SaveFlags, converts all internal clients to the new enum, and switches the saveLayer glue to the SaveLayerRec-based API. Change-Id: Icb1785f4e7c0f652b1f04b34a1e3ccb063c408f3
2016-01-22expose hwui frame stats through FrameStatsObserverAndres Morales
Change-Id: I88884bafc8e2f6d7f67a36d3609490e83cf8afd5
2016-01-19Fix ordering of texture->upload argumentsJohn Reck
Caught by scatter-shotting GL_CHECKPOINTS which seem generally useful to have Bug: 26609444 Change-Id: Ie31d9297d8dae56405126720f338b4256c8bae77
2016-01-14Merge "Track texture memory globally"John Reck
2016-01-14Track texture memory globallyJohn Reck
Also mostly consolidates texture creation Change-Id: Ifea01303afda531dcec99b8fe2a0f64cf2f24420
2016-01-13Merge "In CanvasContext::doFrame, make a separate call to ↵Matthew Bouyack
computeFrameTimeNanos and save the result. Then pass that value to UiFrameInfoBuilder::setVsync as both arguments." into cw-e-dev am: eebf168e43 am: e0845e8629 am: 6222bb0f6a am: 099bd9ca8f * commit '099bd9ca8fea02795424d62c05c723290d68ae14': In CanvasContext::doFrame, make a separate call to computeFrameTimeNanos and save the result. Then pass that value to UiFrameInfoBuilder::setVsync as both arguments.
2016-01-12Disable buildLayer crashChris Craik
Change-Id: Ia51e8da01d5c694fb1a084cea8dfce865c56a456
2016-01-12Merge "In CanvasContext::doFrame, make a separate call to ↵Matthew Bouyack
computeFrameTimeNanos and save the result. Then pass that value to UiFrameInfoBuilder::setVsync as both arguments." into cw-e-dev am: eebf168e43 am: e0845e8629 am: 6222bb0f6a * commit '6222bb0f6a772c8fa1dc402740399b0ad1017520': In CanvasContext::doFrame, make a separate call to computeFrameTimeNanos and save the result. Then pass that value to UiFrameInfoBuilder::setVsync as both arguments.
2016-01-12Rename Reorderers to BuildersChris Craik
Change-Id: I9bb5a2e70055e2f6d14912fbd86ab72ac0d6e20c
2016-01-12In CanvasContext::doFrame, make a separate call to computeFrameTimeNanosMatthew Bouyack
and save the result. Then pass that value to UiFrameInfoBuilder::setVsync as both arguments. The order of function argument evaluation is undefined in C++. Because the value returned from TimeLord::latestVsync may be changed by the preceding call to TimeLord::computeFrameTimeNanos the values of the arguments passed to UiFrameInfoBuilder::setVsync is also undefined. This change removes any ambiguity. Change-Id: Ie71ee453f9ccc725edfe5f7cc9b277f2a809dfdc
2016-01-11Rename OpReorderer to FrameReordererChris Craik
Also separate LayerReorderer into its own files. Change-Id: Iafb6a156f760f62f831f6288fd0dadf1db25da24
2015-12-16Merge "Add TextureView support to new renderer/reorderer"Chris Craik
2015-12-16Add TextureView support to new renderer/reordererChris Craik
bug:22480459 Change-Id: I2e4c0bc6b904706132f3f5087ededc9cac9b40fb
2015-12-16resolve merge conflicts of 04ce46db64 to master.John Reck
Change-Id: I935bb47718f0e7d5fb48945dd8de6e28dac136e5
2015-12-16Allow RT animation of new rendererChris Craik
Change-Id: I60136dc080dc4fd853ac8c3d37fefa85da1181df
2015-12-10libhwui: make setSurface asynchronousThomas Buhot
On the critical path of the cold launch of applications the main thread of the started application tells the RenderThread to create a surface. This process is synchronous and blocks the main thread of the application until the creation of the EGLContext is complete. As a consequence the launch time of the application is delayed by time spent allocating the EGL Context in the RenderThread. With this optimization the launch time of any application is improved (for example settings by 20 to 40 ms). Change-Id: Ibf47aaa0abb8dedf7aa00693073db3785d9d6b08 Signed-off-by: Thomas Buhot <thomas.buhot@intel.com> Signed-off-by: Zhiquan Liu <zhiquan.liu@intel.com>
2015-11-24INT_MAX nanoseconds is not very longJohn Reck
Bug: 25843358 If the time between last swap & current vsync grew larger than 2 seconds it would overflow when placed into an int, causing frames to be dropped as negative numbers are definitely less than 2_ms. Change-Id: Icd2136989e5bbf5a0e21611b95a4d515b5ff9b14
2015-11-16Finish shadow support in new reorderer/rendererChris Craik
Now passes alphas and light radius, and correctly transforms light center for layers. Also fixes begin-frame/layer clears to be damage rect aware. Change-Id: I3b1415cd7bf1518c510145ebebdb745f494a2542
2015-11-12Recycle OffscreenBuffersChris Craik
Change-Id: Ia2e219026f211a5308ecf8209c5f986bb888aadd
2015-11-05Fix buildColin Cross
std::abs requires <cstdlib> Change-Id: I0722340d17aed88c4c8dabcb723d432b05cebedb
2015-11-02Merge "Initial HW layer support in new reorderer/renderer"Chris Craik
2015-11-02Initial HW layer support in new reorderer/rendererChris Craik
Shares vast majority of clipped savelayer code, with only minor differences in lifecycle. Doesn't yet handle fill region, resize, or window transform. Change-Id: Iabdd71811590d2b937eb11e1b01ce556ade54a5a
2015-10-30Merge "Add window setDecorView API."Rob Carr
2015-10-29Merge "Simplify TreeInfo"Chris Craik
2015-10-29Add window setDecorView API.Robert Carr
Add a Window API for setting a view which will be placed in the decoration area (next to the window control buttons). Change-Id: Ie106cbea653ff95fdba987a2a43506d394600612
2015-10-28Simplify TreeInfoChris Craik
Change-Id: I8f05e9046236d607016b6c2bb77a333cfb47ba47
2015-10-28Merge "Tune scheduling a bit, avoid a binder ipc"John Reck
2015-10-28Tune scheduling a bit, avoid a binder ipcJohn Reck
Don't query running behind if it's not possible to be behind such as having received a vsync since the last call to swap buffers. This also avoids an accidental-starvation issue where if surface flinger was a bit sluggish to dequeue then renderthread would drop thinking the queue was full. Also be a bit smarter about tracking if we've already drawn for this vsync target to avoid producing two frames for the same vsync Change-Id: Ib266500a693c27000b2e8ea578f111229d75147a
2015-10-28Merge "Cleanups"John Reck
2015-10-27Rework receiver/dispatcher design slightly, and replace Layer usage.Chris Craik
Switched from 'renderer/info' to 'dispatcher/renderer' to make their interaction more natural. The new BakedOpRenderer is more similar in responsibilities to the OpenGLRenderer, as it manages layer and frame lifecycles, and performs the actual rendering. However, it's still simpler because the BakedOpDispatcher handles mapping Canvas drawing ops to Glops, and the OpReorderer handles almost all canvas state operations. Also switch BakedOpRenderer to use the new OffscreenBuffer, which serves as a lightweight Layer replacement, with a much simpler lifecycle. Change-Id: Ie0e2e248503400041d49729d813d485d28c76eb3
2015-10-27CleanupsJohn Reck
Change-Id: I10001711afb2530c5dc19aebf2d055ae41f58c6a
2015-10-26Initial version of clipped saveLayer in new pipelineChris Craik
Additionally disables usage of FBO cache, so FBO destruction safely interacts with renderstate caching. Change-Id: I25c277cb7afec2ca33bf226445d6c8867a15a915
2015-10-21Work to support saveLayer in new pipelineChris Craik
clipped SaveLayers will now be pulled to the beginning of the frame, prior to drawing FBO 0. This will remove the need for switching FBOs mid-frame. Change-Id: I4d8dc1f845e84e9b49d5acdf4f4703eef4a9cb06
2015-10-15Add partial damage support to new draw pathChris Craik
Change-Id: I612578fd181240de71297c9a28bc9a8f350764a7
2015-10-14Initial commit of new Canvas operation recording / replayChris Craik
Done: - drawRect, drawBitmap, drawColor, drawPaint, drawRenderNode, drawRegion - Recording with new DisplayList format - batching & reordering - Stateless op reorder - Stateless op rendering - Frame lifecycle (clear, geterror, cleanup) Not done: - SaveLayer (clipped and unclipped) - HW layers - Complex clipping - Ripple projection - Z reordering - Z shadows - onDefer prefetching (text + task kickoff) - round rect clip - linear allocation for std collections - AssetAtlas support Change-Id: Iaf98c1a3aeab5fa47cc8f9c6d964420abc0e7691
2015-10-05Remove confusing behavior of Rect::intersect() and renameChris Craik
bug:24670525 Removes silly 'do nothing if rects do not intersect' behavior, and changes the name to clarify the difference (contrasting against SkRect::intersect()) bug:24670525 Change-Id: Id2ca1cfea1a9d720d4dc70b251f426d9916f8b53