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

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

Issue 1855303002: Replace filter outsets with bounds mapping in Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: additional unit tests for FilterOperations::mapRect Created 4 years, 8 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 // Do *not* call this method unless you know what you are dooing. You probab ly want to call enclosingCompositingLayerForPaintInvalidation() instead. 319 // Do *not* call this method unless you know what you are dooing. You probab ly want to call enclosingCompositingLayerForPaintInvalidation() instead.
320 // If includeSelf is true, may return this. 320 // If includeSelf is true, may return this.
321 PaintLayer* enclosingLayerWithCompositedLayerMapping(IncludeSelfOrNot) const ; 321 PaintLayer* enclosingLayerWithCompositedLayerMapping(IncludeSelfOrNot) const ;
322 322
323 // Returns the enclosing layer root into which this layer paints, inclusive of this one. Note that the enclosing layer may or may not have its own 323 // Returns the enclosing layer root into which this layer paints, inclusive of this one. Note that the enclosing layer may or may not have its own
324 // GraphicsLayer backing, but is nevertheless the root for a call to the Lay er::paint*() methods. 324 // GraphicsLayer backing, but is nevertheless the root for a call to the Lay er::paint*() methods.
325 PaintLayer* enclosingLayerForPaintInvalidation() const; 325 PaintLayer* enclosingLayerForPaintInvalidation() const;
326 326
327 PaintLayer* enclosingLayerForPaintInvalidationCrossingFrameBoundaries() cons t; 327 PaintLayer* enclosingLayerForPaintInvalidationCrossingFrameBoundaries() cons t;
328 328
329 bool hasAncestorWithFilterOutsets() const; 329 bool hasAncestorWithFilterThatMovesPixels() const;
330 330
331 bool canUseConvertToLayerCoords() const 331 bool canUseConvertToLayerCoords() const
332 { 332 {
333 // These LayoutObjects have an impact on their layers without the layout Objects knowing about it. 333 // These LayoutObjects have an impact on their layers without the layout Objects knowing about it.
334 return !layoutObject()->hasTransformRelatedProperty() && !layoutObject() ->isSVGRoot(); 334 return !layoutObject()->hasTransformRelatedProperty() && !layoutObject() ->isSVGRoot();
335 } 335 }
336 336
337 void convertToLayerCoords(const PaintLayer* ancestorLayer, LayoutPoint&) con st; 337 void convertToLayerCoords(const PaintLayer* ancestorLayer, LayoutPoint&) con st;
338 void convertToLayerCoords(const PaintLayer* ancestorLayer, LayoutRect&) cons t; 338 void convertToLayerCoords(const PaintLayer* ancestorLayer, LayoutRect&) cons t;
339 339
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const; 462 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const;
463 463
464 bool containsDirtyOverlayScrollbars() const { return m_containsDirtyOverlayS crollbars; } 464 bool containsDirtyOverlayScrollbars() const { return m_containsDirtyOverlayS crollbars; }
465 void setContainsDirtyOverlayScrollbars(bool dirtyScrollbars) { m_containsDir tyOverlayScrollbars = dirtyScrollbars; } 465 void setContainsDirtyOverlayScrollbars(bool dirtyScrollbars) { m_containsDir tyOverlayScrollbars = dirtyScrollbars; }
466 466
467 FilterOperations computeFilterOperations(const ComputedStyle&) const; 467 FilterOperations computeFilterOperations(const ComputedStyle&) const;
468 FilterOperations computeBackdropFilterOperations(const ComputedStyle&) const ; 468 FilterOperations computeBackdropFilterOperations(const ComputedStyle&) const ;
469 bool paintsWithFilters() const; 469 bool paintsWithFilters() const;
470 bool paintsWithBackdropFilters() const; 470 bool paintsWithBackdropFilters() const;
471 FilterEffect* lastFilterEffect() const; 471 FilterEffect* lastFilterEffect() const;
472 bool hasFilterOutsets() const; 472
473 FilterOutsets filterOutsets() const; 473 // Can map "forward" to determine which pixels in a destination rect are
474 // affected by pixels in the source rect, or "backward" to determine which
475 // pixels in the source rect are required for a destination rect.
476 // See also FilterEffect::mapRect.
477 FloatRect mapRectForFilter(const FloatRect&, bool forward = true) const;
Stephen White 2016/04/06 20:44:11 I couldn't find any callsites that use forward "fa
jbroman 2016/04/06 21:51:41 Alright, done.
478
479 // Calls the above, rounding outwards.
480 LayoutRect mapRectForFilter(const LayoutRect&, bool forward = true) const;
Stephen White 2016/04/06 20:44:11 Naming nit: could we call this one mapLayoutRectFo
jbroman 2016/04/06 21:51:41 Done.
481
482 bool hasFilterThatMovesPixels() const;
474 483
475 PaintLayerFilterInfo* filterInfo() const { return m_rareData ? m_rareData->f ilterInfo.get() : nullptr; } 484 PaintLayerFilterInfo* filterInfo() const { return m_rareData ? m_rareData->f ilterInfo.get() : nullptr; }
476 PaintLayerFilterInfo& ensureFilterInfo(); 485 PaintLayerFilterInfo& ensureFilterInfo();
477 486
478 void updateFilters(const ComputedStyle* oldStyle, const ComputedStyle& newSt yle); 487 void updateFilters(const ComputedStyle* oldStyle, const ComputedStyle& newSt yle);
479 488
480 Node* enclosingNode() const; 489 Node* enclosingNode() const;
481 490
482 bool isInTopLayer() const; 491 bool isInTopLayer() const;
483 492
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 872
864 } // namespace blink 873 } // namespace blink
865 874
866 #ifndef NDEBUG 875 #ifndef NDEBUG
867 // Outside the WebCore namespace for ease of invocation from gdb. 876 // Outside the WebCore namespace for ease of invocation from gdb.
868 void showLayerTree(const blink::PaintLayer*); 877 void showLayerTree(const blink::PaintLayer*);
869 void showLayerTree(const blink::LayoutObject*); 878 void showLayerTree(const blink::LayoutObject*);
870 #endif 879 #endif
871 880
872 #endif // Layer_h 881 #endif // Layer_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698