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

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h

Issue 1428643004: Repaint on interest rect change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@EnableSyncPaint
Patch Set: Created 5 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
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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 void finishAccumulatingSquashingLayers(size_t nextSquashedLayerIndex); 147 void finishAccumulatingSquashingLayers(size_t nextSquashedLayerIndex);
148 void updateRenderingContext(); 148 void updateRenderingContext();
149 void updateShouldFlattenTransform(); 149 void updateShouldFlattenTransform();
150 150
151 // GraphicsLayerClient interface 151 // GraphicsLayerClient interface
152 void notifyAnimationStarted(const GraphicsLayer*, double monotonicTime, int group) override; 152 void notifyAnimationStarted(const GraphicsLayer*, double monotonicTime, int group) override;
153 void notifyFirstPaint() override; 153 void notifyFirstPaint() override;
154 void notifyFirstTextPaint() override; 154 void notifyFirstTextPaint() override;
155 void notifyFirstImagePaint() override; 155 void notifyFirstImagePaint() override;
156 156
157 void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPain tingPhase, const IntRect& clip) const override; 157 void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPain tingPhase, const IntRect* clip) const override;
158 void paintContentsIfNeeded(const GraphicsLayer*, GraphicsContext&, GraphicsL ayerPaintingPhase) const override;
159 bool isTrackingPaintInvalidations() const override; 158 bool isTrackingPaintInvalidations() const override;
160 159
161 #if ENABLE(ASSERT) 160 #if ENABLE(ASSERT)
162 void verifyNotPainting() override; 161 void verifyNotPainting() override;
163 #endif 162 #endif
164 163
165 LayoutRect contentsBox() const; 164 LayoutRect contentsBox() const;
166 165
167 GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizo ntalScrollbar.get(); } 166 GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizo ntalScrollbar.get(); }
168 GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVertical Scrollbar.get(); } 167 GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVertical Scrollbar.get(); }
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 // Return true if |m_owningLayer|'s compositing ancestor is not a descendant (inclusive) of the 308 // Return true if |m_owningLayer|'s compositing ancestor is not a descendant (inclusive) of the
310 // clipping container for |m_owningLayer|. 309 // clipping container for |m_owningLayer|.
311 bool owningLayerClippedByLayerNotAboveCompositedAncestor(PaintLayer* scrollP arent); 310 bool owningLayerClippedByLayerNotAboveCompositedAncestor(PaintLayer* scrollP arent);
312 311
313 PaintLayer* scrollParent(); 312 PaintLayer* scrollParent();
314 313
315 // Clear the groupedMapping entry on the layer at the given index, only if t hat layer does 314 // Clear the groupedMapping entry on the layer at the given index, only if t hat layer does
316 // not appear earlier in the set of layers for this object. 315 // not appear earlier in the set of layers for this object.
317 bool invalidateLayerIfNoPrecedingEntry(size_t); 316 bool invalidateLayerIfNoPrecedingEntry(size_t);
318 317
318 void paintContentsInternal(const GraphicsLayer*, GraphicsContext&, GraphicsL ayerPaintingPhase, const IntRect& interestRect) const;
319
319 PaintLayer& m_owningLayer; 320 PaintLayer& m_owningLayer;
320 321
321 // The hierarchy of layers that is maintained by the CompositedLayerMapping looks like this: 322 // The hierarchy of layers that is maintained by the CompositedLayerMapping looks like this:
322 // 323 //
323 // + m_ancestorClippingLayer [OPTIONAL] 324 // + m_ancestorClippingLayer [OPTIONAL]
324 // + m_graphicsLayer 325 // + m_graphicsLayer
325 // + m_childTransformLayer [OPTIONAL] 326 // + m_childTransformLayer [OPTIONAL]
326 // | + m_childContainmentLayer [OPTIONAL] <-OR-> m_scrollingLayer [OPTI ONAL] 327 // | + m_childContainmentLayer [OPTIONAL] <-OR-> m_scrollingLayer [OPTI ONAL]
327 // | + m_scrollingContentsL ayer [Present iff m_scrollingLayer is present] 328 // | + m_scrollingContentsL ayer [Present iff m_scrollingLayer is present]
328 // | + m_scrollingBlockSe lectionLayer [Present iff m_scrollingLayer is present] 329 // | + m_scrollingBlockSe lectionLayer [Present iff m_scrollingLayer is present]
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 433
433 LayoutSize m_contentOffsetInCompositingLayer; 434 LayoutSize m_contentOffsetInCompositingLayer;
434 unsigned m_contentOffsetInCompositingLayerDirty : 1; 435 unsigned m_contentOffsetInCompositingLayerDirty : 1;
435 436
436 unsigned m_pendingUpdateScope : 2; 437 unsigned m_pendingUpdateScope : 2;
437 unsigned m_isMainFrameLayoutViewLayer : 1; 438 unsigned m_isMainFrameLayoutViewLayer : 1;
438 439
439 unsigned m_backgroundLayerPaintsFixedRootBackground : 1; 440 unsigned m_backgroundLayerPaintsFixedRootBackground : 1;
440 unsigned m_scrollingContentsAreEmpty : 1; 441 unsigned m_scrollingContentsAreEmpty : 1;
441 442
443 mutable IntRect m_previousPaintInterestRect;
444
442 friend class CompositedLayerMappingTest; 445 friend class CompositedLayerMappingTest;
443 }; 446 };
444 447
445 } // namespace blink 448 } // namespace blink
446 449
447 #endif // CompositedLayerMapping_h 450 #endif // CompositedLayerMapping_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698