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

Side by Side Diff: third_party/WebKit/Source/platform/transforms/TranslateTransformOperation.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
« no previous file with comments | « third_party/WebKit/Source/platform/transforms/TransformOperations.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 static bool isMatchingOperationType(OperationType type) { 68 static bool isMatchingOperationType(OperationType type) {
69 return type == Translate || type == TranslateX || type == TranslateY || 69 return type == Translate || type == TranslateX || type == TranslateY ||
70 type == TranslateZ || type == Translate3D; 70 type == TranslateZ || type == Translate3D;
71 } 71 }
72 72
73 PassRefPtr<TranslateTransformOperation> zoomTranslate(double factor); 73 PassRefPtr<TranslateTransformOperation> zoomTranslate(double factor);
74 74
75 private: 75 private:
76 OperationType type() const override { return m_type; } 76 OperationType type() const override { return m_type; }
77 OperationType primitiveType() const final { return Translate3D; }
77 78
78 bool operator==(const TransformOperation& o) const override { 79 bool operator==(const TransformOperation& o) const override {
79 if (!isSameType(o)) 80 if (!isSameType(o))
80 return false; 81 return false;
81 const TranslateTransformOperation* t = 82 const TranslateTransformOperation* t =
82 static_cast<const TranslateTransformOperation*>(&o); 83 static_cast<const TranslateTransformOperation*>(&o);
83 return m_x == t->m_x && m_y == t->m_y && m_z == t->m_z; 84 return m_x == t->m_x && m_y == t->m_y && m_z == t->m_z;
84 } 85 }
85 86
86 PassRefPtr<TransformOperation> blend(const TransformOperation* from, 87 PassRefPtr<TransformOperation> blend(const TransformOperation* from,
(...skipping 19 matching lines...) Expand all
106 Length m_y; 107 Length m_y;
107 double m_z; 108 double m_z;
108 OperationType m_type; 109 OperationType m_type;
109 }; 110 };
110 111
111 DEFINE_TRANSFORM_TYPE_CASTS(TranslateTransformOperation); 112 DEFINE_TRANSFORM_TYPE_CASTS(TranslateTransformOperation);
112 113
113 } // namespace blink 114 } // namespace blink
114 115
115 #endif // TranslateTransformOperation_h 116 #endif // TranslateTransformOperation_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/transforms/TransformOperations.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698