-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Impeller] Share vulkan playground across goldens #49981
Changes from all commits
aaa2e1a
b7421a0
81455a3
b81c641
36432fa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,8 @@ namespace testing { | |
/// playground backend. | ||
class VulkanScreenshotter : public Screenshotter { | ||
public: | ||
explicit VulkanScreenshotter(bool enable_validations); | ||
explicit VulkanScreenshotter( | ||
const std::unique_ptr<PlaygroundImpl>& playground); | ||
|
||
std::unique_ptr<Screenshot> MakeScreenshot( | ||
AiksContext& aiks_context, | ||
|
@@ -29,7 +30,7 @@ class VulkanScreenshotter : public Screenshotter { | |
PlaygroundImpl& GetPlayground() override { return *playground_; } | ||
|
||
private: | ||
std::unique_ptr<PlaygroundImpl> playground_; | ||
const std::unique_ptr<PlaygroundImpl>& playground_; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hold this as a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't want to do that because that would require converting from a pointer to a reference which is removing validation for null pointers. |
||
}; | ||
|
||
} // namespace testing | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this into the
if GetParam() == kVulkan
blockWith the other changes below, the Vulkan block can be reduced to something like:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This mostly looks like this now, the branch is in the
GetSharedVulkanPlayground
function though.