summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/DisplayHardware
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Set the outbuf acquire fence after we actually have it.Jesse Hall2013-10-011-1/+9
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | In GLES-only mode, we don't have the outbuf acquire fence until after GLES composition is done for the frame. We were setting the fence in HWC's state immediately after dequeueing the buffer from the consumer, before GLES had started. This fence got passed through HWC and on to the consumer, so the consumer was reading the buffer before GLES was done writing to it. Now we update HWC's state just before set(), when we know we have the right fence. Bug: 11000763 Change-Id: Iea9db4c69634c352dc2d600f0bdb6bef2a432636
* | am 338acd68: am 86206b41: Merge "fix initialization of framebuffer target ↵Mathias Agopian2013-09-261-1/+8
|\ \ | |/ | | | | | | | | | | crop rect on hwc 1.3" into klp-dev * commit '338acd6869532f2684cbd1e4f273eaffc6d4ef6d': fix initialization of framebuffer target crop rect on hwc 1.3
| * Merge "fix initialization of framebuffer target crop rect on hwc 1.3" into ↵Mathias Agopian2013-09-261-1/+8
| |\ | | | | | | | | | klp-dev
| | * fix initialization of framebuffer target crop rect on hwc 1.3Mathias Agopian2013-09-251-1/+8
| | | | | | | | | | | | | | | Bug: 10936771 Change-Id: If283e5e231ca34b93e0b1784bb4e8e4c7bfd75de
* | | am 0ff4b283: am 6da15f46: fix crashers with wifi/virtual displaysMathias Agopian2013-09-261-0/+11
|\ \ \ | |/ / | | | | | | | | | * commit '0ff4b28396d77a0ed2f191836895a891108a8b5b': fix crashers with wifi/virtual displays
| * | fix crashers with wifi/virtual displaysMathias Agopian2013-09-251-0/+11
| |/ | | | | | | | | Bug: 10647742 Change-Id: I4b8ed9da52ef95af3a3b3a04b98514a3776a674d
* | Merge "Remove unnecessary include."Christopher Ferris2013-09-191-1/+0
|\ \ | |/ |/|
| * Remove unnecessary include.Christopher Ferris2013-09-191-1/+0
| | | | | | | | | | | | | | All these files are including utils/CallStack.h, but none of the code uses any CallStack objects. Change-Id: I38c3a346a3bd0ddbff368d0f7f8b3f3d78fc0432
* | Make sure do disconnect from a BQ when its client dies.Mathias Agopian2013-09-162-3/+5
|/ | | | | | Bug: 5679534 Change-Id: If447e8673df83fe0b1d6210641e0a48522501a53
* Force async behavior for the virtual display output BufferQueueJesse Hall2013-08-292-6/+13
| | | | | Bug: 10551087 Change-Id: I40bbb2b87d64420939a0ea309254f281437dab56
* handle several vsync signal correctlyMathias Agopian2013-08-212-8/+18
| | | | Change-Id: I34935d2197ce8e914fef2f110896e47b44225ad2
* Provide HWC prepare with a valid output bufferJesse Hall2013-08-205-38/+91
| | | | | | | | | | | | | | We weren't dequeing and setting the output buffer until just before set(). This didn't allow HWC to make decisions in prepare() based on the output buffer format, dimensions, etc. Now we dequeue the output buffer at the beginning of the composition loop and provide it to HWC in prepare. In GLES-only rendering, we may have to cancel the buffer and acquire a new one if GLES requests a buffer with properties different than the one we already dequeued. Bug: 10365313 Change-Id: I96b4b0a851920e4334ef05080d58097d46467ab8
* Fix HWComposer dumping of float source cropsJesse Hall2013-08-201-10/+20
| | | | Change-Id: I45a9344b5fab17ccb54bebd01382d738a03860e6
* Merge "Re-enable frame dropping for non-auto timestamps" into klp-devAndy McFadden2013-08-191-3/+4
|\
| * Re-enable frame dropping for non-auto timestampsAndy McFadden2013-08-161-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds an entire field to note whether the timestamp was auto-generated by Surface or supplied by the application. The value is used when deciding whether or not to drop frames based on buffer presentation timestamps. If a desired presentation time was set explicitly, BufferQueue will use that value to decide if a frame should be dropped. If the timestamp was generated by Surface at the time the buffer was queued, the timestamp is ignored. Bug 10151804 Change-Id: Ibd571a7578351063b813cbdad2ddbeed70655ba5
* | Use new HWC display type/count constants.Jesse Hall2013-08-162-23/+19
|/ | | | Change-Id: I774d0c68906ac6dc69268f708c30a6b0868b8816
* All consumers now take an IGraphicBufferConsumer instead of a BufferQueueMathias Agopian2013-08-065-37/+21
| | | | | | | | | | this means they only have access to the consumer end of the interface. we had a lot of code that assumed consumers where holding a BufferQueue (i.e.: both ends), so most of this change is untangling in fix that Bug: 9265647 Change-Id: Ic2e2596ee14c7535f51bf26d9a897a0fc036d22c
* single buffer mode for BufferQueueMathias Agopian2013-07-261-1/+1
| | | | | Bug: 9891035 Change-Id: Id1ab5f911a6dc4c1d8235e65775b3d3635231ad4
* Make ANW.setSwapInterval(0) work againMathias Agopian2013-07-192-9/+10
| | | | | | | | | | | we can now queue/dequeue a buffer in asynchrnous mode by using the async parameter to these calls. async mode is only specified with those calls (it is not modal anymore). as a consequence it can only be specified when the buffer count is not overidden, as error is returned otherwise. Change-Id: Ic63f4f96f671cb9d65c4cecbcc192615e09a8b6b
* BufferQueue improvements and APIs changesMathias Agopian2013-07-183-11/+6
| | | | | | | | | | | | | | | | | | | | this is the first step of a series of improvements to BufferQueue. A few things happen in this change: - setSynchronousMode() goes away as well as the SynchronousModeAllowed flag - BufferQueue now defaults to (what used to be) synchronous mode - a new "controlled by app" flag is passed when creating consumers and producers those flags are used to put the BufferQueue in a mode where it will never block if both flags are set. This is achieved by: - returning an error from dequeueBuffer() if it would block - making sure a buffer is always available by replacing the previous buffer with the new one in queueBuffer() (note: this is similar to what asynchrnous mode used to be) Note: in this change EGL's swap-interval 0 is broken; this will be fixed in another change. Change-Id: I691f9507d6e2e158287e3039f2a79a4d4434211d
* Fix build -- update for function signature changeJesse Hall2013-07-161-1/+1
| | | | Change-Id: I9c2448d5853c69ec7e962847fdaba9a99906cc42
* Merge "Rewrite VirtualDisplaySurface"Jesse Hall2013-07-166-21/+565
|\
| * Rewrite VirtualDisplaySurfaceJesse Hall2013-07-156-21/+565
| | | | | | | | | | | | | | | | | | | | | | | | The previous implementation assumed that the HWC could read and write the same buffer on frames that involved both GLES and HWC composition. It turns out some hardware can't do this. The new implementation maintains a scratch buffer pool to use on these mixed frames, but on GLES-only or HWC-only frames still does composition directly into the output buffer. Bug: 8384764 Change-Id: I7a3addb34fad9bfcbdabbb8b635083e10223df69
* | Merge "Pay attention to buffer timestamps"Andy McFadden2013-07-111-1/+1
|\ \
| * | Pay attention to buffer timestampsAndy McFadden2013-07-101-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | When acquiring a buffer, SurfaceFlinger now computes the expected presentation time and passes it to the BufferQueue acquireBuffer() method. If it's not yet time to display the buffer, acquireBuffer() returns PRESENT_LATER instead of a buffer. The current implementation of the expected-present-time computation uses approximations and guesswork. Bug 7900302 Change-Id: If9345611c5983a11a811935aaf27d6388a5036f1
* | fix SF buffer croppingMathias Agopian2013-07-103-4/+63
|/ | | | | | | | | | | | | | When a buffer had a crop (meaning its content is scaled to the window size) and a window crop was defined, the resulting crop couldn't be expressed properly because h/w composer's API was limited to integers, since this is fixed in h/w composer 1.3, we take adventage of this to make sure we get the correct crop. this bug could result in the buffer being scaled by an incorrect ratio and be slightly offset; moreover, it would produce different results from the GL code path, which is always correct. Change-Id: I8e20e00b6e26177d14f4ab4d2cd581e26c818892
* BufferQueue: track buffer-queue by instance vs. by referenceLajos Molnar2013-05-231-3/+4
| | | | | | | | | | | | | | | | | | | Instead of representing the buffer-queue as a vector of buffer indices, represent them as a vector of BufferItems (copies). This allows modifying the buffer slots independent of the queued buffers. As part of this change, BufferSlot properties that are only been relevant in the buffer-queue have been removed. Also, invalid scalingMode in queueBuffer now returns an error. ConsumerBase has also changed to allow reuse of the same buffer slots by different buffers. Change-Id: If2a698fa142b67c69ad41b8eaca6e127eb3ef75b Signed-off-by: Lajos Molnar <lajos@google.com> Related-to-bug: 7093648
* am e6eef6c1: am ea74d3b7: make the warning timout of Fence::waitForever() ↵Mathias Agopian2013-05-171-1/+1
|\ | | | | | | | | | | | | implicit and longer * commit 'e6eef6c136b007f3a7e1e19884875b855c0c5f95': make the warning timout of Fence::waitForever() implicit and longer
| * make the warning timout of Fence::waitForever() implicit and longerMathias Agopian2013-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | - timeout is now 3 seconds instead of 1 - simplifies the API a bit - allows us to change/tweak this timeout globaly Bug: 8988871 Change-Id: I8d3c6ec43a372f602fb3f29856710339f86c0ec9
* | am dda42952: am 64f3b2fd: Merge "Remove experimental HWC virtual display ↵Jesse Hall2013-05-085-489/+17
|\ \ | |/ | | | | | | | | | | support" into jb-mr2-dev * commit 'dda4295221f831560ca9d554cd9b7be1c672d0b6': Remove experimental HWC virtual display support
| * Remove experimental HWC virtual display supportJesse Hall2013-05-075-489/+17
| | | | | | | | | | Bug: 8384764 Change-Id: I97b52ed83ad85466bd91cb9291308994048568a1
* | clean-up/simplify all dump() APIsMathias Agopian2013-04-224-10/+7
|/ | | | | | | remove the scratch buffer parameter and use String8::appendFormat() instead. Change-Id: Ib96c91617c8e7292de87433d15cf6232b7d591b0
* Merge "Tell HWComposer the dimensions of virtual displays" into jb-mr2-devJesse Hall2013-04-062-13/+26
|\
| * Tell HWComposer the dimensions of virtual displaysJesse Hall2013-04-052-13/+26
| | | | | | | | | | | | | | | | | | | | HWComposer queries the HWC for dimensions of physical displays, but can't do that for virtual displays. The dimensions are used to set the display frame of the framebuffer target layer passed to HWC, and implicitly the dimensions of the virtual display. Bug: 8316155 Change-Id: I9cbd2530d2fa878f86128a1472def520b5d694a5
* | Merge "Actually set the virtual display output buffer." into jb-mr2-devJesse Hall2013-04-061-1/+5
|\ \ | |/ |/|
| * Actually set the virtual display output buffer.Jesse Hall2013-04-041-1/+5
| | | | | | | | | | Bug: 8316155 Change-Id: Ida1ac47e5a932fdaad3ec862e121cfe55d255699
* | Merge "Clean up HWC state when releasing a DisplayDevice" into jb-mr2-devJesse Hall2013-04-041-6/+6
|\ \ | |/ |/|
| * Clean up HWC state when releasing a DisplayDeviceJesse Hall2013-03-271-6/+6
| | | | | | | | | | | | | | | | | | | | DisplayDevices can be released when DisplayManager removes them from the display list, or (for virtual displays) when the surface is set to NULL. We were only cleaning up HWC resources associated with the display in the first case. Bug: 8384764 Change-Id: Id3d226dd7178fbe6d0a2ac4e2660b864ee073de3
* | Fix include pathsMathias Agopian2013-04-012-5/+6
|/ | | | Change-Id: If5350a3de995cc0cb1afea067e7ce168bc00d3f5
* Fix virtual displays for HWC<=1.1Jesse Hall2013-03-222-13/+35
| | | | | | | | | | | | | | If we're using a HWC that doesn't support virtual displays, or we have more virtual displays than HWC supports concurrently, the VirtualDisplaySurface should simply be a passthrough from source (GLES) to sink. This change also tries to distinguish between display types and HWC display IDs a little better, though there's more to do here. Probably needs a higher-level rethink; it's too error-prone now. Bug: 8446838 Change-Id: I708d2cf262ec30177042304f174ca5b8da701df1
* Isolate knowledge that fb target == output bufferJesse Hall2013-03-227-24/+64
| | | | | | | | | | | | | | | | HWComposer didn't allow the virtual display output buffer to be set directly, instead it always used the framebuffer target buffer. DisplayDevice was only providing the framebuffer release fence to DisplaySurfaces after a commit. This change fixes both of these, so both HWComposer and DisplayDevice should continue to work if VirtualDisplaySurface changes to use separate framebuffer and output buffers. It's also more correct since VirtualDisplaySurface uses the correct release fence when queueing the buffer to the sink. Bug: 8384764 Change-Id: I95c71e8d4f67705e23f122259ec8dd5dbce70dcf
* Use descriptive aliases instead of HWC_NUM_DISPLAY_TYPESJesse Hall2013-03-221-8/+11
| | | | | Bug: 8384764 Change-Id: Ia2563fab19dbc6e4a95bed03445e609334841cca
* Pass sp<Fence>s around instead of file descriptorsJesse Hall2013-03-227-20/+17
| | | | Change-Id: Iac70584a2207940730e8f803a543e4e9a4000c47
* Merge "Release virtual display buffer immediately after HWC set" into jb-mr2-devJesse Hall2013-03-227-64/+36
|\
| * Release virtual display buffer immediately after HWC setJesse Hall2013-03-207-64/+36
| | | | | | | | | | | | | | | | | | | | Previously we only queued a virtual display buffer to the sink when the next frame was about to be displayed. This may delay the "last" frame of an animation indefinitely. Now we queue the buffer as soon as HWC set() returns and gives us the release fence. Bug: 8384764 Change-Id: I3844a188e0f6ef6ff28f3e11477cfa063a924b1a
* | initialize planeAlpha (to 0xFF) for the FB_TARGETMathias Agopian2013-03-211-0/+1
| | | | | | | | | | Bug: 8422625 Change-Id: I7b72456c2e01ed92e675cc1bfa0cfd0d2ce5064e
* | Don't log an error on HWC1.1+ devices with no FB HALJesse Hall2013-03-192-11/+9
|/ | | | Change-Id: I015e5a1a1f926181e51f82525f69beff71bd70cd
* Add BufferQueueInterposer and use it for virtual displaysJesse Hall2013-03-186-10/+482
| | | | | | | | | | | BufferQueueInterposer allows a client to tap into a IGraphicBufferProducer-based buffer queue, and modify buffers as they pass from producer to consumer. VirtualDisplaySurface uses this to layer HWC composition on top of GLES composition before passing the buffer to the virtual display consumer. Bug: 8384764 Change-Id: I61ae54f3d90de6a35f4f02bb5e64e7cc88e1cb83
* Add DisplaySurface abstractionJesse Hall2013-03-186-16/+227
| | | | | | | | | | | | | DisplayDevice now has a DisplaySurface instead of using FramebufferSurface directly. FramebufferSurface implements DisplaySurface, and so does the new VirtualDisplaySurface class. DisplayDevice now always has a surface, not just for virtual displays. In this change VirtualDisplaySurface is just a stub; buffers still go directly from GLES to the final consumer. Bug: 8384764 Change-Id: I57cb668edbc6c37bfebda90b9222d435bf589f37
* Minor cleanups/fixes before virtual display refactoringJesse Hall2013-03-183-10/+16
| | | | | | | | | | | | | | | | | | | | | | | None of these should change behavior, except for removing some incorrect log messages when using a virtual display. - HWComposer::getAndResetReleaseFenceFd() checks the HWC version, so no need to do that in the DisplayDevice::onSwapBuffersCompleted(). However, it should check that mFramebufferSurface is not NULL like it is for virtual displays. - Comment that FramebufferSurface::dump() overrides the non-virtual ConsumerBase::dump(), and fix it so the right thing happens regardless of the static type of the pointer/reference the callee has. FramebufferSurface::dump() could be removed right now, but I'd need to bring it back in a later change. - Use the right enum for validating display type ids. - Don't try to send hotplug events for virtual displays. - Mark virtual displays as connected so HWComposer::prepare() doesn't think something is wrong when it gets a non-NULL layer list. - Remove unused FramebufferSurface methods. Bug: 8384764 Change-Id: Id28a2f9be86b45f4bb7915fdf7752157035f4294