diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:50 +0000 |
commit | def92d1b8e9d373e2f6f27c366d578d97d8960c6 (patch) | |
tree | 2ef34b9ad8bb9a9220e05d60352558b15f513894 /gfx/2d/SkConvolver.h | |
parent | Adding debian version 125.0.3-1. (diff) | |
download | firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.tar.xz firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx/2d/SkConvolver.h')
-rw-r--r-- | gfx/2d/SkConvolver.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gfx/2d/SkConvolver.h b/gfx/2d/SkConvolver.h index 5ea8ab9b5d..e21b2be024 100644 --- a/gfx/2d/SkConvolver.h +++ b/gfx/2d/SkConvolver.h @@ -10,7 +10,7 @@ #include "mozilla/Assertions.h" #include <cfloat> #include <cmath> -#include <vector> +#include "mozilla/Vector.h" namespace skia { @@ -81,11 +81,11 @@ class SkConvolutionFilter1D { // Returns the number of filters in this filter. This is the dimension of the // output image. - int numValues() const { return static_cast<int>(fFilters.size()); } + int numValues() const { return static_cast<int>(fFilters.length()); } - void reserveAdditional(int filterCount, int filterValueCount) { - fFilters.reserve(fFilters.size() + filterCount); - fFilterValues.reserve(fFilterValues.size() + filterValueCount); + bool reserveAdditional(int filterCount, int filterValueCount) { + return fFilters.reserve(fFilters.length() + filterCount) && + fFilterValues.reserve(fFilterValues.length() + filterValueCount); } // Appends the given list of scaling values for generating a given output @@ -98,7 +98,7 @@ class SkConvolutionFilter1D { // brighness of the image. // // The filterLength must be > 0. - void AddFilter(int filterOffset, const ConvolutionFixed* filterValues, + bool AddFilter(int filterOffset, const ConvolutionFixed* filterValues, int filterLength); // Retrieves a filter for the given |valueOffset|, a position in the output @@ -139,12 +139,12 @@ class SkConvolutionFilter1D { }; // Stores the information for each filter added to this class. - std::vector<FilterInstance> fFilters; + mozilla::Vector<FilterInstance> fFilters; // We store all the filter values in this flat list, indexed by // |FilterInstance.data_location| to avoid the mallocs required for storing // each one separately. - std::vector<ConvolutionFixed> fFilterValues; + mozilla::Vector<ConvolutionFixed> fFilterValues; // The maximum size of any filter we've added. int fMaxFilter; |