#include "ui/views/paint_info.h"
#include <memory>
#include <vector>
#include "base/memory/ref_counted.h"
#include "cc/base/region.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/compositor/compositor_switches.h"
#include "ui/compositor/paint_context.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
namespace views {
namespace {
PaintInfos;
constexpr float DSF100 = …;
constexpr float DSF125 = …;
constexpr float DSF150 = …;
constexpr float DSF160 = …;
constexpr float DSF166 = …;
const std::vector<float> kDsfList = …;
constexpr gfx::Size kLayerSize(123, 456);
const gfx::Rect r_0(kLayerSize);
constexpr gfx::Rect r_1(0, 0, 123, 152);
constexpr gfx::Rect r_2(0, 152, 123, 152);
constexpr gfx::Rect r_3(0, 0, 41, 152);
constexpr gfx::Rect r_4(41, 0, 41, 152);
constexpr gfx::Rect r_5(82, 0, 41, 152);
constexpr gfx::Rect r_6(0, 304, 123, 152);
constexpr gfx::Rect r_7(0, 0, 82, 152);
constexpr gfx::Rect r_8(82, 0, 41, 152);
void VerifyChildBoundsCoversParent(const PaintInfo* parent_paint_info,
const std::vector<PaintInfo*>& info_list) { … }
void VerifyPixelCanvasCornerScaling(const PaintInfos& info_list) { … }
void VerifyPixelSizesAreSameAsDIPSize(const PaintInfos& info_list) { … }
}
class PaintInfoTest : public ::testing::Test { … };
TEST_F(PaintInfoTest, CornerScalingPixelCanvasEnabled) { … }
TEST_F(PaintInfoTest, ScalingWithPixelCanvasDisabled) { … }
TEST_F(PaintInfoTest, Invalidation) { … }
TEST_F(PaintInfoTest, LayerPaintInfo) { … }
}