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

Side by Side Diff: Source/WebCore/platform/graphics/transforms/TransformState.h

Issue 11880024: Merge 139479 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 11 months 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) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 , m_mapPoint(false) 66 , m_mapPoint(false)
67 , m_mapQuad(true) 67 , m_mapQuad(true)
68 , m_direction(mappingDirection) 68 , m_direction(mappingDirection)
69 { 69 {
70 } 70 }
71 71
72 TransformState(const TransformState& other) { *this = other; } 72 TransformState(const TransformState& other) { *this = other; }
73 73
74 TransformState& operator=(const TransformState&); 74 TransformState& operator=(const TransformState&);
75 75
76 void setQuad(const FloatQuad& quad) { m_lastPlanarQuad = quad; } 76 void setQuad(const FloatQuad& quad)
77 {
78 // FIXME: this assumes that the quad being added is in the coordinate sy stem of the current state.
79 // This breaks if we're simultaneously mapping a point. https://bugs.web kit.org/show_bug.cgi?id=106680
80 ASSERT(!m_mapPoint);
81 m_accumulatedOffset = LayoutSize();
82 m_lastPlanarQuad = quad;
83 }
77 84
78 void move(LayoutUnit x, LayoutUnit y, TransformAccumulation accumulate = Fla ttenTransform) 85 void move(LayoutUnit x, LayoutUnit y, TransformAccumulation accumulate = Fla ttenTransform)
79 { 86 {
80 move(LayoutSize(x, y), accumulate); 87 move(LayoutSize(x, y), accumulate);
81 } 88 }
82 89
83 void move(const LayoutSize&, TransformAccumulation = FlattenTransform); 90 void move(const LayoutSize&, TransformAccumulation = FlattenTransform);
84 void applyTransform(const AffineTransform& transformFromContainer, Transform Accumulation = FlattenTransform, bool* wasClamped = 0); 91 void applyTransform(const AffineTransform& transformFromContainer, Transform Accumulation = FlattenTransform, bool* wasClamped = 0);
85 void applyTransform(const TransformationMatrix& transformFromContainer, Tran sformAccumulation = FlattenTransform, bool* wasClamped = 0); 92 void applyTransform(const TransformationMatrix& transformFromContainer, Tran sformAccumulation = FlattenTransform, bool* wasClamped = 0);
86 void flatten(bool* wasClamped = 0); 93 void flatten(bool* wasClamped = 0);
(...skipping 19 matching lines...) Expand all
106 OwnPtr<TransformationMatrix> m_accumulatedTransform; 113 OwnPtr<TransformationMatrix> m_accumulatedTransform;
107 LayoutSize m_accumulatedOffset; 114 LayoutSize m_accumulatedOffset;
108 bool m_accumulatingTransform; 115 bool m_accumulatingTransform;
109 bool m_mapPoint, m_mapQuad; 116 bool m_mapPoint, m_mapQuad;
110 TransformDirection m_direction; 117 TransformDirection m_direction;
111 }; 118 };
112 119
113 } // namespace WebCore 120 } // namespace WebCore
114 121
115 #endif // TransformState_h 122 #endif // TransformState_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698