Skip to content

Commit

Permalink
RDK-29685 ability to set width and height and creation time (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfiess authored Sep 4, 2020
1 parent 7982d62 commit cc85216
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion compositorcontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ namespace RdkShell
}
}

bool CompositorController::createDisplay(const std::string& client, const std::string& displayName)
bool CompositorController::createDisplay(const std::string& client, const std::string& displayName, uint32_t displayWidth, uint32_t displayHeight)
{
std::string clientDisplayName = standardizeName(client);
std::string compositorDisplayName = displayName;
Expand All @@ -840,6 +840,14 @@ namespace RdkShell
uint32_t width = 0;
uint32_t height = 0;
RdkShell::EssosInstance::instance()->resolution(width, height);
if (displayWidth > 0)
{
width = displayWidth;
}
if (displayHeight > 0)
{
height = displayHeight;
}
bool ret = compositorInfo.compositor->createDisplay(compositorDisplayName, width, height);
if (ret)
{
Expand Down
2 changes: 1 addition & 1 deletion compositorcontroller.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ namespace RdkShell
static bool scaleToFit(const std::string& client, const int32_t x, const int32_t y, const uint32_t width, const uint32_t height);
static void onKeyPress(uint32_t keycode, uint32_t flags, uint64_t metadata);
static void onKeyRelease(uint32_t keycode, uint32_t flags, uint64_t metadata);
static bool createDisplay(const std::string& client, const std::string& displayName);
static bool createDisplay(const std::string& client, const std::string& displayName, uint32_t displayWidth=0, uint32_t displayHeight=0);
static bool addAnimation(const std::string& client, double duration, std::map<std::string, RdkShellData> &animationProperties);
static bool removeAnimation(const std::string& client);
static bool addListener(const std::string& client, std::shared_ptr<RdkShellEventListener> listener);
Expand Down

0 comments on commit cc85216

Please sign in to comment.