diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
commit | d8bbc7858622b6d9c278469aab701ca0b609cddf (patch) | |
tree | eff41dc61d9f714852212739e6b3738b82a2af87 /gfx/2d/SkConvolver.h | |
parent | Releasing progress-linux version 125.0.3-1~progress7.99u1. (diff) | |
download | firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.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; |