From 1698514fb8cf84b7000681301dfdc8875bc55c3c Mon Sep 17 00:00:00 2001 From: Dan Field Date: Wed, 31 May 2023 13:01:25 -0700 Subject: [PATCH 1/2] Fix tidy issues --- lib/ui/painting/image_decoder_impeller.cc | 4 ++-- lib/ui/painting/image_decoder_impeller.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ui/painting/image_decoder_impeller.cc b/lib/ui/painting/image_decoder_impeller.cc index fdaf81a7a7ac0..ad7f8fa61c64d 100644 --- a/lib/ui/painting/image_decoder_impeller.cc +++ b/lib/ui/painting/image_decoder_impeller.cc @@ -338,7 +338,7 @@ ImageDecoderImpeller::UploadTextureToPrivate( const std::shared_ptr& context, const std::shared_ptr& buffer, const SkImageInfo& image_info, - std::shared_ptr bitmap, + const std::shared_ptr& bitmap, const std::shared_ptr& gpu_disabled_switch) { TRACE_EVENT0("impeller", __FUNCTION__); if (!context) { @@ -365,7 +365,7 @@ ImageDecoderImpeller::UploadTextureToPrivate( std::pair, std::string> ImageDecoderImpeller::UploadTextureToShared( const std::shared_ptr& context, - std::shared_ptr bitmap, + const std::shared_ptr& bitmap, const std::shared_ptr& gpu_disabled_switch, bool create_mips) { TRACE_EVENT0("impeller", __FUNCTION__); diff --git a/lib/ui/painting/image_decoder_impeller.h b/lib/ui/painting/image_decoder_impeller.h index a9c1af42de9d0..05c358a15cd30 100644 --- a/lib/ui/painting/image_decoder_impeller.h +++ b/lib/ui/painting/image_decoder_impeller.h @@ -80,7 +80,7 @@ class ImageDecoderImpeller final : public ImageDecoder { const std::shared_ptr& context, const std::shared_ptr& buffer, const SkImageInfo& image_info, - std::shared_ptr bitmap, + const std::shared_ptr& bitmap, const std::shared_ptr& gpu_disabled_switch); /// @brief Create a host visible texture from the provided bitmap. @@ -93,7 +93,7 @@ class ImageDecoderImpeller final : public ImageDecoder { /// @return A DlImage. static std::pair, std::string> UploadTextureToShared( const std::shared_ptr& context, - std::shared_ptr bitmap, + const std::shared_ptr& bitmap, const std::shared_ptr& gpu_disabled_switch, bool create_mips = true); From c2b220daf0e5d4567fa8278fd4ed279436976b78 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Wed, 31 May 2023 13:27:08 -0700 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Zachary Anderson --- lib/ui/painting/image_decoder_impeller.cc | 6 ++++-- lib/ui/painting/image_decoder_impeller.h | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/ui/painting/image_decoder_impeller.cc b/lib/ui/painting/image_decoder_impeller.cc index ad7f8fa61c64d..396387f2120d5 100644 --- a/lib/ui/painting/image_decoder_impeller.cc +++ b/lib/ui/painting/image_decoder_impeller.cc @@ -338,7 +338,8 @@ ImageDecoderImpeller::UploadTextureToPrivate( const std::shared_ptr& context, const std::shared_ptr& buffer, const SkImageInfo& image_info, - const std::shared_ptr& bitmap, + // NOLINTNEXTLINE(performance-unnecessary-value-param) + std::shared_ptr bitmap, const std::shared_ptr& gpu_disabled_switch) { TRACE_EVENT0("impeller", __FUNCTION__); if (!context) { @@ -365,7 +366,8 @@ ImageDecoderImpeller::UploadTextureToPrivate( std::pair, std::string> ImageDecoderImpeller::UploadTextureToShared( const std::shared_ptr& context, - const std::shared_ptr& bitmap, + // NOLINTNEXTLINE(performance-unnecessary-value-param) + std::shared_ptr bitmap, const std::shared_ptr& gpu_disabled_switch, bool create_mips) { TRACE_EVENT0("impeller", __FUNCTION__); diff --git a/lib/ui/painting/image_decoder_impeller.h b/lib/ui/painting/image_decoder_impeller.h index 05c358a15cd30..f407a511b5055 100644 --- a/lib/ui/painting/image_decoder_impeller.h +++ b/lib/ui/painting/image_decoder_impeller.h @@ -80,7 +80,8 @@ class ImageDecoderImpeller final : public ImageDecoder { const std::shared_ptr& context, const std::shared_ptr& buffer, const SkImageInfo& image_info, - const std::shared_ptr& bitmap, + // NOLINTNEXTLINE(performance-unnecessary-value-param) + std::shared_ptr bitmap, const std::shared_ptr& gpu_disabled_switch); /// @brief Create a host visible texture from the provided bitmap. @@ -93,7 +94,8 @@ class ImageDecoderImpeller final : public ImageDecoder { /// @return A DlImage. static std::pair, std::string> UploadTextureToShared( const std::shared_ptr& context, - const std::shared_ptr& bitmap, + // NOLINTNEXTLINE(performance-unnecessary-value-param) + std::shared_ptr bitmap, const std::shared_ptr& gpu_disabled_switch, bool create_mips = true);