Loading libs/renderengine/include/renderengine/DisplaySettings.h +7 −7 Original line number Original line Diff line number Diff line Loading @@ -29,32 +29,32 @@ namespace renderengine { struct DisplaySettings { struct DisplaySettings { // Rectangle describing the physical display. We will project from the // Rectangle describing the physical display. We will project from the // logical clip onto this rectangle. // logical clip onto this rectangle. Rect physicalDisplay; Rect physicalDisplay = Rect::INVALID_RECT; // Rectangle bounded by the x,y- clipping planes in the logical display, so // Rectangle bounded by the x,y- clipping planes in the logical display, so // that the orthographic projection matrix can be computed. When // that the orthographic projection matrix can be computed. When // constructing this matrix, z-coordinate bound are assumed to be at z=0 and // constructing this matrix, z-coordinate bound are assumed to be at z=0 and // z=1. // z=1. Rect clip; Rect clip = Rect::INVALID_RECT; // Global transform to apply to all layers. // Global transform to apply to all layers. mat4 globalTransform; mat4 globalTransform = mat4(); // Maximum luminance pulled from the display's HDR capabilities. // Maximum luminance pulled from the display's HDR capabilities. float maxLuminence; float maxLuminence = 1.0f; // Output dataspace that will be populated if wide color gamut is used, or // Output dataspace that will be populated if wide color gamut is used, or // DataSpace::UNKNOWN otherwise. // DataSpace::UNKNOWN otherwise. ui::Dataspace outputDataspace; ui::Dataspace outputDataspace = ui::Dataspace::UNKNOWN; // Additional color transform to apply in linear space after transforming // Additional color transform to apply in linear space after transforming // to the output dataspace. // to the output dataspace. mat4 colorTransform; mat4 colorTransform = mat4(); // Region that will be cleared to (0, 0, 0, 0) prior to rendering. // Region that will be cleared to (0, 0, 0, 0) prior to rendering. // clearRegion will first be transformed by globalTransform so that it will // clearRegion will first be transformed by globalTransform so that it will // be in the same coordinate space as the rendered layers. // be in the same coordinate space as the rendered layers. Region clearRegion; Region clearRegion = Region::INVALID_REGION; }; }; } // namespace renderengine } // namespace renderengine Loading libs/renderengine/include/renderengine/LayerSettings.h +14 −14 Original line number Original line Diff line number Diff line Loading @@ -34,58 +34,58 @@ struct Buffer { // Buffer containing the image that we will render. // Buffer containing the image that we will render. // If buffer == nullptr, then the rest of the fields in this struct will be // If buffer == nullptr, then the rest of the fields in this struct will be // ignored. // ignored. sp<GraphicBuffer> buffer; sp<GraphicBuffer> buffer = nullptr; // Texture identifier to bind the external texture to. // Texture identifier to bind the external texture to. // TODO(alecmouri): This is GL-specific...make the type backend-agnostic. // TODO(alecmouri): This is GL-specific...make the type backend-agnostic. uint32_t textureName; uint32_t textureName = 0; // Whether to use filtering when rendering the texture. // Whether to use filtering when rendering the texture. bool useTextureFiltering; bool useTextureFiltering = false; // Transform matrix to apply to texture coordinates. // Transform matrix to apply to texture coordinates. mat4 textureTransform; mat4 textureTransform = mat4(); // Wheteher to use pre-multiplied alpha // Wheteher to use pre-multiplied alpha bool usePremultipliedAlpha; bool usePremultipliedAlpha = true; // HDR color-space setting for Y410. // HDR color-space setting for Y410. bool isY410BT2020; bool isY410BT2020 = false; }; }; // Metadata describing the layer geometry. // Metadata describing the layer geometry. struct Geometry { struct Geometry { // Boundaries of the layer. // Boundaries of the layer. FloatRect boundaries; FloatRect boundaries = FloatRect(); // Transform matrix to apply to mesh coordinates. // Transform matrix to apply to mesh coordinates. mat4 positionTransform; mat4 positionTransform = mat4(); }; }; // Descriptor of the source pixels for this layer. // Descriptor of the source pixels for this layer. struct PixelSource { struct PixelSource { // Source buffer // Source buffer Buffer buffer; Buffer buffer = Buffer(); // The solid color with which to fill the layer. // The solid color with which to fill the layer. // This should only be populated if we don't render from an application // This should only be populated if we don't render from an application // buffer. // buffer. half3 solidColor; half3 solidColor = half3(0.0f, 0.0f, 0.0f); }; }; // The settings that RenderEngine requires for correctly rendering a Layer. // The settings that RenderEngine requires for correctly rendering a Layer. struct LayerSettings { struct LayerSettings { // Geometry information // Geometry information Geometry geometry; Geometry geometry = Geometry(); // Source pixels for this layer. // Source pixels for this layer. PixelSource source; PixelSource source = PixelSource(); // Alpha option to apply to the source pixels // Alpha option to apply to the source pixels half alpha; half alpha = half(0.0); // Color space describing how the source pixels should be interpreted. // Color space describing how the source pixels should be interpreted. ui::Dataspace sourceDataspace; ui::Dataspace sourceDataspace = ui::Dataspace::UNKNOWN; }; }; } // namespace renderengine } // namespace renderengine Loading Loading
libs/renderengine/include/renderengine/DisplaySettings.h +7 −7 Original line number Original line Diff line number Diff line Loading @@ -29,32 +29,32 @@ namespace renderengine { struct DisplaySettings { struct DisplaySettings { // Rectangle describing the physical display. We will project from the // Rectangle describing the physical display. We will project from the // logical clip onto this rectangle. // logical clip onto this rectangle. Rect physicalDisplay; Rect physicalDisplay = Rect::INVALID_RECT; // Rectangle bounded by the x,y- clipping planes in the logical display, so // Rectangle bounded by the x,y- clipping planes in the logical display, so // that the orthographic projection matrix can be computed. When // that the orthographic projection matrix can be computed. When // constructing this matrix, z-coordinate bound are assumed to be at z=0 and // constructing this matrix, z-coordinate bound are assumed to be at z=0 and // z=1. // z=1. Rect clip; Rect clip = Rect::INVALID_RECT; // Global transform to apply to all layers. // Global transform to apply to all layers. mat4 globalTransform; mat4 globalTransform = mat4(); // Maximum luminance pulled from the display's HDR capabilities. // Maximum luminance pulled from the display's HDR capabilities. float maxLuminence; float maxLuminence = 1.0f; // Output dataspace that will be populated if wide color gamut is used, or // Output dataspace that will be populated if wide color gamut is used, or // DataSpace::UNKNOWN otherwise. // DataSpace::UNKNOWN otherwise. ui::Dataspace outputDataspace; ui::Dataspace outputDataspace = ui::Dataspace::UNKNOWN; // Additional color transform to apply in linear space after transforming // Additional color transform to apply in linear space after transforming // to the output dataspace. // to the output dataspace. mat4 colorTransform; mat4 colorTransform = mat4(); // Region that will be cleared to (0, 0, 0, 0) prior to rendering. // Region that will be cleared to (0, 0, 0, 0) prior to rendering. // clearRegion will first be transformed by globalTransform so that it will // clearRegion will first be transformed by globalTransform so that it will // be in the same coordinate space as the rendered layers. // be in the same coordinate space as the rendered layers. Region clearRegion; Region clearRegion = Region::INVALID_REGION; }; }; } // namespace renderengine } // namespace renderengine Loading
libs/renderengine/include/renderengine/LayerSettings.h +14 −14 Original line number Original line Diff line number Diff line Loading @@ -34,58 +34,58 @@ struct Buffer { // Buffer containing the image that we will render. // Buffer containing the image that we will render. // If buffer == nullptr, then the rest of the fields in this struct will be // If buffer == nullptr, then the rest of the fields in this struct will be // ignored. // ignored. sp<GraphicBuffer> buffer; sp<GraphicBuffer> buffer = nullptr; // Texture identifier to bind the external texture to. // Texture identifier to bind the external texture to. // TODO(alecmouri): This is GL-specific...make the type backend-agnostic. // TODO(alecmouri): This is GL-specific...make the type backend-agnostic. uint32_t textureName; uint32_t textureName = 0; // Whether to use filtering when rendering the texture. // Whether to use filtering when rendering the texture. bool useTextureFiltering; bool useTextureFiltering = false; // Transform matrix to apply to texture coordinates. // Transform matrix to apply to texture coordinates. mat4 textureTransform; mat4 textureTransform = mat4(); // Wheteher to use pre-multiplied alpha // Wheteher to use pre-multiplied alpha bool usePremultipliedAlpha; bool usePremultipliedAlpha = true; // HDR color-space setting for Y410. // HDR color-space setting for Y410. bool isY410BT2020; bool isY410BT2020 = false; }; }; // Metadata describing the layer geometry. // Metadata describing the layer geometry. struct Geometry { struct Geometry { // Boundaries of the layer. // Boundaries of the layer. FloatRect boundaries; FloatRect boundaries = FloatRect(); // Transform matrix to apply to mesh coordinates. // Transform matrix to apply to mesh coordinates. mat4 positionTransform; mat4 positionTransform = mat4(); }; }; // Descriptor of the source pixels for this layer. // Descriptor of the source pixels for this layer. struct PixelSource { struct PixelSource { // Source buffer // Source buffer Buffer buffer; Buffer buffer = Buffer(); // The solid color with which to fill the layer. // The solid color with which to fill the layer. // This should only be populated if we don't render from an application // This should only be populated if we don't render from an application // buffer. // buffer. half3 solidColor; half3 solidColor = half3(0.0f, 0.0f, 0.0f); }; }; // The settings that RenderEngine requires for correctly rendering a Layer. // The settings that RenderEngine requires for correctly rendering a Layer. struct LayerSettings { struct LayerSettings { // Geometry information // Geometry information Geometry geometry; Geometry geometry = Geometry(); // Source pixels for this layer. // Source pixels for this layer. PixelSource source; PixelSource source = PixelSource(); // Alpha option to apply to the source pixels // Alpha option to apply to the source pixels half alpha; half alpha = half(0.0); // Color space describing how the source pixels should be interpreted. // Color space describing how the source pixels should be interpreted. ui::Dataspace sourceDataspace; ui::Dataspace sourceDataspace = ui::Dataspace::UNKNOWN; }; }; } // namespace renderengine } // namespace renderengine Loading