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

Side by Side Diff: Source/core/rendering/compositing/CompositedLayerMapping.h

Issue 143283011: Make squashing work with subpixel layout (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make space conversions more explicit Created 6 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 | Annotate | Revision Log
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // A GraphicsLayerPaintInfo contains all the info needed to paint a partial subt ree of RenderLayers into a GraphicsLayer. 42 // A GraphicsLayerPaintInfo contains all the info needed to paint a partial subt ree of RenderLayers into a GraphicsLayer.
43 struct GraphicsLayerPaintInfo { 43 struct GraphicsLayerPaintInfo {
44 RenderLayer* renderLayer; 44 RenderLayer* renderLayer;
45 45
46 LayoutRect compositedBounds; 46 LayoutRect compositedBounds;
47 47
48 // At first, the m_squashingLayer's bounds/location are not known. The value offsetFromSquashingCLM is 48 // At first, the m_squashingLayer's bounds/location are not known. The value offsetFromSquashingCLM is
49 // an intermediate offset for a squashed RenderLayer, described with respect to the CompositedLayerMapping's 49 // an intermediate offset for a squashed RenderLayer, described with respect to the CompositedLayerMapping's
50 // owning layer that would eventually have the m_squashingLayer. Once the sh ared GraphicsLayer's bounds are 50 // owning layer that would eventually have the m_squashingLayer. Once the sh ared GraphicsLayer's bounds are
51 // known, then we can trivially convert this offset to m_squashingLayer's sp ace. 51 // known, then we can trivially convert this offset to m_squashingLayer's sp ace.
52 IntSize offsetFromSquashingCLM; 52 LayoutSize offsetFromSquashingCLM;
53 53
54 // Offset describing where this squashed RenderLayer paints into the shared GraphicsLayer backing. 54 // Offset describing where this squashed RenderLayer paints into the shared GraphicsLayer backing.
55 IntSize offsetFromRenderer; 55 IntSize offsetFromRenderer;
56 LayoutSize subpixelAccumulation;
56 57
57 GraphicsLayerPaintingPhase paintingPhase; 58 GraphicsLayerPaintingPhase paintingPhase;
58 59
59 bool isBackgroundLayer; 60 bool isBackgroundLayer;
60 61
61 bool isEquivalentForSquashing(const GraphicsLayerPaintInfo& other) 62 bool isEquivalentForSquashing(const GraphicsLayerPaintInfo& other)
62 { 63 {
63 // FIXME: offsetFromRenderer and compositedBounds should not be checked here, because 64 // FIXME: offsetFromRenderer and compositedBounds should not be checked here, because
64 // they are not yet fixed at the time this function is used. 65 // they are not yet fixed at the time this function is used.
65 return renderLayer == other.renderLayer 66 return renderLayer == other.renderLayer
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 160
160 LayoutRect compositedBounds() const; 161 LayoutRect compositedBounds() const;
161 void setCompositedBounds(const LayoutRect&); 162 void setCompositedBounds(const LayoutRect&);
162 void updateCompositedBounds(); 163 void updateCompositedBounds();
163 164
164 void updateAfterWidgetResize(); 165 void updateAfterWidgetResize();
165 void positionOverflowControlsLayers(const IntSize& offsetFromRoot); 166 void positionOverflowControlsLayers(const IntSize& offsetFromRoot);
166 bool hasUnpositionedOverflowControlsLayers() const; 167 bool hasUnpositionedOverflowControlsLayers() const;
167 168
168 // Returns true if the assignment actually changed the assigned squashing la yer. 169 // Returns true if the assignment actually changed the assigned squashing la yer.
169 bool updateSquashingLayerAssignment(RenderLayer*, IntSize offsetFromSquashin gCLM, size_t nextSquashedLayerIndex); 170 bool updateSquashingLayerAssignment(RenderLayer*, LayoutSize offsetFromSquas hingCLM, size_t nextSquashedLayerIndex);
170 void removeRenderLayerFromSquashingGraphicsLayer(const RenderLayer*); 171 void removeRenderLayerFromSquashingGraphicsLayer(const RenderLayer*);
171 172
172 void finishAccumulatingSquashingLayers(size_t nextSquashedLayerIndex); 173 void finishAccumulatingSquashingLayers(size_t nextSquashedLayerIndex);
173 void updateRenderingContext(); 174 void updateRenderingContext();
174 void updateShouldFlattenTransform(); 175 void updateShouldFlattenTransform();
175 176
176 // GraphicsLayerClient interface 177 // GraphicsLayerClient interface
177 virtual void notifyAnimationStarted(const GraphicsLayer*, double monotonicTi me) OVERRIDE; 178 virtual void notifyAnimationStarted(const GraphicsLayer*, double monotonicTi me) OVERRIDE;
178 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL ayerPaintingPhase, const IntRect& clip) OVERRIDE; 179 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL ayerPaintingPhase, const IntRect& clip) OVERRIDE;
179 virtual bool isTrackingRepaints() const OVERRIDE; 180 virtual bool isTrackingRepaints() const OVERRIDE;
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 bool m_requiresOwnBackingStoreForAncestorReasons : 1; 361 bool m_requiresOwnBackingStoreForAncestorReasons : 1;
361 bool m_canCompositeFilters : 1; 362 bool m_canCompositeFilters : 1;
362 bool m_backgroundLayerPaintsFixedRootBackground : 1; 363 bool m_backgroundLayerPaintsFixedRootBackground : 1;
363 bool m_needToUpdateGeometry : 1; 364 bool m_needToUpdateGeometry : 1;
364 bool m_needToUpdateGeometryOfAllDecendants : 1; 365 bool m_needToUpdateGeometryOfAllDecendants : 1;
365 }; 366 };
366 367
367 } // namespace WebCore 368 } // namespace WebCore
368 369
369 #endif // CompositedLayerMapping_h 370 #endif // CompositedLayerMapping_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698