// Copyright 2016 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifdef UNSAFE_BUFFERS_BUILD // TODO(crbug.com/351564777): Remove this and convert code to safer constructs. #pragma allow_unsafe_buffers #endif #include "cc/tiles/mipmap_util.h" #include <limits> #include "testing/gtest/include/gtest/gtest.h" #include "ui/gfx/geometry/test/geometry_util.h" namespace cc { namespace { // Ensures that a basic scale works. TEST(MipMapUtilTest, Basic) { … } // Ensures that a no-op scale works. TEST(MipMapUtilTest, NoScale) { … } // Ensures that we return the base mip level if the caller requests an upscale. TEST(MipMapUtilTest, Upscale) { … } // Ensures that the maximum mip level GetLevelForSize will ever return is 30. TEST(MipMapUtilTest, MaxMipLevel) { … } // Ensures that we handle mips of a non-square image correctly (the smaller side // should never be smaller than 1). TEST(MipMapUtilTest, NonSquare) { … } // Ensures that we handle rounding images correctly. TEST(MipMapUtilTest, Rounding) { … } // Ensures that we round up during mip calculation. TEST(MipMapUtilTest, RoundUp) { … } } // namespace } // namespace cc