#include "cc/layers/tile_size_calculator.h"
#include <algorithm>
#include "cc/base/math_util.h"
#include "cc/layers/picture_layer_impl.h"
#include "cc/trees/layer_tree_impl.h"
#include "ui/base/ui_base_features.h"
namespace cc {
namespace {
const int kTileRoundUp = …;
const int kGpuDefaultTileRoundUp = …;
const int kTileMinimalAlignment = …;
gfx::Size ApplyDsfAdjustment(const gfx::Size& device_pixels_size, float dsf) { … }
gfx::Size AdjustGpuTileSize(int tile_width,
int tile_height,
const gfx::Size& max_tile_size,
int min_height_for_gpu_raster_tile) { … }
gfx::Size CalculateGpuTileSize(const gfx::Size& base_tile_size,
const gfx::Size& content_bounds,
const gfx::Size& max_tile_size,
int min_height_for_gpu_raster_tile) { … }
gfx::Size CalculateGpuRawDrawTileSize(const gfx::Size& base_tile_size,
const gfx::Size& content_bounds,
const gfx::Size& max_tile_size,
int min_height_for_gpu_raster_tile,
double raw_draw_tile_size_factor) { … }
}
bool TileSizeCalculator::AffectingParams::operator==(
const AffectingParams& other) const = default;
TileSizeCalculator::TileSizeCalculator(PictureLayerImpl* layer_impl)
: … { … }
bool TileSizeCalculator::UpdateAffectingParams(gfx::Size content_bounds) { … }
TileSizeCalculator::AffectingParams TileSizeCalculator::GetAffectingParams(
gfx::Size content_bounds) const { … }
gfx::Size TileSizeCalculator::CalculateTileSize(gfx::Size content_bounds) { … }
}