Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 56727d6

Browse files
author
Jonah Williams
authored
Revert "[Impeller] mark decoded images as optimized for GPU access (#40356)" (#40387)
Revert "[Impeller] mark decoded images as optimized for GPU access"
1 parent e6334f1 commit 56727d6

12 files changed

Lines changed: 0 additions & 86 deletions

File tree

impeller/renderer/backend/gles/blit_pass_gles.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,6 @@ bool BlitPassGLES::OnCopyTextureToBufferCommand(
130130
return true;
131131
}
132132

133-
bool BlitPassGLES::OnOptimizeForGPUAccess(std::shared_ptr<Texture> texture,
134-
std::string label) {
135-
return true;
136-
}
137-
138133
// |BlitPass|
139134
bool BlitPassGLES::OnGenerateMipmapCommand(std::shared_ptr<Texture> texture,
140135
std::string label) {

impeller/renderer/backend/gles/blit_pass_gles.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@ class BlitPassGLES final : public BlitPass {
5050
size_t destination_offset,
5151
std::string label) override;
5252

53-
// |BlitPass|
54-
bool OnOptimizeForGPUAccess(std::shared_ptr<Texture> texture,
55-
std::string label) override;
56-
5753
// |BlitPass|
5854
bool OnGenerateMipmapCommand(std::shared_ptr<Texture> texture,
5955
std::string label) override;

impeller/renderer/backend/metal/blit_command_mtl.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,4 @@ struct BlitGenerateMipmapCommandMTL : public BlitGenerateMipmapCommand,
5050
[[nodiscard]] bool Encode(id<MTLBlitCommandEncoder> encoder) const override;
5151
};
5252

53-
struct BlitOptimizeGPUAccessCommandMTL : public BlitGenerateMipmapCommand,
54-
public BlitEncodeMTL {
55-
~BlitOptimizeGPUAccessCommandMTL() override;
56-
57-
std::string GetLabel() const override;
58-
59-
[[nodiscard]] bool Encode(id<MTLBlitCommandEncoder> encoder) const override;
60-
};
61-
6253
} // namespace impeller

impeller/renderer/backend/metal/blit_command_mtl.mm

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -112,23 +112,4 @@
112112
return true;
113113
};
114114

115-
BlitOptimizeGPUAccessCommandMTL::~BlitOptimizeGPUAccessCommandMTL() = default;
116-
117-
std::string BlitOptimizeGPUAccessCommandMTL::GetLabel() const {
118-
return label;
119-
}
120-
121-
bool BlitOptimizeGPUAccessCommandMTL::Encode(
122-
id<MTLBlitCommandEncoder> encoder) const {
123-
if (@available(macOS 10.14, iOS 12, tvOS 12, *)) {
124-
auto texture_mtl = TextureMTL::Cast(*texture).GetMTLTexture();
125-
if (!texture_mtl) {
126-
return false;
127-
}
128-
129-
[encoder optimizeContentsForGPUAccess:texture_mtl];
130-
}
131-
return true;
132-
}
133-
134115
} // namespace impeller

impeller/renderer/backend/metal/blit_pass_mtl.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,6 @@ class BlitPassMTL final : public BlitPass {
5757
bool OnGenerateMipmapCommand(std::shared_ptr<Texture> texture,
5858
std::string label) override;
5959

60-
// |BlitPass|
61-
bool OnOptimizeForGPUAccess(std::shared_ptr<Texture> texture,
62-
std::string label) override;
63-
6460
FML_DISALLOW_COPY_AND_ASSIGN(BlitPassMTL);
6561
};
6662

impeller/renderer/backend/metal/blit_pass_mtl.mm

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,4 @@
134134
return true;
135135
}
136136

137-
// |BlitPass|
138-
bool BlitPassMTL::OnOptimizeForGPUAccess(std::shared_ptr<Texture> texture,
139-
std::string label) {
140-
auto command = std::make_unique<BlitOptimizeGPUAccessCommandMTL>();
141-
command->label = label;
142-
command->texture = std::move(texture);
143-
144-
commands_.emplace_back(std::move(command));
145-
return true;
146-
}
147-
148137
} // namespace impeller

impeller/renderer/backend/vulkan/blit_pass_vk.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,6 @@ bool BlitPassVK::OnCopyTextureToBufferCommand(
8787
return true;
8888
}
8989

90-
// |BlitPass|
91-
bool BlitPassVK::OnOptimizeForGPUAccess(std::shared_ptr<Texture> texture,
92-
std::string label) {
93-
return true;
94-
}
95-
9690
// |BlitPass|
9791
bool BlitPassVK::OnGenerateMipmapCommand(std::shared_ptr<Texture> texture,
9892
std::string label) {

impeller/renderer/backend/vulkan/blit_pass_vk.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ class BlitPassVK final : public BlitPass {
5151
std::string label) override;
5252

5353
// |BlitPass|
54-
bool OnOptimizeForGPUAccess(std::shared_ptr<Texture> texture,
55-
std::string label) override;
56-
// |BlitPass|
5754
bool OnGenerateMipmapCommand(std::shared_ptr<Texture> texture,
5855
std::string label) override;
5956

impeller/renderer/blit_pass.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,6 @@ bool BlitPass::AddCopy(std::shared_ptr<Texture> source,
116116
std::move(label));
117117
}
118118

119-
bool BlitPass::OptimizeForGPUAccess(std::shared_ptr<Texture> texture,
120-
std::string label) {
121-
return OnOptimizeForGPUAccess(std::move(texture), std::move(label));
122-
}
123-
124119
bool BlitPass::GenerateMipmap(std::shared_ptr<Texture> texture,
125120
std::string label) {
126121
if (!texture) {

impeller/renderer/blit_pass.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -95,19 +95,6 @@ class BlitPass {
9595
///
9696
bool GenerateMipmap(std::shared_ptr<Texture> texture, std::string label = "");
9797

98-
//----------------------------------------------------------------------------
99-
/// @brief Optimize the provided texture for GPU access.
100-
/// This will no-op on platforms where this functionality is
101-
/// unsupported.
102-
///
103-
/// @param[in] texture The texture to generate mipmaps for.
104-
/// @param[in] label The optional debug label to give the command.
105-
///
106-
/// @return If the command was valid for subsequent commitment.
107-
///
108-
bool OptimizeForGPUAccess(std::shared_ptr<Texture> texture,
109-
std::string label = "");
110-
11198
//----------------------------------------------------------------------------
11299
/// @brief Encode the recorded commands to the underlying command buffer.
113100
///
@@ -140,9 +127,6 @@ class BlitPass {
140127
size_t destination_offset,
141128
std::string label) = 0;
142129

143-
virtual bool OnOptimizeForGPUAccess(std::shared_ptr<Texture> texture,
144-
std::string label) = 0;
145-
146130
virtual bool OnGenerateMipmapCommand(std::shared_ptr<Texture> texture,
147131
std::string label) = 0;
148132

0 commit comments

Comments
 (0)