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

Side by Side Diff: Source/core/rendering/RenderLayerBacking.h

Issue 13462003: Add support for accelerated fixed root background (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@background-attachment-fixed2
Patch Set: . Created 7 years, 5 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
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | Source/core/rendering/RenderLayerBacking.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 GraphicsLayer* graphicsLayer() const { return m_graphicsLayer.get(); } 78 GraphicsLayer* graphicsLayer() const { return m_graphicsLayer.get(); }
79 79
80 // Layer to clip children 80 // Layer to clip children
81 bool hasClippingLayer() const { return m_childContainmentLayer; } 81 bool hasClippingLayer() const { return m_childContainmentLayer; }
82 GraphicsLayer* clippingLayer() const { return m_childContainmentLayer.get(); } 82 GraphicsLayer* clippingLayer() const { return m_childContainmentLayer.get(); }
83 83
84 // Layer to get clipped by ancestor 84 // Layer to get clipped by ancestor
85 bool hasAncestorClippingLayer() const { return m_ancestorClippingLayer != 0; } 85 bool hasAncestorClippingLayer() const { return m_ancestorClippingLayer != 0; }
86 GraphicsLayer* ancestorClippingLayer() const { return m_ancestorClippingLaye r.get(); } 86 GraphicsLayer* ancestorClippingLayer() const { return m_ancestorClippingLaye r.get(); }
87 87
88 GraphicsLayer* contentsContainmentLayer() const { return m_contentsContainme ntLayer.get(); }
89
90 bool hasContentsLayer() const { return m_foregroundLayer != 0; } 88 bool hasContentsLayer() const { return m_foregroundLayer != 0; }
91 GraphicsLayer* foregroundLayer() const { return m_foregroundLayer.get(); } 89 GraphicsLayer* foregroundLayer() const { return m_foregroundLayer.get(); }
92 90
93 GraphicsLayer* backgroundLayer() const { return m_backgroundLayer.get(); } 91 GraphicsLayer* backgroundLayer() const { return m_backgroundLayer.get(); }
94 bool backgroundLayerPaintsFixedRootBackground() const { return m_backgroundL ayerPaintsFixedRootBackground; } 92 bool backgroundLayerPaintsFixedRootBackground() const { return m_backgroundL ayerPaintsFixedRootBackground; }
95 93
96 bool hasScrollingLayer() const { return m_scrollingLayer; } 94 bool hasScrollingLayer() const { return m_scrollingLayer; }
97 GraphicsLayer* scrollingLayer() const { return m_scrollingLayer.get(); } 95 GraphicsLayer* scrollingLayer() const { return m_scrollingLayer.get(); }
98 GraphicsLayer* scrollingContentsLayer() const { return m_scrollingContentsLa yer.get(); } 96 GraphicsLayer* scrollingContentsLayer() const { return m_scrollingContentsLa yer.get(); }
99 97
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 bool updateForegroundLayer(bool needsForegroundLayer); 183 bool updateForegroundLayer(bool needsForegroundLayer);
186 bool updateBackgroundLayer(bool needsBackgroundLayer); 184 bool updateBackgroundLayer(bool needsBackgroundLayer);
187 bool updateMaskLayer(bool needsMaskLayer); 185 bool updateMaskLayer(bool needsMaskLayer);
188 bool requiresHorizontalScrollbarLayer() const { return m_owningLayer->horizo ntalScrollbar(); } 186 bool requiresHorizontalScrollbarLayer() const { return m_owningLayer->horizo ntalScrollbar(); }
189 bool requiresVerticalScrollbarLayer() const { return m_owningLayer->vertical Scrollbar(); } 187 bool requiresVerticalScrollbarLayer() const { return m_owningLayer->vertical Scrollbar(); }
190 bool requiresScrollCornerLayer() const { return !m_owningLayer->scrollCorner AndResizerRect().isEmpty(); } 188 bool requiresScrollCornerLayer() const { return !m_owningLayer->scrollCorner AndResizerRect().isEmpty(); }
191 bool updateScrollingLayers(bool scrollingLayers); 189 bool updateScrollingLayers(bool scrollingLayers);
192 void updateDrawsContent(bool isSimpleContainer); 190 void updateDrawsContent(bool isSimpleContainer);
193 void registerScrollingLayers(); 191 void registerScrollingLayers();
194 192
195 void updateRootLayerConfiguration();
196
197 void setBackgroundLayerPaintsFixedRootBackground(bool); 193 void setBackgroundLayerPaintsFixedRootBackground(bool);
198 194
199 GraphicsLayerPaintingPhase paintingPhaseForPrimaryLayer() const; 195 GraphicsLayerPaintingPhase paintingPhaseForPrimaryLayer() const;
200 196
201 IntSize contentOffsetInCompostingLayer() const; 197 IntSize contentOffsetInCompostingLayer() const;
202 // Result is transform origin in pixels. 198 // Result is transform origin in pixels.
203 FloatPoint3D computeTransformOrigin(const IntRect& borderBox) const; 199 FloatPoint3D computeTransformOrigin(const IntRect& borderBox) const;
204 // Result is perspective origin in pixels. 200 // Result is perspective origin in pixels.
205 FloatPoint computePerspectiveOrigin(const IntRect& borderBox) const; 201 FloatPoint computePerspectiveOrigin(const IntRect& borderBox) const;
206 202
(...skipping 27 matching lines...) Expand all
234 bool shouldClipCompositedBounds() const; 230 bool shouldClipCompositedBounds() const;
235 231
236 void paintIntoLayer(const GraphicsLayer*, GraphicsContext*, const IntRect& p aintDirtyRect, PaintBehavior, GraphicsLayerPaintingPhase); 232 void paintIntoLayer(const GraphicsLayer*, GraphicsContext*, const IntRect& p aintDirtyRect, PaintBehavior, GraphicsLayerPaintingPhase);
237 233
238 static CSSPropertyID graphicsLayerToCSSProperty(AnimatedPropertyID); 234 static CSSPropertyID graphicsLayerToCSSProperty(AnimatedPropertyID);
239 static AnimatedPropertyID cssToGraphicsLayerProperty(CSSPropertyID); 235 static AnimatedPropertyID cssToGraphicsLayerProperty(CSSPropertyID);
240 236
241 RenderLayer* m_owningLayer; 237 RenderLayer* m_owningLayer;
242 238
243 OwnPtr<GraphicsLayer> m_ancestorClippingLayer; // Only used if we are clippe d by an ancestor which is not a stacking context. 239 OwnPtr<GraphicsLayer> m_ancestorClippingLayer; // Only used if we are clippe d by an ancestor which is not a stacking context.
244 OwnPtr<GraphicsLayer> m_contentsContainmentLayer; // Only used if we have a background layer; takes the transform.
245 OwnPtr<GraphicsLayer> m_graphicsLayer; 240 OwnPtr<GraphicsLayer> m_graphicsLayer;
246 OwnPtr<GraphicsLayer> m_foregroundLayer; // Only used in cases where we need to draw the foreground separately. 241 OwnPtr<GraphicsLayer> m_foregroundLayer; // Only used in cases where we need to draw the foreground separately.
247 OwnPtr<GraphicsLayer> m_backgroundLayer; // Only used in cases where we need to draw the background separately. 242 OwnPtr<GraphicsLayer> m_backgroundLayer; // Only used in cases where we need to draw the background separately.
248 OwnPtr<GraphicsLayer> m_childContainmentLayer; // Only used if we have clipp ing on a stacking context with compositing children, or if the layer has a tile cache. 243 OwnPtr<GraphicsLayer> m_childContainmentLayer; // Only used if we have clipp ing on a stacking context with compositing children, or if the layer has a tile cache.
249 OwnPtr<GraphicsLayer> m_maskLayer; // Only used if we have a mask. 244 OwnPtr<GraphicsLayer> m_maskLayer; // Only used if we have a mask.
250 245
251 OwnPtr<GraphicsLayer> m_layerForHorizontalScrollbar; 246 OwnPtr<GraphicsLayer> m_layerForHorizontalScrollbar;
252 OwnPtr<GraphicsLayer> m_layerForVerticalScrollbar; 247 OwnPtr<GraphicsLayer> m_layerForVerticalScrollbar;
253 OwnPtr<GraphicsLayer> m_layerForScrollCorner; 248 OwnPtr<GraphicsLayer> m_layerForScrollCorner;
254 249
255 OwnPtr<GraphicsLayer> m_scrollingLayer; // Only used if the layer is using c omposited scrolling. 250 OwnPtr<GraphicsLayer> m_scrollingLayer; // Only used if the layer is using c omposited scrolling.
256 OwnPtr<GraphicsLayer> m_scrollingContentsLayer; // Only used if the layer is using composited scrolling. 251 OwnPtr<GraphicsLayer> m_scrollingContentsLayer; // Only used if the layer is using composited scrolling.
257 252
258 uint64_t m_scrollLayerID; 253 uint64_t m_scrollLayerID;
259 254
260 IntRect m_compositedBounds; 255 IntRect m_compositedBounds;
261 256
262 bool m_artificiallyInflatedBounds; // bounds had to be made non-zero to make transform-origin work 257 bool m_artificiallyInflatedBounds; // bounds had to be made non-zero to make transform-origin work
263 bool m_boundsConstrainedByClipping; 258 bool m_boundsConstrainedByClipping;
264 bool m_isMainFrameRenderViewLayer; 259 bool m_isMainFrameRenderViewLayer;
265 bool m_requiresOwnBackingStore; 260 bool m_requiresOwnBackingStore;
266 bool m_canCompositeFilters; 261 bool m_canCompositeFilters;
267 bool m_backgroundLayerPaintsFixedRootBackground; 262 bool m_backgroundLayerPaintsFixedRootBackground;
268 }; 263 };
269 264
270 } // namespace WebCore 265 } // namespace WebCore
271 266
272 #endif // RenderLayerBacking_h 267 #endif // RenderLayerBacking_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | Source/core/rendering/RenderLayerBacking.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698