[Impeller] Cleanup stale TODOs and fixup the format of others. (flutter/engine#53825)

There are still tons of TODOs without issues assigned to them that I'm having a harder time tracking them down. But this cleanup is easy.
This commit is contained in:
Chinmay Garde
2024-07-13 11:10:28 -07:00
committed by GitHub
parent e85d341994
commit 3ad1afaa59
19 changed files with 19 additions and 40 deletions

View File

@@ -263,9 +263,6 @@ bool Main(const fml::CommandLine& command_line) {
// Create at least one compiler to output the SL file, reflection data, and a
// depfile.
// TODO(dnfield): This seems off. We should more explicitly handle how we
// generate reflection and depfile data for the runtime stage case.
// https://github.com/flutter/flutter/issues/140841
SourceOptions options = switches.CreateSourceOptions();

View File

@@ -302,8 +302,7 @@ static EntityPassTarget CreateRenderTarget(ContentContext& renderer,
/// changed for the lifetime of the textures.
if (context->GetBackendType() == Context::BackendType::kOpenGLES) {
// TODO(https://github.com/flutter/flutter/issues/141732): Implement mip map
// generation on opengles.
// TODO(141732): Implement mip map generation on opengles.
mip_count = 1;
}

View File

@@ -364,8 +364,7 @@ struct TRect {
/// @brief Get the area of the rectangle, equivalent to |GetSize().Area()|
[[nodiscard]] constexpr T Area() const {
// TODO(flutter/flutter#141710) - Use saturated math to avoid overflow
// https://github.com/flutter/flutter/issues/141710
// TODO(141710): Use saturated math to avoid overflow.
return IsEmpty() ? 0 : (right_ - left_) * (bottom_ - top_);
}

View File

@@ -78,7 +78,6 @@ class GoldenPlaygroundTest
[[nodiscard]] fml::Status SetCapabilities(
const std::shared_ptr<Capabilities>& capabilities);
/// TODO(https://github.com/flutter/flutter/issues/139950): Remove this.
/// Returns true if `OpenPlaygroundHere` will actually render anything.
bool WillRenderSomething() const { return true; }

View File

@@ -44,16 +44,16 @@ const std::unique_ptr<PlaygroundImpl>& GetSharedVulkanPlayground(
static absl::NoDestructor<std::unique_ptr<PlaygroundImpl>>
vulkan_validation_playground(
MakeVulkanPlayground(/*enable_validations=*/true));
// TODO(https://github.com/flutter/flutter/issues/142237): This can be
// removed when the thread local storage is removed.
// TODO(142237): This can be removed when the thread local storage is
// removed.
static fml::ScopedCleanupClosure context_cleanup(
[&] { (*vulkan_validation_playground)->GetContext()->Shutdown(); });
return *vulkan_validation_playground;
} else {
static absl::NoDestructor<std::unique_ptr<PlaygroundImpl>>
vulkan_playground(MakeVulkanPlayground(/*enable_validations=*/false));
// TODO(https://github.com/flutter/flutter/issues/142237): This can be
// removed when the thread local storage is removed.
// TODO(142237): This can be removed when the thread local storage is
// removed.
static fml::ScopedCleanupClosure context_cleanup(
[&] { (*vulkan_playground)->GetContext()->Shutdown(); });
return *vulkan_playground;

View File

@@ -76,8 +76,7 @@ std::unique_ptr<Screenshot> ReadTexture(
CGImagePtr image(CGBitmapContextCreateImage(context.get()), &CGImageRelease);
FML_CHECK(image);
// TODO(https://github.com/flutter/flutter/issues/142641): Perform the flip at
// the blit stage to avoid this slow copy.
// TODO(142641): Perform the flip at the blit stage to avoid this slow copy.
if (texture->GetYCoordScale() == -1) {
CGContextPtr flipped_context(
CGBitmapContextCreate(

View File

@@ -110,7 +110,6 @@ class Playground {
[[nodiscard]] fml::Status SetCapabilities(
const std::shared_ptr<Capabilities>& capabilities);
/// TODO(https://github.com/flutter/flutter/issues/139950): Remove this.
/// Returns true if `OpenPlaygroundHere` will actually render anything.
bool WillRenderSomething() const;

View File

@@ -72,7 +72,7 @@ bool BlitCopyTextureToTextureCommandGLES::Encode(
// glBlitFramebuffer is a GLES3 proc. Since we target GLES2, we need to
// emulate the blit when it's not available in the driver.
if (!gl.BlitFramebuffer.IsAvailable()) {
// TODO(bdero): Emulate the blit using a raster draw call here.
// TODO(135818): Emulate the blit using a raster draw call here.
FML_LOG(ERROR) << "Texture blit fallback not implemented yet for GLES2.";
return false;
}

View File

@@ -303,7 +303,6 @@ PipelineFuture<ComputePipelineDescriptor> PipelineLibraryGLES::GetPipeline(
bool async) {
auto promise = std::make_shared<
std::promise<std::shared_ptr<Pipeline<ComputePipelineDescriptor>>>>();
// TODO(dnfield): implement compute for GLES.
promise->set_value(nullptr);
return {descriptor, promise->get_future()};
}

View File

@@ -22,8 +22,7 @@ bool GLErrorIsFatal(GLenum value);
struct AutoErrorCheck {
const PFNGLGETERRORPROC error_fn;
// TODO(matanlurey) Change to string_view.
// https://github.com/flutter/flutter/issues/135922
// TODO(135922) Change to string_view.
const char* name;
AutoErrorCheck(PFNGLGETERRORPROC error, const char* name)
@@ -50,12 +49,10 @@ template <class T>
struct GLProc {
using GLFunctionType = T;
// TODO(matanlurey) Change to string_view.
// https://github.com/flutter/flutter/issues/135922
//----------------------------------------------------------------------------
/// The name of the GL function.
///
// TODO(135922) Change to string_view.
const char* name = nullptr;
//----------------------------------------------------------------------------

View File

@@ -476,9 +476,9 @@ struct RenderPassData {
if (gl.DiscardFramebufferEXT.IsAvailable()) {
std::vector<GLenum> attachments;
// TODO(jonahwilliams): discarding stencil or depth on the default fbo
// causes Angle to discard the entire render target. Until we know the
// reason, default to storing.
// TODO(130048): discarding stencil or depth on the default fbo causes Angle
// to discard the entire render target. Until we know the reason, default to
// storing.
bool angle_safe = gl.GetCapabilities()->IsANGLE() ? !is_default_fbo : true;
if (pass_data.discard_color_attachment) {

View File

@@ -127,9 +127,8 @@ fml::Status ComputePassMTL::Compute(const ISize& grid_size) {
return fml::Status(fml::StatusCode::kUnknown,
"Invalid grid size for compute command.");
}
// TODO(dnfield): use feature detection to support non-uniform threadgroup
// sizes.
// https://github.com/flutter/flutter/issues/110619
// Threadgroup sizes must be uniform.
auto width = grid_size.width;
auto height = grid_size.height;

View File

@@ -90,7 +90,6 @@ static MTLComputePipelineDescriptor* GetMTLComputePipelineDescriptor(
return descriptor;
}
// TODO(csg): Make PipelineDescriptor a struct and move this to formats_mtl.
static id<MTLDepthStencilState> CreateDepthStencilDescriptor(
const PipelineDescriptor& desc,
id<MTLDevice> device) {

View File

@@ -100,7 +100,6 @@ static bool ConfigureStencilAttachment(
return true;
}
// TODO(csg): Move this to formats_mtl.h
static MTLRenderPassDescriptor* ToMTLRenderPassDescriptor(
const RenderTarget& desc) {
auto result = [MTLRenderPassDescriptor renderPassDescriptor];

View File

@@ -507,8 +507,7 @@ bool CapabilitiesVK::SetPhysicalDevice(
{
// Query texture support.
// TODO(jonahwilliams):
// https://github.com/flutter/flutter/issues/129784
// TODO(129784): Add a capability check for expected memory types.
vk::PhysicalDeviceMemoryProperties memory_properties;
device.getMemoryProperties(&memory_properties);

View File

@@ -42,7 +42,6 @@ VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE
namespace impeller {
// TODO(csg): Fix this after caps are reworked.
static bool gHasValidationLayers = false;
bool HasValidationLayers() {

View File

@@ -55,8 +55,7 @@ std::shared_ptr<SwapchainVK> SwapchainVK::Create(
return nullptr;
}
// TODO(148139): https://github.com/flutter/flutter/issues/148139 sync issues
// on present.
// TODO(148139): Fix synchronization issues on present.
if constexpr (false) {
// TODO(147533): AHB swapchains on emulators are not functional.
const auto emulator =

View File

@@ -63,8 +63,8 @@ std::shared_ptr<TextFrame> MakeTextFrameFromTextBlobSkia(
bool has_color = false;
std::vector<TextRun> runs;
for (SkTextBlobRunIterator run(blob.get()); !run.done(); run.next()) {
// TODO(jonahwilliams): ask Skia for a public API to look this up.
// https://github.com/flutter/flutter/issues/112005
// TODO(112005): Ask Skia for a public API to look this up. This is using a
// private API today.
SkStrikeSpec strikeSpec = SkStrikeSpec::MakeWithNoDevice(run.font());
SkBulkGlyphMetricsAndPaths paths{strikeSpec};
AxisAlignment alignment = AxisAlignment::kNone;

View File

@@ -44,9 +44,6 @@
namespace impeller {
// TODO(bdero): We might be able to remove this per-glyph padding if we fix
// the underlying causes of the overlap.
// https://github.com/flutter/flutter/issues/114563
constexpr auto kPadding = 2;
namespace {