summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/vi (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Deglobalize System: ViDavid Marcec2019-09-222-3/+3
|
* NVServices: Address FeedbackFernando Sahmkow2019-07-051-3/+2
|
* nv_services: Correct buffer queue fencing and GPFifo fencingFernando Sahmkow2019-07-051-30/+16
|
* nvflinger: Implement swap intervalsFernando Sahmkow2019-07-051-2/+3
|
* Merge pull request #2489 from FearlessTobi/port-4716bunnei2019-05-251-1/+1
|\ | | | | Port citra-emu/citra#4716: "HLE/IPC: HLEContext can memorize the client thread and use it for SleepClientThread"
| * HLE/IPC: HLEContext can memorize the client thread and use it for SleepClientThreadWeiyi Wang2019-05-181-1/+1
| | | | | | | | This reduces the boilerplate that services have to write out the current thread explicitly. Using current thread instead of client thread is also semantically incorrect, and will be a problem when we implement multicore (at which time there will be multiple current threads)
* | core/kernel/object: Rename ResetType enum membersLioncash2019-05-181-1/+1
|/ | | | | | | | | | | | | Renames the members to more accurately indicate what they signify. "OneShot" and "Sticky" are kind of ambiguous identifiers for the reset types, and can be kind of misleading. Automatic and Manual communicate the kind of reset type in a clearer manner. Either the event is automatically reset, or it isn't and must be manually cleared. The "OneShot" and "Sticky" terminology is just a hold-over from Citra where the kernel had a third type of event reset type known as "Pulse". Given the Switch kernel only has two forms of event reset types, we don't need to keep the old terminology around anymore.
* Merge pull request #2334 from lioncash/overridebunnei2019-04-061-4/+0
|\ | | | | core: Add missing override specifiers where applicable
| * core: Add missing override specifiers where applicableLioncash2019-04-041-4/+0
| | | | | | | | | | | | | | | | | | Applies the override specifier where applicable. In the case of destructors that are defaulted in their definition, they can simply be removed. This also removes the unnecessary inclusions being done in audin_u and audrec_u, given their close proximity.
* | hle/service: Resolve unused variable warningsLioncash2019-04-041-1/+0
|/ | | | | | | | | In several places, we have request parsers where there's nothing to really parse, simply because the HLE function in question operates on buffers. In these cases we can just remove these instances altogether. In the other cases, we can retrieve the relevant members from the parser and at least log them out, giving them some use.
* Merge pull request #2166 from lioncash/vi-init-servicebunnei2019-03-138-40/+131
|\ | | | | service/vi: Unstub GetDisplayService
| * service/vi: Unstub GetDisplayServiceLioncash2019-02-275-11/+49
| | | | | | | | | | | | | | | | | | | | | | | | This function is also supposed to check its given policy type with the permission of the service itself. This implements the necessary machinery to unstub these functions. Policy::User seems to just be basic access (which is probably why vi:u is restricted to that policy), while the other policy seems to be for extended abilities regarding which displays can be managed and queried, so this is assumed to be for a background compositor (which I've named, appropriately, Policy::Compositor).
| * service/vi: Remove use of a module classLioncash2019-02-268-46/+99
| | | | | | | | | | | | | | | | | | This didn't really provide much benefit here, especially since the subsequent change requires that the behavior for each service's GetDisplayService differs in a minor detail. This also arguably makes the services nicer to read, since it gets rid of an indirection in the class hierarchy.
* | common/math_util: Move contents into the Common namespaceLioncash2019-02-271-1/+1
| | | | | | | | | | These types are within the common library, so they should be within the Common namespace.
* | service/vi: Update IManagerDisplayService's function tableLioncash2019-02-251-0/+1
|/ | | | Amends it to add the 7.0.0+ CreateStrayLayer function.
* service/nvflinger: Store BufferQueue instances as regular data membersLioncash2019-02-225-29/+22
| | | | | | | The NVFlinger service is already passed into services that need to guarantee its lifetime, so the BufferQueue instances will already live as long as they're needed. Making them std::shared_ptr instances in this case is unnecessary.
* service/vi/vi_layer: Convert Layer struct into a classLioncash2019-02-214-5/+38
| | | | | | | Like the previous changes made to the Display struct, this prepares the Layer struct for changes to its interface. Given Layer will be given more invariants in the future, we convert it into a class to better signify that.
* service/nvflinger: Move display specifics over to vi_displayLioncash2019-02-212-1/+120
| | | | | | | | | With the display and layer structures relocated to the vi service, we can begin giving these a proper interface before beginning to properly support the display types. This converts the display struct into a class and provides it with the necessary functions to preserve behavior within the NVFlinger class.
* service/nvflinger: Relocate definitions of Layer and Display to the vi serviceLioncash2019-02-204-0/+89
| | | | | | | | | | | | | | | | | | | | | | These are more closely related to the vi service as opposed to the intermediary nvflinger. This also places them in their relevant subfolder, as future changes to these will likely result in subclassing to represent various displays and services, as they're done within the service itself on hardware. The reasoning for prefixing the display and layer source files is to avoid potential clashing if two files with the same name are compiled (e.g. if 'display.cpp/.h' or 'layer.cpp/.h' is added to another service at any point), which MSVC will actually warn against. This prevents that case from occurring. This also presently coverts the std::array introduced within f45c25aabacc70861723a7ca1096a677bd987487 back to a std::vector to allow the forward declaration of the Display type. Forward declaring a type within a std::vector is allowed since the introduction of N4510 (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4510.html) by Zhihao Yuan.
* service/nvflinger,service/vi: Handle failure cases with exposed APILioncash2019-02-061-10/+50
| | | | | | | Converts many of the Find* functions to return a std::optional<T> as opposed to returning the raw return values directly. This allows removing a few assertions and handles error cases like the service itself does.
* service/nvflinger: Rename GetVsyncEvent() to FindVsyncEvent()Lioncash2019-02-051-1/+1
| | | | | This was missed within #2075. Renames the member function to make it consistent with the rest of the Find* functions.
* service/nvflinger: Rename Get prefix on function to FindLioncash2019-01-301-5/+5
| | | | | This more accurately describes what the function is actually attempting to do (it's not a simple trivial getter).
* service/vi: Remove stubbed notifier from SetLayerVisibilityLioncash2019-01-281-2/+3
| | | | | | | | | | This appears to be a vestigial API function that's only kept around for compatibility's sake, given the function only returns a success error code and exits. Since that's the case, we can remove the stubbed notification from the log, since doing nothing is technically the correct behavior in this case.
* Merge pull request #1989 from lioncash/setbunnei2019-01-071-39/+58
|\ | | | | service/vi: Unstub IApplicationDisplayService's SetLayerScalingMode
| * service/vi: Correct scaling mode conversionsLioncash2019-01-051-15/+13
| | | | | | | | | | | | | | | | | | These values are not equivalent, based off RE. The internal value is put into a lookup table with the following values: [3, 0, 1, 2, 4] So the values absolutely do not map 1:1 like the comment was indicating.
| * service/vi: Factor out scaling mode conversions from the IPC function itselfLioncash2019-01-051-17/+21
| | | | | | | | | | | | Avoids entangling the IPC buffer appending with the actual operation of converting the scaling values over. This also inserts the proper error handling for invalid scaling values.
| * service/vi: Unstub IApplicationDisplayService' SetLayerScalingMode()Lioncash2019-01-051-21/+38
| | | | | | | | | | | | | | | | This appears to only check if the scaling mode can actually be handled, rather than actually setting the scaling mode for the layer. This implements the same error handling performed on the passed in values.
* | service/vi: Correct reported dimensions from IApplicationDisplayService's GetDisplayResolution()Lioncash2019-01-051-12/+8
|/ | | | | | Within the actual service, it makes no distinguishing between docked and undocked modes. This will always return the constants values reporting 1280x720 as the dimensions.
* Merge pull request #1975 from lioncash/vibunnei2019-01-041-4/+15
|\ | | | | service/vi: Minor updates and corrections to the DisplayInfo struct
| * service/vi: Correct initial width and height valuesLioncash2019-01-021-2/+2
| | | | | | | | | | Based off RE, it appears that almost all display types seem to use 1920x1080 except for a few (null display, edid display).
| * service/vi: Document unknown DisplayInfo struct membersLioncash2019-01-021-2/+13
| | | | | | | | | | | | It appears that the two members indicate whether a display has a bounded number of layers (and if set, the second member indicates the total number of layers).
* | Merge pull request #1976 from lioncash/displaybunnei2019-01-031-4/+17
|\ \ | | | | | | service/vi: Implement OpenDefaultDisplay in terms of OpenDisplay
| * | service/vi: Implement OpenDefaultDisplay in terms of OpenDisplayLioncash2019-01-031-4/+17
| |/ | | | | | | | | | | Internally within the vi services, this is essentially all that OpenDefaultDisplay does, so it's trivial to just do the same, and forward the default display string into the function.
* | service/vi: Implement SetDisplayEnabled()Lioncash2019-01-031-1/+10
| | | | | | | | | | | | | | This IPC command is simply a stub inside the actual service itself, and just returns a successful error code regardless of input. This is likely only retained in the service interface to not break older code that relied upon it succeeding in some way.
* | Merge pull request #1977 from lioncash/vi-logbunnei2019-01-031-63/+74
|\ \ | | | | | | service/vi: Log more information where applicable
| * | service/vi: Log more information where applicableLioncash2019-01-031-63/+74
| |/ | | | | | | | | | | In many cases, we didn't bother to log out any of the popped data members. This logs them out to the console within the logging call to provide more contextual information.
* / core/kernel: Remove unnecessary inclusionsLioncash2019-01-011-0/+1
|/ | | | Gets rid of a few unnecessary header dependencies in some source files.
* Merge pull request #1803 from DarkLordZach/k-able-eventbunnei2018-12-031-2/+3
|\ | | | | kernel: Divide Event into ReadableEvent and WritableEvent
| * hle_ipc: Refactor SleepClientThread to avoid ReadableEventZach Hilman2018-11-291-1/+1
| |
| * core: Port all current usages of Event to Readable/WritableEventZach Hilman2018-11-291-2/+3
| |
* | Services/VI: Dereferencing an uninitialized std::optional is undefined behavior.Subv2018-11-301-0/+2
|/ | | | Assert that it is not empty before using it in the DequeueBuffer wait callback.
* Changed logging to be "Log before execution", Added more error logging, all services should now log on some levelDavid Marcec2018-11-261-13/+25
|
* Merge pull request #1708 from ogniK5377/res-scalebunnei2018-11-241-9/+23
|\ | | | | Report resolution scaling support for vi and am
| * Removed hard coded values for width and heightDavid Marcec2018-11-191-2/+4
| |
| * Report resolution scaling support for vi and amDavid Marcec2018-11-161-9/+21
| | | | | | | | Specifying an internal resolution in yuzu now will report the scaled changes to vi and am.
* | vi: Implement TransactParcel for Disconnect and DetachBufferZach Hilman2018-11-171-0/+22
|/ | | | Used by homebrew on exit. According to switchbrew, returns an empty response parcel with one zero in it.
* global: Use std::optional instead of boost::optional (#1578)Frederic L2018-10-301-4/+5
| | | | | | | | | | | | | | | | * get rid of boost::optional * Remove optional references * Use std::reference_wrapper for optional references * Fix clang format * Fix clang format part 2 * Adressed feedback * Fix clang format and MacOS build
* Implement VI ConvertScalingMode (#1475)David2018-10-161-1/+49
| | | | | | | | * Implement VI ConvertScalingMode * Fixed push enum * Scale mode now uses Nintendo scale mode as an enum as well
* Merge pull request #1338 from raven02/service_vibunnei2018-09-301-1/+19
|\ | | | | Implement ISystemDisplayService::GetDisplayMode
| * Implement ISystemDisplayService::GetDisplayModeraven022018-09-301-1/+19
| |
* | Removed the use of rp.MakeBuilderDavid Marcec2018-09-191-15/+15
| | | | | | | | Due to keeping the code style consistent in the yuzu codebase. `rb = rp.MakeBuilder(...)` was replaced with `rb{ctx, ...}`
* | Merge pull request #1312 from lioncash/fwdbunnei2018-09-172-6/+8
|\ \ | | | | | | service/vi: Replace includes with forward declarations where applicable
| * | service/vi: Replace includes with forward declarations where applicableLioncash2018-09-132-6/+8
| | |
* | | Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi2018-09-151-4/+4
| |/ |/|
* | kernel/thread: Include thread-related enums within the kernel namespaceLioncash2018-09-131-1/+1
|/ | | | | | Previously, these were sitting outside of the Kernel namespace, which doesn't really make sense, given they're related to the Thread class which is within the Kernel namespace.
* hle/service: Default constructors and destructors in the cpp file where applicableLioncash2018-09-118-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a destructor isn't defaulted into a cpp file, it can cause the use of forward declarations to seemingly fail to compile for non-obvious reasons. It also allows inlining of the construction/destruction logic all over the place where a constructor or destructor is invoked, which can lead to code bloat. This isn't so much a worry here, given the services won't be created and destroyed frequently. The cause of the above mentioned non-obvious errors can be demonstrated as follows: ------- Demonstrative example, if you know how the described error happens, skip forwards ------- Assume we have the following in the header, which we'll call "thing.h": \#include <memory> // Forward declaration. For example purposes, assume the definition // of Object is in some header named "object.h" class Object; class Thing { public: // assume no constructors or destructors are specified here, // or the constructors/destructors are defined as: // // Thing() = default; // ~Thing() = default; // // ... Some interface member functions would be defined here private: std::shared_ptr<Object> obj; }; If this header is included in a cpp file, (which we'll call "main.cpp"), this will result in a compilation error, because even though no destructor is specified, the destructor will still need to be generated by the compiler because std::shared_ptr's destructor is *not* trivial (in other words, it does something other than nothing), as std::shared_ptr's destructor needs to do two things: 1. Decrement the shared reference count of the object being pointed to, and if the reference count decrements to zero, 2. Free the Object instance's memory (aka deallocate the memory it's pointing to). And so the compiler generates the code for the destructor doing this inside main.cpp. Now, keep in mind, the Object forward declaration is not a complete type. All it does is tell the compiler "a type named Object exists" and allows us to use the name in certain situations to avoid a header dependency. So the compiler needs to generate destruction code for Object, but the compiler doesn't know *how* to destruct it. A forward declaration doesn't tell the compiler anything about Object's constructor or destructor. So, the compiler will issue an error in this case because it's undefined behavior to try and deallocate (or construct) an incomplete type and std::shared_ptr and std::unique_ptr make sure this isn't the case internally. Now, if we had defaulted the destructor in "thing.cpp", where we also include "object.h", this would never be an issue, as the destructor would only have its code generated in one place, and it would be in a place where the full class definition of Object would be visible to the compiler. ---------------------- End example ---------------------------- Given these service classes are more than certainly going to change in the future, this defaults the constructors and destructors into the relevant cpp files to make the construction and destruction of all of the services consistent and unlikely to run into cases where forward declarations are indirectly causing compilation errors. It also has the plus of avoiding the need to rebuild several services if destruction logic changes, since it would only be necessary to recompile the single cpp file.
* vi: Add std::is_trivially_copyable checks to Read and Write functionsLioncash2018-07-231-2/+13
| | | | | | It's undefined behavior to memcpy an object that isn't considered trivially copyable, so put a compile-time check in to make sure this doesn't occur.
* vi: std::move std::vector in constructors where applicableLioncash2018-07-231-9/+9
| | | | | | | Allows avoiding unnecessary copies of the vector depending on the calling code. While we're at it, remove a redundant no-parameter base constructor call
* hle/service: Make constructors explicit where applicableLioncash2018-07-192-4/+4
| | | | | Prevents implicit construction and makes these lingering non-explicit constructors consistent with the rest of the other classes in services.
* vi: Change TransactionId::CancelBuffer to LOG_CRITICAL.bunnei2018-07-181-1/+1
|
* vi: Fix size for ListDisplays default display.bunnei2018-07-181-2/+2
|
* vi: Partially implement buffer crop parameters.bunnei2018-07-181-4/+10
|
* nvflinger: Fix for BufferQueue event handling.bunnei2018-07-171-4/+4
|
* Update clang formatJames Rowe2018-07-031-3/+3
|
* Rename logging macro back to LOG_*James Rowe2018-07-031-24/+24
|
* general: Make formatting of logged hex values more straightforwardLioncash2018-05-021-2/+2
| | | | | | This makes the formatting expectations more obvious (e.g. any zero padding specified is padding that's entirely dedicated to the value being printed, not any pretty-printing that also gets tacked on).
* vi: Move logging macros over to new fmt-compatible onesLioncash2018-04-241-26/+27
|
* Merge pull request #340 from mailwl/vi-updatebunnei2018-04-201-7/+27
|\ | | | | Service/VI: stub SetLayerVisibility, fix GetDisplayResolution output
| * Service/VI: stub SetLayerVisibility, fix GetDisplayResolution outputmailwl2018-04-171-7/+27
| | | | | | | | | | both SetLayerVisibility() functions used in Lego games, GetDisplayResolution() fixed according switchbrew.org
* | Merge pull request #360 from lioncash/namespacesbunnei2018-04-208-32/+16
|\ \ | | | | | | service: Use nested namespace specifiers where applicable
| * | service: Use nested namespace specifiers where applicableLioncash2018-04-208-32/+16
| |/ | | | | | | Tidies up namespace declarations
* / vi: Remove redundant initializers in the constructorsLioncash2018-04-201-9/+5
|/
* Various service name fixes - part 2 (rebased) (#322)Hexagon122018-04-172-2/+112
| | | | | | | | | | | | | | | | * Updated ACC with more service names * Updated SVC with more service names * Updated set with more service names * Updated sockets with more service names * Updated SPL with more service names * Updated time with more service names * Updated vi with more service names
* Fixed normal params in GetDisplayResolutionHexagon122018-04-131-1/+1
|
* vi: Implement GetDisplayResolution.bunnei2018-04-032-0/+26
|
* Service/vi: convert services to modulemailwl2018-03-218-212/+160
|
* Clean Warnings (?)N00byKing2018-03-191-1/+1
|
* vi: Remove DequeueBuffer and wait until next available buffer.bunnei2018-03-191-6/+24
|
* Parcel: Ensure we don't read past the end of the parcels in Vi.Subv2018-02-171-0/+5
|
* Vi: Mark all fences as NO_FENCE in the DequeueBuffer response parcel.Subv2018-02-171-2/+2
|
* Vi: Always write the IGBPBuffer in the RequestBuffer response parcel.Subv2018-02-171-1/+2
| | | | This may break libnx homebrew due to a bug in libnx but is required by official games since they always assume that the buffer will be there.
* Vi: Mark the fences as valid in the DequeueBuffer response parcel.Subv2018-02-151-0/+3
|
* Vi: Added a missing u32 in the DequeueBuffer response parcel.Subv2018-02-151-0/+1
|
* Vi: Don't write the IGBPBuffer in the IGBPRequestBufferResponseParcel.Subv2018-02-151-4/+2
|
* Vi: Properly write the BufferProducerFence object in the DequeueBuffer response parcel.Subv2018-02-151-18/+21
|
* vi: Eliminate direct usage of BufferDescriptorB.bunnei2018-02-141-14/+3
|
* vi: Use ReadBuffer/WriteBuffer functions for TransactParcel.bunnei2018-02-141-44/+19
|
* vi: Fix TransactParcelAuto to support both buffer formats.bunnei2018-02-141-25/+16
|
* vi: Add FENCE_HACK, which is useful for booting BOTW.bunnei2018-02-131-7/+21
|
* vi: Stub TransactParcel CancelBuffer.bunnei2018-02-131-0/+2
|
* TransactParcel: Move WriteBlock to narrowest scope.bunnei2018-02-131-10/+13
|
* vi: Parse IGBPQueueBufferRequestParcel params and expose buffer flip vertical.bunnei2018-02-121-5/+21
|
* vi: Fix OpenLayer and CreateStrayLayer.bunnei2018-02-111-6/+8
|
* vi: Implement TransactParcelAuto.bunnei2018-02-101-32/+46
|
* IGBPQueueBufferRequestParcel: Don't enforce buffer length.bunnei2018-02-101-1/+0
| | | | - Another fix for libnx.
* IGBPRequestBufferResponseParcel: Fix response for libnx.bunnei2018-02-101-7/+4
|
* IApplicationDisplayService::CloseDisplay: Fix response params size.bunnei2018-02-091-1/+1
|
* Service: stub some functions in am, audio, time, vi servicesmailwl2018-02-072-1/+22
|
* logger: Add VI service logging category.bunnei2018-02-054-21/+20
|
* Merge pull request #154 from mailwl/vi_create_stray_arraybunnei2018-02-021-0/+1
|\ | | | | vi::CreateStrayLayer : add padding to request
| * vi::CreateStrayLayer : add padding to requestmailwl2018-02-021-0/+1
| |
* | Services/vi: add vi:s and vi:u servicesmailwl2018-02-025-0/+124
|/
* hle: Rename RequestBuilder to ResponseBuilder.bunnei2018-01-252-19/+19
|
* service: Fix all incorrect IPC response headers.bunnei2018-01-252-5/+6
|
* Services: Vi shouldn't be responsible for creating nvflinger.Subv2018-01-224-6/+8
| | | | It is now created during Service initialization and passed to all the services that need it.
* VI: Move BufferQueue and NVFlinger to their own folder/namespace.Subv2018-01-224-363/+25
|
* VI: Implement the Query transaction of IHOSBinderDriver, and stubbed some results.Subv2018-01-212-0/+58
|
* Fixes some cast warnings, partial port of citra #3064 (#106)River City Ransomware2018-01-201-1/+1
| | | | | | | | * Fixes some cast warnings, partially fixes citra #3064 * Converted casts to uint32_t to u32 * Ran clang-format
* Fix dispdrv typogdkchan2018-01-191-1/+1
|
* Merge pull request #90 from lioncash/vi-overridebunnei2018-01-181-20/+21
|\ | | | | vi: Minor clean up/correctness changes
| * vi: Make constructors explicit where applicableLioncash2018-01-181-13/+14
| | | | | | | | Prevents implicit conversions.
| * vi: Add missing override specifiersLioncash2018-01-181-7/+7
| |
* | vi: Copy data directly into the std::vector within Parcel's ReadBlock functionLioncash2018-01-181-2/+3
|/ | | | | Previously this would unnecessarily zero-initialize the vector before copying the actual data into the vector instance.
* NV: Move the nvdrv classes into the Nvidia namespace, and move the functionality to a s single module that services call.Subv2018-01-171-3/+3
|
* VI: Stubbed GetNativeHandle, Create/DestroyStrayLayer and CloseDisplaySubv2018-01-172-3/+85
|
* vi: Add IManagerDisplayService::CloseDisplay functionbsaleil2018-01-151-0/+10
|
* renderer: Render previous frame when no new one is available.bunnei2018-01-151-1/+4
|
* yuzu: Update license text to be consistent across project.bunnei2018-01-134-4/+4
|
* core: Include <algorithm> where used.bunnei2018-01-121-0/+2
|
* NV: Move the nv device nodes to their own directory and namespace.Subv2018-01-111-1/+2
|
* VI: Use a Pulse event instead of OneShot for the vblank events.Subv2018-01-111-1/+1
| | | | This prevents missing frames if the vblank fires between the DequeueBuffer and Wait(vsync) calls
* vi: Use new CoreTiming::EventTypebunnei2018-01-111-1/+5
|
* NV: Expose the nvdisp_disp0 device and a weak reference to the nvdrv:a service.Subv2018-01-112-2/+16
| | | | | | NVFlinger will call into the nvdisp_disp0 device to perform screen flips, bypassing the ioctl interface. We now have the address of the framebuffer to draw, we just need to actually put it on the screen.
* NV: Determine what buffer to draw for each layer of each display.Subv2018-01-112-13/+58
| | | | | | Don't try to draw buffers that the guest application is using, only queued buffers are eligible for drawing. Drawing actual pixels is still not implemented.
* NV: Signal all display's vsync event 60 times per second.Subv2018-01-112-1/+32
|
* NV: Give each display its own vsync event.Subv2018-01-112-12/+29
|
* NV: Keep track of Displays, Layers and BufferQueues in nvflinger.Subv2018-01-114-41/+261
|
* NV: Implemented (with stubs) the vi:m service and some of its subservices.Subv2018-01-114-0/+714
The homebrew display test application now properly writes graphics data to the graphics buffer but we still don't have a way to compose the display layers.