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

Side by Side Diff: third_party/WebKit/Source/platform/transforms/RotateTransformOperation.h

Issue 2519333004: Don't use post multiplication on transforms with compatible pairs of operations (Closed)
Patch Set: Rename Created 4 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 const FloatPoint3D& axis() const { return m_rotation.axis; } 59 const FloatPoint3D& axis() const { return m_rotation.axis; }
60 60
61 static bool getCommonAxis(const RotateTransformOperation*, 61 static bool getCommonAxis(const RotateTransformOperation*,
62 const RotateTransformOperation*, 62 const RotateTransformOperation*,
63 FloatPoint3D& resultAxis, 63 FloatPoint3D& resultAxis,
64 double& resultAngleA, 64 double& resultAngleA,
65 double& resultAngleB); 65 double& resultAngleB);
66 66
67 virtual bool canBlendWith(const TransformOperation& other) const; 67 virtual bool canBlendWith(const TransformOperation& other) const;
68 OperationType type() const override { return m_type; } 68 OperationType type() const override { return m_type; }
69 OperationType primitiveType() const final { return Rotate3D; }
69 70
70 void apply(TransformationMatrix& transform, 71 void apply(TransformationMatrix& transform,
71 const FloatSize& /*borderBoxSize*/) const override { 72 const FloatSize& /*borderBoxSize*/) const override {
72 transform.rotate3d(m_rotation); 73 transform.rotate3d(m_rotation);
73 } 74 }
74 75
75 static bool isMatchingOperationType(OperationType type) { 76 static bool isMatchingOperationType(OperationType type) {
76 return type == Rotate || type == RotateX || type == RotateY || 77 return type == Rotate || type == RotateX || type == RotateY ||
77 type == RotateZ || type == Rotate3D; 78 type == RotateZ || type == Rotate3D;
78 } 79 }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 125
125 double m_originX; 126 double m_originX;
126 double m_originY; 127 double m_originY;
127 }; 128 };
128 129
129 DEFINE_TRANSFORM_TYPE_CASTS(RotateAroundOriginTransformOperation); 130 DEFINE_TRANSFORM_TYPE_CASTS(RotateAroundOriginTransformOperation);
130 131
131 } // namespace blink 132 } // namespace blink
132 133
133 #endif // RotateTransformOperation_h 134 #endif // RotateTransformOperation_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698