| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 | 5 |
| 6 #ifndef CCLayerQuad_h | 6 #ifndef CCLayerQuad_h |
| 7 #define CCLayerQuad_h | 7 #define CCLayerQuad_h |
| 8 | 8 |
| 9 #if USE(ACCELERATED_COMPOSITING) | 9 #if USE(ACCELERATED_COMPOSITING) |
| 10 | 10 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 (y() * e.z() - e.y() * z()) / (x() * e.y() - e.x() * y()), | 68 (y() * e.z() - e.y() * z()) / (x() * e.y() - e.x() * y()), |
| 69 (x() * e.z() - e.x() * z()) / (e.x() * y() - x() * e.y())); | 69 (x() * e.z() - e.x() * z()) / (e.x() * y() - x() * e.y())); |
| 70 } | 70 } |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 float m_x; | 73 float m_x; |
| 74 float m_y; | 74 float m_y; |
| 75 float m_z; | 75 float m_z; |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 CCLayerQuad(const Edge& left, const Edge& top, const Edge& right, const Edge
& bottom) | 78 CCLayerQuad(const Edge& left, const Edge& top, const Edge& right, const Edge
& bottom); |
| 79 : m_left(left) | |
| 80 , m_top(top) | |
| 81 , m_right(right) | |
| 82 , m_bottom(bottom) | |
| 83 { | |
| 84 } | |
| 85 CCLayerQuad(const FloatQuad&); | 79 CCLayerQuad(const FloatQuad&); |
| 86 | 80 |
| 87 Edge left() const { return m_left; } | 81 Edge left() const { return m_left; } |
| 88 Edge top() const { return m_top; } | 82 Edge top() const { return m_top; } |
| 89 Edge right() const { return m_right; } | 83 Edge right() const { return m_right; } |
| 90 Edge bottom() const { return m_bottom; } | 84 Edge bottom() const { return m_bottom; } |
| 91 | 85 |
| 92 void inflateX(float dx) { m_left.moveZ(dx); m_right.moveZ(dx); } | 86 void inflateX(float dx) { m_left.moveZ(dx); m_right.moveZ(dx); } |
| 93 void inflateY(float dy) { m_top.moveZ(dy); m_bottom.moveZ(dy); } | 87 void inflateY(float dy) { m_top.moveZ(dy); m_bottom.moveZ(dy); } |
| 94 void inflate(float d) { inflateX(d); inflateY(d); } | 88 void inflate(float d) { inflateX(d); inflateY(d); } |
| 95 void inflateAntiAliasingDistance() { inflate(kAntiAliasingInflateDistance);
} | 89 void inflateAntiAliasingDistance() { inflate(kAntiAliasingInflateDistance);
} |
| 96 | 90 |
| 97 FloatQuad floatQuad() const; | 91 FloatQuad floatQuad() const; |
| 98 | 92 |
| 99 void toFloatArray(float[12]) const; | 93 void toFloatArray(float[12]) const; |
| 100 | 94 |
| 101 private: | 95 private: |
| 102 Edge m_left; | 96 Edge m_left; |
| 103 Edge m_top; | 97 Edge m_top; |
| 104 Edge m_right; | 98 Edge m_right; |
| 105 Edge m_bottom; | 99 Edge m_bottom; |
| 106 }; | 100 }; |
| 107 | 101 |
| 108 } | 102 } |
| 109 | 103 |
| 110 #endif // USE(ACCELERATED_COMPOSITING) | 104 #endif // USE(ACCELERATED_COMPOSITING) |
| 111 | 105 |
| 112 #endif | 106 #endif |
| OLD | NEW |