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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayer.h

Issue 2346883003: Only paint the background onto the scrolling contents layer if we have a scrolling contents layer. (Closed)
Patch Set: CompositedLayerMappingTest.BackgroundPaintedIntoGraphicsLayerIfNotCompositedScrolling Created 4 years, 3 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) 2003, 2009, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Intel Corporation. All rights reserved. 3 * Copyright (C) 2013 Intel Corporation. All rights reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@web.de> 10 * Christian Biesinger <cbiesinger@web.de>
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 // Don't null check this. 431 // Don't null check this.
432 // FIXME: Rename. 432 // FIXME: Rename.
433 CompositedLayerMapping* compositedLayerMapping() const; 433 CompositedLayerMapping* compositedLayerMapping() const;
434 GraphicsLayer* graphicsLayerBacking() const; 434 GraphicsLayer* graphicsLayerBacking() const;
435 GraphicsLayer* graphicsLayerBackingForScrolling() const; 435 GraphicsLayer* graphicsLayerBackingForScrolling() const;
436 // Returns true for layers with scrollable overflow which have a background 436 // Returns true for layers with scrollable overflow which have a background
437 // that can be painted into the composited scrolling contents layer when it exist 437 // that can be painted into the composited scrolling contents layer when it exist
438 // (i.e. the background can scroll with the content). When the background is also 438 // (i.e. the background can scroll with the content). When the background is also
439 // opaque this allows us to composite the scroller even on low DPI as we can 439 // opaque this allows us to composite the scroller even on low DPI as we can
440 // draw with subpixel anti-aliasing. 440 // draw with subpixel anti-aliasing.
441 bool shouldPaintBackgroundOntoScrollingContentsLayer() const; 441 bool canPaintBackgroundOntoScrollingContentsLayer() const;
442 // NOTE: If you are using hasCompositedLayerMapping to determine the state o f compositing for this layer, 442 // NOTE: If you are using hasCompositedLayerMapping to determine the state o f compositing for this layer,
443 // (and not just to do bookkeeping related to the mapping like, say, allocat ing or deallocating a mapping), 443 // (and not just to do bookkeeping related to the mapping like, say, allocat ing or deallocating a mapping),
444 // then you may have incorrect logic. Use compositingState() instead. 444 // then you may have incorrect logic. Use compositingState() instead.
445 // FIXME: This is identical to null checking compositedLayerMapping(), why n ot just call that? 445 // FIXME: This is identical to null checking compositedLayerMapping(), why n ot just call that?
446 bool hasCompositedLayerMapping() const { return m_rareData && m_rareData->co mpositedLayerMapping; } 446 bool hasCompositedLayerMapping() const { return m_rareData && m_rareData->co mpositedLayerMapping; }
447 void ensureCompositedLayerMapping(); 447 void ensureCompositedLayerMapping();
448 void clearCompositedLayerMapping(bool layerBeingDestroyed = false); 448 void clearCompositedLayerMapping(bool layerBeingDestroyed = false);
449 CompositedLayerMapping* groupedMapping() const { return m_rareData ? m_rareD ata->groupedMapping : nullptr; } 449 CompositedLayerMapping* groupedMapping() const { return m_rareData ? m_rareD ata->groupedMapping : nullptr; }
450 enum SetGroupMappingOptions { 450 enum SetGroupMappingOptions {
451 InvalidateLayerAndRemoveFromMapping, 451 InvalidateLayerAndRemoveFromMapping,
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 930
931 } // namespace blink 931 } // namespace blink
932 932
933 #ifndef NDEBUG 933 #ifndef NDEBUG
934 // Outside the WebCore namespace for ease of invocation from gdb. 934 // Outside the WebCore namespace for ease of invocation from gdb.
935 void showLayerTree(const blink::PaintLayer*); 935 void showLayerTree(const blink::PaintLayer*);
936 void showLayerTree(const blink::LayoutObject*); 936 void showLayerTree(const blink::LayoutObject*);
937 #endif 937 #endif
938 938
939 #endif // Layer_h 939 #endif // Layer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698