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

Side by Side Diff: cc/layer_impl.h

Issue 11777008: cc: Use maximum tiling contents scales for picture layer scale (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ok, 1.f 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/layer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | cc/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698