| Index: cc/test/layer_tree_host_common_test.h
|
| diff --git a/cc/test/layer_tree_host_common_test.h b/cc/test/layer_tree_host_common_test.h
|
| deleted file mode 100644
|
| index 37eafc2ff5ee20a5b083e5696abe0c31ce7fefae..0000000000000000000000000000000000000000
|
| --- a/cc/test/layer_tree_host_common_test.h
|
| +++ /dev/null
|
| @@ -1,131 +0,0 @@
|
| -// Copyright 2014 The Chromium Authors. All rights reserved.
|
| -// Use of this source code is governed by a BSD-style license that can be
|
| -// found in the LICENSE file.
|
| -
|
| -#ifndef CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_
|
| -#define CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_
|
| -
|
| -#include <algorithm>
|
| -#include <memory>
|
| -#include <vector>
|
| -
|
| -#include "cc/layers/layer_collections.h"
|
| -#include "cc/test/layer_test_common.h"
|
| -#include "cc/test/test_task_graph_runner.h"
|
| -#include "cc/trees/layer_tree_settings.h"
|
| -#include "cc/trees/property_tree.h"
|
| -#include "testing/gtest/include/gtest/gtest.h"
|
| -
|
| -namespace gfx {
|
| -class PointF;
|
| -class Point3F;
|
| -class Size;
|
| -class Transform;
|
| -}
|
| -
|
| -namespace cc {
|
| -
|
| -class Layer;
|
| -class LayerImpl;
|
| -
|
| -class LayerTreeHostCommonTestBase : public LayerTestCommon::LayerImplTest {
|
| - protected:
|
| - explicit LayerTreeHostCommonTestBase(const LayerTreeSettings& settings);
|
| - virtual ~LayerTreeHostCommonTestBase();
|
| -
|
| - void ExecuteCalculateDrawProperties(Layer* root_layer,
|
| - float device_scale_factor,
|
| - float page_scale_factor,
|
| - Layer* page_scale_application_layer);
|
| -
|
| - void ExecuteCalculateDrawProperties(LayerImpl* root_layer,
|
| - float device_scale_factor,
|
| - float page_scale_factor,
|
| - LayerImpl* page_scale_application_layer);
|
| -
|
| - template <class LayerType>
|
| - void ExecuteCalculateDrawProperties(LayerType* root_layer) {
|
| - LayerType* page_scale_application_layer = NULL;
|
| - ExecuteCalculateDrawProperties(root_layer, 1.f, 1.f,
|
| - page_scale_application_layer);
|
| - }
|
| -
|
| - template <class LayerType>
|
| - void ExecuteCalculateDrawProperties(LayerType* root_layer,
|
| - float device_scale_factor) {
|
| - LayerType* page_scale_application_layer = NULL;
|
| - ExecuteCalculateDrawProperties(root_layer, device_scale_factor, 1.f,
|
| - page_scale_application_layer);
|
| - }
|
| -
|
| - void ExecuteCalculateDrawPropertiesWithPropertyTrees(Layer* layer);
|
| - void ExecuteCalculateDrawPropertiesWithPropertyTrees(LayerImpl* layer);
|
| -
|
| - void ExecuteCalculateDrawPropertiesWithoutSeparateSurfaces(
|
| - LayerImpl* root_layer);
|
| -
|
| - LayerImplList* render_surface_layer_list_impl() const {
|
| - return render_surface_layer_list_impl_.get();
|
| - }
|
| -
|
| - LayerImplList* update_layer_list_impl() const {
|
| - return update_layer_list_impl_.get();
|
| - }
|
| - bool UpdateLayerListImplContains(int id) const {
|
| - return std::count_if(
|
| - update_layer_list_impl_->begin(), update_layer_list_impl_->end(),
|
| - [id](LayerImpl* layer) { return layer->id() == id; }) != 0;
|
| - }
|
| -
|
| - const LayerList& update_layer_list() const { return update_layer_list_; }
|
| - bool UpdateLayerListContains(int id) const;
|
| -
|
| - private:
|
| - std::unique_ptr<std::vector<LayerImpl*>> render_surface_layer_list_impl_;
|
| - LayerList update_layer_list_;
|
| - std::unique_ptr<LayerImplList> update_layer_list_impl_;
|
| -};
|
| -
|
| -class LayerTreeHostCommonTest : public LayerTreeHostCommonTestBase,
|
| - public testing::Test {
|
| - public:
|
| - LayerTreeHostCommonTest();
|
| - explicit LayerTreeHostCommonTest(const LayerTreeSettings& settings);
|
| -
|
| - protected:
|
| - static void SetScrollOffsetDelta(LayerImpl* layer_impl,
|
| - const gfx::Vector2dF& delta) {
|
| - if (layer_impl->layer_tree_impl()
|
| - ->property_trees()
|
| - ->scroll_tree.SetScrollOffsetDeltaForTesting(layer_impl->id(),
|
| - delta))
|
| - layer_impl->layer_tree_impl()->DidUpdateScrollOffset(
|
| - layer_impl->id(), layer_impl->transform_tree_index());
|
| - }
|
| -
|
| - static float GetMaximumAnimationScale(LayerImpl* layer_impl) {
|
| - return layer_impl->layer_tree_impl()
|
| - ->property_trees()
|
| - ->GetAnimationScales(layer_impl->transform_tree_index(),
|
| - layer_impl->layer_tree_impl())
|
| - .maximum_animation_scale;
|
| - }
|
| -
|
| - static float GetStartingAnimationScale(LayerImpl* layer_impl) {
|
| - return layer_impl->layer_tree_impl()
|
| - ->property_trees()
|
| - ->GetAnimationScales(layer_impl->transform_tree_index(),
|
| - layer_impl->layer_tree_impl())
|
| - .starting_animation_scale;
|
| - }
|
| -
|
| - LayerTreeSettings LayerTreeHostCommonTestSettings() {
|
| - LayerTreeSettings settings;
|
| - settings.verify_transform_tree_calculations = true;
|
| - return settings;
|
| - }
|
| -};
|
| -
|
| -} // namespace cc
|
| -
|
| -#endif // CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_
|
|
|