mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
[Impeller] Do not copy the command list when queueing a RenderPassGLES to the reactor (flutter/engine#41125)
[Impeller] Do not copy the command list when queueing a RenderPassGLES to the reactor
This commit is contained in:
parent
7dc83ce910
commit
a084108d8b
@ -520,11 +520,13 @@ bool RenderPassGLES::OnEncodeCommands(const Context& context) const {
|
||||
CanDiscardAttachmentWhenDone(stencil0->store_action);
|
||||
}
|
||||
|
||||
std::shared_ptr<const RenderPassGLES> shared_this = shared_from_this();
|
||||
return reactor_->AddOperation([pass_data,
|
||||
allocator = context.GetResourceAllocator(),
|
||||
commands = commands_](const auto& reactor) {
|
||||
auto result =
|
||||
EncodeCommandsInReactor(*pass_data, allocator, reactor, commands);
|
||||
render_pass = std::move(shared_this)](
|
||||
const auto& reactor) {
|
||||
auto result = EncodeCommandsInReactor(*pass_data, allocator, reactor,
|
||||
render_pass->commands_);
|
||||
FML_CHECK(result) << "Must be able to encode GL commands without error.";
|
||||
});
|
||||
}
|
||||
|
||||
@ -4,13 +4,17 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "flutter/fml/macros.h"
|
||||
#include "flutter/impeller/renderer/backend/gles/reactor_gles.h"
|
||||
#include "flutter/impeller/renderer/render_pass.h"
|
||||
|
||||
namespace impeller {
|
||||
|
||||
class RenderPassGLES final : public RenderPass {
|
||||
class RenderPassGLES final
|
||||
: public RenderPass,
|
||||
public std::enable_shared_from_this<RenderPassGLES> {
|
||||
public:
|
||||
// |RenderPass|
|
||||
~RenderPassGLES() override;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user