-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/engine
#46111Closed
Copy link
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: tech-debtTechnical debt, code quality, testing, etc.Technical debt, code quality, testing, etc.engineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.team-engineOwned by Engine teamOwned by Engine team
Description
Blocks #134969.
I'm requesting help if anyone could use a simple~ish task to work on in the background.
The work required is roughly the following:
@@ -178,7 +178,7 @@ class DlColorSource : public DlAttribute<DlColorSource, DlColorSourceType> {
class DlColorColorSource final : public DlColorSource {
public:
- DlColorColorSource(DlColor color) : color_(color) {}
+ explicit DlColorColorSource(DlColor color) : color_(color) {}
bool isUIThreadSafe() const override { return true; }
@@ -216,7 +216,7 @@ class DlMatrixColorSourceBase : public DlColorSource {
}
protected:
- DlMatrixColorSourceBase(const SkMatrix* matrix)
+ explicit DlMatrixColorSourceBase(const SkMatrix* matrix)
: matrix_(matrix ? *matrix : SkMatrix::I()) {}
private:
@@ -232,7 +232,7 @@ class DlImageColorSource final : public SkRefCnt,
DlImageSampling sampling = DlImageSampling::kLinear,
const SkMatrix* matrix = nullptr)
: DlMatrixColorSourceBase(matrix),
- image_(image),
+ image_(std::move(image)),
horizontal_tile_mode_(horizontal_tile_mode),
vertical_tile_mode_(vertical_tile_mode),
sampling_(sampling) {}
@@ -405,7 +405,8 @@ class DlLinearGradientColorSource final : public DlGradientColorSourceBase {
store_color_stops(this + 1, colors, stops);
}
- DlLinearGradientColorSource(const DlLinearGradientColorSource* source)
+ explicit DlLinearGradientColorSource(
+ const DlLinearGradientColorSource* source)
: DlGradientColorSourceBase(source->stop_count(),
source->tile_mode(),
source->matrix_ptr()),
@@ -468,7 +469,8 @@ class DlRadialGradientColorSource final : public DlGradientColorSourceBase {
store_color_stops(this + 1, colors, stops);
}
- DlRadialGradientColorSource(const DlRadialGradientColorSource* source)
+ explicit DlRadialGradientColorSource(
+ const DlRadialGradientColorSource* source)
: DlGradientColorSourceBase(source->stop_count(),
source->tile_mode(),
source->matrix_ptr()),
@@ -540,7 +542,8 @@ class DlConicalGradientColorSource final : public DlGradientColorSourceBase {
store_color_stops(this + 1, colors, stops);
}
- DlConicalGradientColorSource(const DlConicalGradientColorSource* source)
+ explicit DlConicalGradientColorSource(
+ const DlConicalGradientColorSource* source)
: DlGradientColorSourceBase(source->stop_count(),
source->tile_mode(),
source->matrix_ptr()),
@@ -610,7 +613,7 @@ class DlSweepGradientColorSource final : public DlGradientColorSourceBase {
store_color_stops(this + 1, colors, stops);
}
- DlSweepGradientColorSource(const DlSweepGradientColorSource* source)
+ explicit DlSweepGradientColorSource(const DlSweepGradientColorSource* source)
: DlGradientColorSourceBase(source->stop_count(),
source->tile_mode(),
source->matrix_ptr()),... and then changing the rest of the repo to use Dl...ColorSource(source) explicitly.
I also included above some other style changes that are private to that header, that could be done at the same time or in a separate PR depending on your comfort level (though it doesn't seem worth it to break up into another issue).
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: tech-debtTechnical debt, code quality, testing, etc.Technical debt, code quality, testing, etc.engineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.team-engineOwned by Engine teamOwned by Engine team