// Copyright 2024 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef SKIA_EXT_GEOMETRY_H_ #define SKIA_EXT_GEOMETRY_H_ #include <vector> #include "skia/config/SkUserConfig.h" #include "third_party/skia/include/core/SkImage.h" #include "third_party/skia/include/core/SkRect.h" #include "third_party/skia/include/core/SkSize.h" namespace skia { // Returns a rect that has the same relationship to `output_bounds` as // `input_rect` has to `input_bounds`. The only requirement for valid // results is that `output_bounds` and `input_bounds` be non-empty. SK_API SkRect ScaleSkRectProportional(const SkRect& output_bounds, const SkRect& input_bounds, const SkRect& input_rect); // Helper structure for tiling a shader that has several input SkImages. // In order for a shader executing in an accelerated context to sample // from an SkImage, the SkImage must be upload-able to a texture. If // an SkImage is too large to fit in a texture, then the draw call using // the shader must be chopped multiple tiled draw calls. class SK_API Tiling { … }; } // namespace skia #endif // SKIA_EXT_GEOMETRY_H_