Files
UnrealEngineUWP/Engine/Source/Developer/FunctionalTesting/Classes/ScreenshotFunctionalTest.h

49 lines
1.5 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "UObject/ObjectMacros.h"
#include "ScreenshotFunctionalTestBase.h"
#include "AutomationScreenshotOptions.h"
#include "ScreenshotFunctionalTest.generated.h"
class FAutomationTestScreenshotEnvSetup;
/**
* No UI
*/
UCLASS(Blueprintable)
class FUNCTIONALTESTING_API AScreenshotFunctionalTest : public AScreenshotFunctionalTestBase
{
GENERATED_BODY()
public:
AScreenshotFunctionalTest(const FObjectInitializer& ObjectInitializer);
virtual void Serialize(FArchive& Ar) override;
// Tests not relying on temporal effects can force a camera cut to flush stale data
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Camera", SimpleDisplay)
bool bCameraCutOnScreenshotPrep;
// If r.EnableStereoScreenshotTestVariants is enabled, also take and compare screenshots in stereo rendering emulation modes when running this test
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Screenshot", SimpleDisplay)
bool bSupportStereoTestVariants = true;
protected:
virtual void PrepareTest() override;
virtual void RequestScreenshot() override;
virtual void OnScreenShotCaptured(int32 InSizeX, int32 InSizeY, const TArray<FColor>& InImageData) override;
virtual void OnScreenshotTakenAndCompared() override;
private:
void PerformVariant(FString VariantName, FString SetpCommand, FString RestoreCommand);
FString CurrentVariantName;
FString VariantRestoreCommand;
bool bNeedsVariantRestore;
bool bShouldDoViewRectOffsetVariant;
};