Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/AaronShea/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
getnamo committed Jan 23, 2016
2 parents 2c8a35a + 1f322fc commit 0a1c761
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions Source/Blu/Private/BluEye.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ void UBluEye::NavForward()

UTexture2D* UBluEye::ResizeBrowser(const int32 NewWidth, const int32 NewHeight)
{
// Do we even have a texture to try and resize?
verifyf(Texture, TEXT("Can't resize when there isn't a texture. Did you forget to call init?"));

// Disable the web view while we resize
bEnabled = false;
Expand All @@ -251,9 +253,8 @@ UTexture2D* UBluEye::ResizeBrowser(const int32 NewWidth, const int32 NewHeight)
renderer->Width = NewWidth;
renderer->Height = NewHeight;

Texture = UTexture2D::CreateTransient(Width, Height, PF_B8G8R8A8);
Texture->AddToRoot();
Texture->UpdateResource();
// We need to reset the texture
ResetTexture();

// Let the browser's host know we resized it
browser->GetHost()->WasResized();
Expand Down Expand Up @@ -458,11 +459,7 @@ void UBluEye::processKeyMods(FInputEvent InKey)

UTexture2D* UBluEye::GetTexture() const
{
if (!Texture)
{
return UTexture2D::CreateTransient(Width, Height);
}

verifyf(Texture, TEXT("There is no texture to return! Did you forget to call init?"));
return Texture;
}

Expand Down

0 comments on commit 0a1c761

Please sign in to comment.