1 // Copyright 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "cc/render_surface.h"
8 #include "cc/math_util.h"
9 #include "ui/gfx/transform.h"
13 RenderSurface::RenderSurface(Layer
* owningLayer
)
14 : m_owningLayer(owningLayer
)
16 , m_drawOpacityIsAnimating(false)
17 , m_targetSurfaceTransformsAreAnimating(false)
18 , m_screenSpaceTransformsAreAnimating(false)
20 , m_nearestAncestorThatMovesPixels(0)
24 RenderSurface::~RenderSurface()
28 gfx::RectF
RenderSurface::drawableContentRect() const
30 gfx::RectF drawableContentRect
= MathUtil::mapClippedRect(m_drawTransform
, m_contentRect
);
31 if (m_owningLayer
->hasReplica())
32 drawableContentRect
.Union(MathUtil::mapClippedRect(m_replicaDrawTransform
, m_contentRect
));
33 return drawableContentRect
;