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

Side by Side Diff: cc/layer_impl.h

Issue 12552004: Support bottom-right anchored fixed-position elements during a pinch gesture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reupload the same thing Created 7 years, 9 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 // 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 void setOpacity(float); 145 void setOpacity(float);
146 float opacity() const; 146 float opacity() const;
147 bool opacityIsAnimating() const; 147 bool opacityIsAnimating() const;
148 148
149 void setPosition(const gfx::PointF&); 149 void setPosition(const gfx::PointF&);
150 const gfx::PointF& position() const { return m_position; } 150 const gfx::PointF& position() const { return m_position; }
151 151
152 void setIsContainerForFixedPositionLayers(bool isContainerForFixedPositionLa yers) { m_isContainerForFixedPositionLayers = isContainerForFixedPositionLayers; } 152 void setIsContainerForFixedPositionLayers(bool isContainerForFixedPositionLa yers) { m_isContainerForFixedPositionLayers = isContainerForFixedPositionLayers; }
153 bool isContainerForFixedPositionLayers() const { return m_isContainerForFixe dPositionLayers; } 153 bool isContainerForFixedPositionLayers() const { return m_isContainerForFixe dPositionLayers; }
154 154
155 void setFixedContainerSizeDelta(const gfx::Vector2dF& fixedContainerSizeDelt a) { m_fixedContainerSizeDelta = fixedContainerSizeDelta; }
156 const gfx::Vector2dF& fixedContainerSizeDelta() const { return m_fixedContai nerSizeDelta; }
157
155 void setFixedToContainerLayer(bool fixedToContainerLayer = true) { m_fixedTo ContainerLayer = fixedToContainerLayer;} 158 void setFixedToContainerLayer(bool fixedToContainerLayer = true) { m_fixedTo ContainerLayer = fixedToContainerLayer;}
156 bool fixedToContainerLayer() const { return m_fixedToContainerLayer; } 159 bool fixedToContainerLayer() const { return m_fixedToContainerLayer; }
157 160
161 void setFixedToRightEdge(bool fixedToRightEdge) { m_fixedToRightEdge = fixed ToRightEdge; }
162 bool fixedToRightEdge() const { return m_fixedToRightEdge; }
163
164 void setFixedToBottomEdge(bool fixedToBottomEdge) { m_fixedToBottomEdge = fi xedToBottomEdge; }
165 bool fixedToBottomEdge() const { return m_fixedToBottomEdge; }
166
158 void setPreserves3D(bool); 167 void setPreserves3D(bool);
159 bool preserves3D() const { return m_preserves3D; } 168 bool preserves3D() const { return m_preserves3D; }
160 169
161 void setUseParentBackfaceVisibility(bool useParentBackfaceVisibility) { m_us eParentBackfaceVisibility = useParentBackfaceVisibility; } 170 void setUseParentBackfaceVisibility(bool useParentBackfaceVisibility) { m_us eParentBackfaceVisibility = useParentBackfaceVisibility; }
162 bool useParentBackfaceVisibility() const { return m_useParentBackfaceVisibil ity; } 171 bool useParentBackfaceVisibility() const { return m_useParentBackfaceVisibil ity; }
163 172
164 void setSublayerTransform(const gfx::Transform&); 173 void setSublayerTransform(const gfx::Transform&);
165 const gfx::Transform& sublayerTransform() const { return m_sublayerTransform ; } 174 const gfx::Transform& sublayerTransform() const { return m_sublayerTransform ; }
166 175
167 // Debug layer name. 176 // Debug layer name.
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 bool m_useParentBackfaceVisibility; 391 bool m_useParentBackfaceVisibility;
383 bool m_drawCheckerboardForMissingTiles; 392 bool m_drawCheckerboardForMissingTiles;
384 gfx::Transform m_sublayerTransform; 393 gfx::Transform m_sublayerTransform;
385 gfx::Transform m_transform; 394 gfx::Transform m_transform;
386 395
387 bool m_drawsContent; 396 bool m_drawsContent;
388 bool m_forceRenderSurface; 397 bool m_forceRenderSurface;
389 398
390 // Set for the layer that other layers are fixed to. 399 // Set for the layer that other layers are fixed to.
391 bool m_isContainerForFixedPositionLayers; 400 bool m_isContainerForFixedPositionLayers;
401 // This property is effective when m_isContainerForFixedPositionLayers == tr ue,
402 // Currently the only fixed container that resizes is the main frame
shawnsingh 2013/03/07 09:57:06 I imagine that it will be easy to overlook updatin
403 // scroll layer during a pinch gesture.
404 gfx::Vector2dF m_fixedContainerSizeDelta;
392 // This is true if the layer should be fixed to the closest ancestor contain er. 405 // This is true if the layer should be fixed to the closest ancestor contain er.
393 bool m_fixedToContainerLayer; 406 bool m_fixedToContainerLayer;
407 // These two properties are effective when m_fixedToContainerLayer == true,
408 // and only make sense if its fixed container resizes itself.
409 bool m_fixedToRightEdge;
410 bool m_fixedToBottomEdge;
394 411
395 gfx::Vector2dF m_scrollDelta; 412 gfx::Vector2dF m_scrollDelta;
396 gfx::Vector2d m_sentScrollDelta; 413 gfx::Vector2d m_sentScrollDelta;
397 gfx::Vector2d m_maxScrollOffset; 414 gfx::Vector2d m_maxScrollOffset;
398 gfx::Transform m_implTransform; 415 gfx::Transform m_implTransform;
399 gfx::Vector2dF m_lastScrollOffset; 416 gfx::Vector2dF m_lastScrollOffset;
400 417
401 // The global depth value of the center of the layer. This value is used 418 // The global depth value of the center of the layer. This value is used
402 // to sort layers from back to front. 419 // to sort layers from back to front.
403 float m_drawDepth; 420 float m_drawDepth;
(...skipping 28 matching lines...) Expand all
432 // Group of properties that need to be computed based on the layer tree 449 // Group of properties that need to be computed based on the layer tree
433 // hierarchy before layers can be drawn. 450 // hierarchy before layers can be drawn.
434 DrawProperties<LayerImpl, RenderSurfaceImpl> m_drawProperties; 451 DrawProperties<LayerImpl, RenderSurfaceImpl> m_drawProperties;
435 452
436 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 453 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
437 }; 454 };
438 455
439 } 456 }
440 457
441 #endif // CC_LAYER_IMPL_H_ 458 #endif // CC_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698