Depend on stored sync session GUID for Android.
[chromium-blink-merge.git] / cc / render_surface.cc
blob6465dcf64e0c847969f4e8a6f2f295bfd3fad7e3
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"
7 #include "cc/layer.h"
8 #include "cc/math_util.h"
9 #include "ui/gfx/transform.h"
11 namespace cc {
13 RenderSurface::RenderSurface(Layer* owningLayer)
14 : m_owningLayer(owningLayer)
15 , m_drawOpacity(1)
16 , m_drawOpacityIsAnimating(false)
17 , m_targetSurfaceTransformsAreAnimating(false)
18 , m_screenSpaceTransformsAreAnimating(false)
19 , m_isClipped(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;
36 } // namespace cc