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

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

Issue 2172503002: Fix subpixel accumulation for composited content layers Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add test expectation Created 4 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
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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 297
298 // Returns true if this layer has content that needs to be displayed by pain ting into the backing store. 298 // Returns true if this layer has content that needs to be displayed by pain ting into the backing store.
299 bool containsPaintedContent() const; 299 bool containsPaintedContent() const;
300 // Returns true if the Layer just contains an image that we can composite di rectly. 300 // Returns true if the Layer just contains an image that we can composite di rectly.
301 bool isDirectlyCompositedImage() const; 301 bool isDirectlyCompositedImage() const;
302 void updateImageContents(); 302 void updateImageContents();
303 303
304 Color layoutObjectBackgroundColor() const; 304 Color layoutObjectBackgroundColor() const;
305 void updateBackgroundColor(); 305 void updateBackgroundColor();
306 void updateContentsRect(); 306 void updateContentsRect();
307 void updateContentsOffsetInCompositingLayer(const IntPoint& snappedOffsetFro mCompositedAncestor, const IntPoint& graphicsLayerParentLocation);
308 void updateAfterPartResize(); 307 void updateAfterPartResize();
309 void updateCompositingReasons(); 308 void updateCompositingReasons();
310 309
311 static bool hasVisibleNonCompositingDescendant(PaintLayer* parent); 310 static bool hasVisibleNonCompositingDescendant(PaintLayer* parent);
312 311
313 void doPaintTask(const GraphicsLayerPaintInfo&, const GraphicsLayer&, const PaintLayerFlags&, GraphicsContext&, const IntRect& clip) const; 312 void doPaintTask(const GraphicsLayerPaintInfo&, const GraphicsLayer&, const PaintLayerFlags&, GraphicsContext&, const IntRect& clip) const;
314 313
315 // Computes the background clip rect for the given squashed layer, up to any containing layer that is squashed into the 314 // Computes the background clip rect for the given squashed layer, up to any containing layer that is squashed into the
316 // same squashing layer and contains this squashed layer's clipping ancestor . 315 // same squashing layer and contains this squashed layer's clipping ancestor .
317 // The clip rect is returned in the coordinate space of the given squashed l ayer. 316 // The clip rect is returned in the coordinate space of the given squashed l ayer.
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 // 434 //
436 // Stacking children of a squashed layer receive graphics layers that are pa rented to the compositd ancestor of the 435 // Stacking children of a squashed layer receive graphics layers that are pa rented to the compositd ancestor of the
437 // squashed layer (i.e. nearest enclosing composited layer that is not squas hed). 436 // squashed layer (i.e. nearest enclosing composited layer that is not squas hed).
438 std::unique_ptr<GraphicsLayer> m_squashingContainmentLayer; // Only used if any squashed layers exist and m_squashingContainmentLayer is not present, to con tain the squashed layers as siblings to the rest of the GraphicsLayer tree chunk . 437 std::unique_ptr<GraphicsLayer> m_squashingContainmentLayer; // Only used if any squashed layers exist and m_squashingContainmentLayer is not present, to con tain the squashed layers as siblings to the rest of the GraphicsLayer tree chunk .
439 std::unique_ptr<GraphicsLayer> m_squashingLayer; // Only used if any squashe d layers exist, this is the backing that squashed layers paint into. 438 std::unique_ptr<GraphicsLayer> m_squashingLayer; // Only used if any squashe d layers exist, this is the backing that squashed layers paint into.
440 Vector<GraphicsLayerPaintInfo> m_squashedLayers; 439 Vector<GraphicsLayerPaintInfo> m_squashedLayers;
441 LayoutPoint m_squashingLayerOffsetFromTransformedAncestor; 440 LayoutPoint m_squashingLayerOffsetFromTransformedAncestor;
442 441
443 LayoutRect m_compositedBounds; 442 LayoutRect m_compositedBounds;
444 443
445 LayoutSize m_contentOffsetInCompositingLayer;
446
447 // We keep track of the scrolling contents offset, so that when it changes w e can notify the ScrollingCoordinator, which 444 // We keep track of the scrolling contents offset, so that when it changes w e can notify the ScrollingCoordinator, which
448 // passes on main-thread scrolling updates to the compositor. 445 // passes on main-thread scrolling updates to the compositor.
449 DoubleSize m_scrollingContentsOffset; 446 DoubleSize m_scrollingContentsOffset;
450 447
451 unsigned m_contentOffsetInCompositingLayerDirty : 1;
452
453 unsigned m_pendingUpdateScope : 2; 448 unsigned m_pendingUpdateScope : 2;
454 unsigned m_isMainFrameLayoutViewLayer : 1; 449 unsigned m_isMainFrameLayoutViewLayer : 1;
455 450
456 unsigned m_backgroundLayerPaintsFixedRootBackground : 1; 451 unsigned m_backgroundLayerPaintsFixedRootBackground : 1;
457 unsigned m_scrollingContentsAreEmpty : 1; 452 unsigned m_scrollingContentsAreEmpty : 1;
458 453
459 friend class CompositedLayerMappingTest; 454 friend class CompositedLayerMappingTest;
460 }; 455 };
461 456
462 } // namespace blink 457 } // namespace blink
463 458
464 #endif // CompositedLayerMapping_h 459 #endif // CompositedLayerMapping_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698