This repository has been archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Impeller] Add fenced command buffer that waits on-submit
this isn't ideal for performance long term but aligns well with what the other backends do. This also lets us remove the dependence on frame numbers for renderpasses setting up for implementing MSAA.
- Loading branch information
1 parent
aeb2cd9
commit 8a1bb4f
Showing
15 changed files
with
358 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright 2013 The Flutter Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "impeller/renderer/backend/vulkan/deletion_queue_vk.h" | ||
|
||
namespace impeller { | ||
|
||
DeletionQueueVK::DeletionQueueVK() = default; | ||
|
||
DeletionQueueVK::~DeletionQueueVK() { | ||
Flush(); | ||
} | ||
|
||
void DeletionQueueVK::Flush() { | ||
for (auto it = deletors_.rbegin(); it != deletors_.rend(); ++it) { | ||
(*it)(); | ||
} | ||
|
||
deletors_.clear(); | ||
} | ||
|
||
void DeletionQueueVK::Push(Deletor&& deletor) { | ||
deletors_.push_back(std::move(deletor)); | ||
} | ||
|
||
} // namespace impeller |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright 2013 The Flutter Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#pragma once | ||
|
||
#include <deque> | ||
#include <functional> | ||
|
||
#include "flutter/fml/macros.h" | ||
|
||
namespace impeller { | ||
|
||
class DeletionQueueVK { | ||
public: | ||
using Deletor = std::function<void()>; | ||
|
||
explicit DeletionQueueVK(); | ||
|
||
~DeletionQueueVK(); | ||
|
||
void Flush(); | ||
|
||
void Push(Deletor&& deletor); | ||
|
||
private: | ||
std::deque<Deletor> deletors_; | ||
|
||
FML_DISALLOW_COPY_AND_ASSIGN(DeletionQueueVK); | ||
}; | ||
|
||
} // namespace impeller |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.