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 #ifndef CC_LAYER_IMPL_H_ | 5 #ifndef CC_LAYER_IMPL_H_ |
6 #define CC_LAYER_IMPL_H_ | 6 #define CC_LAYER_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 void setBounds(const gfx::Size&); | 191 void setBounds(const gfx::Size&); |
192 const gfx::Size& bounds() const { return m_bounds; } | 192 const gfx::Size& bounds() const { return m_bounds; } |
193 | 193 |
194 void setContentBounds(const gfx::Size&); | 194 void setContentBounds(const gfx::Size&); |
195 gfx::Size contentBounds() const { return m_drawProperties.content_bounds; } | 195 gfx::Size contentBounds() const { return m_drawProperties.content_bounds; } |
196 | 196 |
197 float contentsScaleX() const { return m_drawProperties.contents_scale_x; } | 197 float contentsScaleX() const { return m_drawProperties.contents_scale_x; } |
198 float contentsScaleY() const { return m_drawProperties.contents_scale_y; } | 198 float contentsScaleY() const { return m_drawProperties.contents_scale_y; } |
199 void setContentsScale(float contentsScaleX, float contentsScaleY); | 199 void setContentsScale(float contentsScaleX, float contentsScaleY); |
200 | 200 |
| 201 virtual void calculateContentsScale( |
| 202 float idealContentsScale, |
| 203 float* contentsScaleX, |
| 204 float* contentsScaleY, |
| 205 gfx::Size* contentBounds); |
| 206 |
201 gfx::Vector2d scrollOffset() const { return m_scrollOffset; } | 207 gfx::Vector2d scrollOffset() const { return m_scrollOffset; } |
202 void setScrollOffset(gfx::Vector2d); | 208 void setScrollOffset(gfx::Vector2d); |
203 | 209 |
204 gfx::Vector2d maxScrollOffset() const {return m_maxScrollOffset; } | 210 gfx::Vector2d maxScrollOffset() const {return m_maxScrollOffset; } |
205 void setMaxScrollOffset(gfx::Vector2d); | 211 void setMaxScrollOffset(gfx::Vector2d); |
206 | 212 |
207 const gfx::Vector2dF& scrollDelta() const { return m_scrollDelta; } | 213 const gfx::Vector2dF& scrollDelta() const { return m_scrollDelta; } |
208 void setScrollDelta(const gfx::Vector2dF&); | 214 void setScrollDelta(const gfx::Vector2dF&); |
209 | 215 |
210 const gfx::Transform& implTransform() const { return m_implTransform; } | 216 const gfx::Transform& implTransform() const { return m_implTransform; } |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 // Group of properties that need to be computed based on the layer tree | 404 // Group of properties that need to be computed based on the layer tree |
399 // hierarchy before layers can be drawn. | 405 // hierarchy before layers can be drawn. |
400 DrawProperties<LayerImpl, RenderSurfaceImpl> m_drawProperties; | 406 DrawProperties<LayerImpl, RenderSurfaceImpl> m_drawProperties; |
401 | 407 |
402 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 408 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
403 }; | 409 }; |
404 | 410 |
405 } | 411 } |
406 | 412 |
407 #endif // CC_LAYER_IMPL_H_ | 413 #endif // CC_LAYER_IMPL_H_ |
OLD | NEW |