#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include <stddef.h>
#include <algorithm>
#include <utility>
#include "cc/paint/render_surface_filters.h"
#include "base/numerics/angle_conversions.h"
#include "cc/paint/filter_operation.h"
#include "cc/paint/filter_operations.h"
#include "cc/paint/paint_filter.h"
#include "third_party/skia/include/core/SkColorFilter.h"
#include "third_party/skia/include/core/SkRegion.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/skia_conversions.h"
namespace cc {
namespace {
void GetBrightnessMatrix(float amount, float matrix[20]) { … }
void GetSaturatingBrightnessMatrix(float amount, float matrix[20]) { … }
void GetContrastMatrix(float amount, float matrix[20]) { … }
void GetSaturateMatrix(float amount, float matrix[20]) { … }
void GetHueRotateMatrix(float hue, float matrix[20]) { … }
void GetInvertMatrix(float amount, float matrix[20]) { … }
void GetOpacityMatrix(float amount, float matrix[20]) { … }
void GetGrayscaleMatrix(float amount, float matrix[20]) { … }
void GetSepiaMatrix(float amount, float matrix[20]) { … }
sk_sp<PaintFilter> CreateMatrixImageFilter(const float matrix[20],
sk_sp<PaintFilter> input) { … }
}
sk_sp<PaintFilter> RenderSurfaceFilters::BuildImageFilter(
const FilterOperations& filters,
const gfx::Rect& layer_bounds) { … }
}