Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: cc/render_surface.cc

Issue 11308153: Migrate most of cc/ from WebKit::WebTransformationMatrix to gfx::Transform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased to tip of tree and addressed feedback Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/render_surface.h" 5 #include "cc/render_surface.h"
6 6
7 #include "cc/layer.h" 7 #include "cc/layer.h"
8 #include "cc/math_util.h" 8 #include "cc/math_util.h"
9 #include <public/WebTransformationMatrix.h> 9 #include "ui/gfx/transform.h"
10 10
11 using WebKit::WebTransformationMatrix; 11 using gfx::Transform;
12 12
13 namespace cc { 13 namespace cc {
14 14
15 RenderSurface::RenderSurface(Layer* owningLayer) 15 RenderSurface::RenderSurface(Layer* owningLayer)
16 : m_owningLayer(owningLayer) 16 : m_owningLayer(owningLayer)
17 , m_drawOpacity(1) 17 , m_drawOpacity(1)
18 , m_drawOpacityIsAnimating(false) 18 , m_drawOpacityIsAnimating(false)
19 , m_targetSurfaceTransformsAreAnimating(false) 19 , m_targetSurfaceTransformsAreAnimating(false)
20 , m_screenSpaceTransformsAreAnimating(false) 20 , m_screenSpaceTransformsAreAnimating(false)
21 , m_isClipped(false) 21 , m_isClipped(false)
22 , m_nearestAncestorThatMovesPixels(0) 22 , m_nearestAncestorThatMovesPixels(0)
23 { 23 {
24 } 24 }
25 25
26 RenderSurface::~RenderSurface() 26 RenderSurface::~RenderSurface()
27 { 27 {
28 } 28 }
29 29
30 gfx::RectF RenderSurface::drawableContentRect() const 30 gfx::RectF RenderSurface::drawableContentRect() const
31 { 31 {
32 gfx::RectF drawableContentRect = MathUtil::mapClippedRect(m_drawTransform, m _contentRect); 32 gfx::RectF drawableContentRect = MathUtil::mapClippedRect(m_drawTransform, m _contentRect);
33 if (m_owningLayer->hasReplica()) 33 if (m_owningLayer->hasReplica())
34 drawableContentRect.Union(MathUtil::mapClippedRect(m_replicaDrawTransfor m, m_contentRect)); 34 drawableContentRect.Union(MathUtil::mapClippedRect(m_replicaDrawTransfor m, m_contentRect));
35 return drawableContentRect; 35 return drawableContentRect;
36 } 36 }
37 37
38 } // namespace cc 38 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698