cohtml::LibraryParamsWithExternalRenderingLibrary
Initialization parameters of the Cohtml library.
#include <Library.h>
Inherited by cohtml::LibraryParams
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| LibraryParamsWithExternalRenderingLibrary() |
Public Attributes
Section titled “Public Attributes”| Name | |
|---|---|
| IAllocator * | Allocator Memory allocator for all operations of the library. If null, a default malloc allocator will be used instead. |
| IVirtualAllocator * | VirtualAllocator Virtual memory allocator used by the V8 JavaScript engine. If null, a default virtual allocator will be used. |
| Logging::LoggingSettings | LoggingFilters Configures filtering of categorized log messages. Only messages matching the enabled TargetUser and MessageType flags are passed to the log handler. Minimum severity threshold is configured via LoggingFilters.MinimumSeverity. By default all categories are enabled and severity is set to Info. Reduce enabled categories in Shipping builds to avoid excessive logging. |
| Logging::ILogHandler * | LogHandler Handler provided by the application that will receive all logging messages. If null, the default log handler will be used that prints in a local file. |
| Profile::IPerformanceHandler * | PerformanceHandler Handler provided by the application that will receive performance warning messages. |
| IProfileMarkersTracer * | ProfileMarkersTracer Tracer object that will receive notifications when Cohtml is being profiled. |
| IFileSystemWriter * | FileSystemWriter Optional file system handler that allows writing to a file on the local filesystem. The file writer is used by some features (like the profiling on some platforms) to open a file where data is written. |
| const char * | WritableDirectory Path to a writable directory. This is optional if you provide your own log handler. |
| bool | EnableInternalAllocator The internal memory allocator efficiently reuses already allocated memory, which enhances performance at the cost of some memory overhead. The internal memory allocator is enabled by default. |
| bool | ExposeGC Enables an extension in the JS VM which exposes a global gc() function in the JS context that will try to force a full garbage collection. There is no guarantee that a GC will be performed or garbage will be collected. |
| const char * | ScriptEngineFlags Optional flags that are going to be passed to the Scripting Engine upon initialization. Example: –jitless –expose_gc For V8 engine, the available options can be found here: https://chromium.googlesource.com/v8/v8/+/f212270c9952fd76a14f0b72d9f5c51a99e3af22/src/flags/flag-definitions.h. |
| unsigned | ResourceThreadsCountHint Tells the runtime how many threads will be used during the Library lifetime for Resource work. The parameter is important for work balancing and especially for video playback. The video decoder will try to use as many threads (generating tasks) as there are hinted in this variable. Hinting MORE threads than the actual number that will be used will lead to undefined behaviour and most likely deadlocks in the video decoder. If uncertain about how many threads will execute Resource tasks, please set this to 1 - the default. |
| const char * | SharedLibraryLocation Sets where to look for the other shared libraries that CoHTML depends on Currently only usable on PS4. If set to nullptr, the working directory will be searched for module dependencies. |
| OnWorkAvailableFunc | OnWorkAvailable The Task System will notify through this callback when work is available. The tasks must be executed on a different thread. |
| void * | OnWorkAvailableUserData This pointer will be passed to the OnWorkAvailable callback and can be used to hold any data the user needs to give context to the function. |
| PlatformSpecificParams | PlatformParams Platform-specific parameters. |
| const char * | DefaultStyleFontFamily Sets the default font family that will be used by all Elements in the Views. The default font style is analogous to setting the CSS property “font-family” of all elements to the value of this field. |
| CompatibilityFlags | CompatibilitySettings Compatibility settings that can be used to enable or disable specific legacy behaviors of the Library. |
Public Functions Documentation
Section titled “Public Functions Documentation”function LibraryParamsWithExternalRenderingLibrary
Section titled “function LibraryParamsWithExternalRenderingLibrary”inline LibraryParamsWithExternalRenderingLibrary()Public Attributes Documentation
Section titled “Public Attributes Documentation”variable Allocator
Section titled “variable Allocator”IAllocator * Allocator;Memory allocator for all operations of the library. If null, a default malloc allocator will be used instead.
variable VirtualAllocator
Section titled “variable VirtualAllocator”IVirtualAllocator * VirtualAllocator;Virtual memory allocator used by the V8 JavaScript engine. If null, a default virtual allocator will be used.
variable LoggingFilters
Section titled “variable LoggingFilters”Logging::LoggingSettings LoggingFilters;Configures filtering of categorized log messages. Only messages matching the enabled TargetUser and MessageType flags are passed to the log handler. Minimum severity threshold is configured via LoggingFilters.MinimumSeverity. By default all categories are enabled and severity is set to Info. Reduce enabled categories in Shipping builds to avoid excessive logging.
variable LogHandler
Section titled “variable LogHandler”Logging::ILogHandler * LogHandler;Handler provided by the application that will receive all logging messages. If null, the default log handler will be used that prints in a local file.
variable PerformanceHandler
Section titled “variable PerformanceHandler”Profile::IPerformanceHandler * PerformanceHandler;Handler provided by the application that will receive performance warning messages.
variable ProfileMarkersTracer
Section titled “variable ProfileMarkersTracer”IProfileMarkersTracer * ProfileMarkersTracer;Tracer object that will receive notifications when Cohtml is being profiled.
variable FileSystemWriter
Section titled “variable FileSystemWriter”IFileSystemWriter * FileSystemWriter;Optional file system handler that allows writing to a file on the local filesystem. The file writer is used by some features (like the profiling on some platforms) to open a file where data is written.
variable WritableDirectory
Section titled “variable WritableDirectory”const char * WritableDirectory;Path to a writable directory. This is optional if you provide your own log handler.
variable EnableInternalAllocator
Section titled “variable EnableInternalAllocator”bool EnableInternalAllocator;The internal memory allocator efficiently reuses already allocated memory, which enhances performance at the cost of some memory overhead. The internal memory allocator is enabled by default.
Note: By disabling the internal allocator Cohtml will free any unused memory to the client immediately, which will reduce the overall memory footprint.
variable ExposeGC
Section titled “variable ExposeGC”bool ExposeGC;Enables an extension in the JS VM which exposes a global gc() function in the JS context that will try to force a full garbage collection. There is no guarantee that a GC will be performed or garbage will be collected.
Note: Garbage collection is a complicated process that is best done when it’s left to happen automatically. Use sparingly as a forced full garbage collection tends to be a heavy operation.
variable ScriptEngineFlags
Section titled “variable ScriptEngineFlags”const char * ScriptEngineFlags;Optional flags that are going to be passed to the Scripting Engine upon initialization. Example: –jitless –expose_gc For V8 engine, the available options can be found here: https://chromium.googlesource.com/v8/v8/+/f212270c9952fd76a14f0b72d9f5c51a99e3af22/src/flags/flag-definitions.h.
variable ResourceThreadsCountHint
Section titled “variable ResourceThreadsCountHint”unsigned ResourceThreadsCountHint;Tells the runtime how many threads will be used during the Library lifetime for Resource work. The parameter is important for work balancing and especially for video playback. The video decoder will try to use as many threads (generating tasks) as there are hinted in this variable. Hinting MORE threads than the actual number that will be used will lead to undefined behaviour and most likely deadlocks in the video decoder. If uncertain about how many threads will execute Resource tasks, please set this to 1 - the default.
variable SharedLibraryLocation
Section titled “variable SharedLibraryLocation”const char * SharedLibraryLocation;Sets where to look for the other shared libraries that CoHTML depends on Currently only usable on PS4. If set to nullptr, the working directory will be searched for module dependencies.
Warning: Must end with a trailing slash.
variable OnWorkAvailable
Section titled “variable OnWorkAvailable”OnWorkAvailableFunc OnWorkAvailable;The Task System will notify through this callback when work is available. The tasks must be executed on a different thread.
Warning: Can be called on any thread except the Render thread!
variable OnWorkAvailableUserData
Section titled “variable OnWorkAvailableUserData”void * OnWorkAvailableUserData;This pointer will be passed to the OnWorkAvailable callback and can be used to hold any data the user needs to give context to the function.
variable PlatformParams
Section titled “variable PlatformParams”PlatformSpecificParams PlatformParams;Platform-specific parameters.
variable DefaultStyleFontFamily
Section titled “variable DefaultStyleFontFamily”const char * DefaultStyleFontFamily;Sets the default font family that will be used by all Elements in the Views. The default font style is analogous to setting the CSS property “font-family” of all elements to the value of this field.
variable CompatibilitySettings
Section titled “variable CompatibilitySettings”CompatibilityFlags CompatibilitySettings;Compatibility settings that can be used to enable or disable specific legacy behaviors of the Library.
© 2026 Coherent Labs. All rights reserved.