summaryrefslogtreecommitdiffstats
path: root/cc/layers/layer_utils.h
blob: bef37f4c7c651baee6de0cce694cb6ec1cfc3480 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// 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_LAYERS_LAYER_UTILS_H_
#define CC_LAYERS_LAYER_UTILS_H_

#include "cc/base/cc_export.h"

namespace gfx {
class BoxF;
}  // namespace gfx

namespace cc {
class LayerImpl;

class CC_EXPORT LayerUtils {
 public:
  // Computes a box in screen space that should entirely contain the layer's
  // bounds through the entirety of the layer's current animation. Returns
  // true and sets |out| to the inflation if there are animations that can
  // inflate bounds in the path to the root layer and that it was able to
  // inflate correctly. Returns false otherwise.
  static bool GetAnimationBounds(const LayerImpl& layer, gfx::BoxF* out);
};

}  // namespace cc

#endif  // CC_LAYERS_LAYER_UTILS_H_