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

Side by Side Diff: cc/layer_impl.h

Issue 11276060: Pass accurate contentsScale to LayerImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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
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 CCLayerImpl_h 5 #ifndef CCLayerImpl_h
6 #define CCLayerImpl_h 6 #define CCLayerImpl_h
7 7
8 #include "FloatRect.h" 8 #include "FloatRect.h"
9 #include "IntRect.h" 9 #include "IntRect.h"
10 #include "Region.h" 10 #include "Region.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 bool drawOpacityIsAnimating() const { return m_drawOpacityIsAnimating; } 164 bool drawOpacityIsAnimating() const { return m_drawOpacityIsAnimating; }
165 void setDrawOpacityIsAnimating(bool drawOpacityIsAnimating) { m_drawOpacityI sAnimating = drawOpacityIsAnimating; } 165 void setDrawOpacityIsAnimating(bool drawOpacityIsAnimating) { m_drawOpacityI sAnimating = drawOpacityIsAnimating; }
166 166
167 LayerImpl* renderTarget() const { DCHECK(!m_renderTarget || m_renderTarget-> renderSurface()); return m_renderTarget; } 167 LayerImpl* renderTarget() const { DCHECK(!m_renderTarget || m_renderTarget-> renderSurface()); return m_renderTarget; }
168 void setRenderTarget(LayerImpl* target) { m_renderTarget = target; } 168 void setRenderTarget(LayerImpl* target) { m_renderTarget = target; }
169 169
170 void setBounds(const IntSize&); 170 void setBounds(const IntSize&);
171 const IntSize& bounds() const { return m_bounds; } 171 const IntSize& bounds() const { return m_bounds; }
172 172
173 const IntSize& contentBounds() const { return m_contentBounds; } 173 IntSize contentBounds() const;
174 void setContentBounds(const IntSize&); 174
175 float contentsScaleX() const { return m_contentsScaleX; }
176 float contentsScaleY() const { return m_contentsScaleY; }
177 void setContentsScale(float contentsScaleX, float contentsScaleY);
175 178
176 const IntPoint& scrollPosition() const { return m_scrollPosition; } 179 const IntPoint& scrollPosition() const { return m_scrollPosition; }
177 void setScrollPosition(const IntPoint&); 180 void setScrollPosition(const IntPoint&);
178 181
179 const IntSize& maxScrollPosition() const {return m_maxScrollPosition; } 182 const IntSize& maxScrollPosition() const {return m_maxScrollPosition; }
180 void setMaxScrollPosition(const IntSize&); 183 void setMaxScrollPosition(const IntSize&);
181 184
182 const FloatSize& scrollDelta() const { return m_scrollDelta; } 185 const FloatSize& scrollDelta() const { return m_scrollDelta; }
183 void setScrollDelta(const FloatSize&); 186 void setScrollDelta(const FloatSize&);
184 187
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 int m_replicaLayerId; // ditto 296 int m_replicaLayerId; // ditto
294 scoped_ptr<LayerImpl> m_replicaLayer; 297 scoped_ptr<LayerImpl> m_replicaLayer;
295 int m_layerId; 298 int m_layerId;
296 LayerTreeHostImpl* m_layerTreeHostImpl; 299 LayerTreeHostImpl* m_layerTreeHostImpl;
297 300
298 // Properties synchronized from the associated Layer. 301 // Properties synchronized from the associated Layer.
299 FloatPoint m_anchorPoint; 302 FloatPoint m_anchorPoint;
300 float m_anchorPointZ; 303 float m_anchorPointZ;
301 IntSize m_bounds; 304 IntSize m_bounds;
302 IntSize m_contentBounds; 305 IntSize m_contentBounds;
306 float m_contentsScaleX;
307 float m_contentsScaleY;
303 IntPoint m_scrollPosition; 308 IntPoint m_scrollPosition;
304 bool m_scrollable; 309 bool m_scrollable;
305 bool m_shouldScrollOnMainThread; 310 bool m_shouldScrollOnMainThread;
306 bool m_haveWheelEventHandlers; 311 bool m_haveWheelEventHandlers;
307 Region m_nonFastScrollableRegion; 312 Region m_nonFastScrollableRegion;
308 SkColor m_backgroundColor; 313 SkColor m_backgroundColor;
309 314
310 // Whether the "back" of this layer should draw. 315 // Whether the "back" of this layer should draw.
311 bool m_doubleSided; 316 bool m_doubleSided;
312 317
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 399
395 // Manages scrollbars for this layer 400 // Manages scrollbars for this layer
396 scoped_ptr<ScrollbarAnimationController> m_scrollbarAnimationController; 401 scoped_ptr<ScrollbarAnimationController> m_scrollbarAnimationController;
397 }; 402 };
398 403
399 void sortLayers(std::vector<LayerImpl*>::iterator first, std::vector<LayerImpl*> ::iterator end, LayerSorter*); 404 void sortLayers(std::vector<LayerImpl*>::iterator first, std::vector<LayerImpl*> ::iterator end, LayerSorter*);
400 405
401 } 406 }
402 407
403 #endif // CCLayerImpl_h 408 #endif // CCLayerImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698