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

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

Issue 2014483003: Rename OwnPtr::clear() to reset() in core/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 // hasTransform() on the layoutObject is also true when there is transform-s tyle: preserve-3d or perspective set, 405 // hasTransform() on the layoutObject is also true when there is transform-s tyle: preserve-3d or perspective set,
406 // so check style too. 406 // so check style too.
407 bool hasTransform = layoutObject()->hasTransformRelatedProperty() && newStyl e.hasTransform(); 407 bool hasTransform = layoutObject()->hasTransformRelatedProperty() && newStyl e.hasTransform();
408 bool had3DTransform = has3DTransform(); 408 bool had3DTransform = has3DTransform();
409 409
410 bool hadTransform = transform(); 410 bool hadTransform = transform();
411 if (hasTransform != hadTransform) { 411 if (hasTransform != hadTransform) {
412 if (hasTransform) 412 if (hasTransform)
413 ensureRareData().transform = TransformationMatrix::create(); 413 ensureRareData().transform = TransformationMatrix::create();
414 else 414 else
415 m_rareData->transform.clear(); 415 m_rareData->transform.reset();
416 416
417 // PaintLayers with transforms act as clip rects roots, so clear the cac hed clip rects here. 417 // PaintLayers with transforms act as clip rects roots, so clear the cac hed clip rects here.
418 clipper().clearClipRectsIncludingDescendants(); 418 clipper().clearClipRectsIncludingDescendants();
419 } else if (hasTransform) { 419 } else if (hasTransform) {
420 clipper().clearClipRectsIncludingDescendants(AbsoluteClipRects); 420 clipper().clearClipRectsIncludingDescendants(AbsoluteClipRects);
421 } 421 }
422 422
423 updateTransformationMatrix(); 423 updateTransformationMatrix();
424 424
425 if (had3DTransform != has3DTransform()) 425 if (had3DTransform != has3DTransform())
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 for (PaintLayer* current = this; current && !current->m_childNeedsCompositin gInputsUpdate; current = current->parent()) 982 for (PaintLayer* current = this; current && !current->m_childNeedsCompositin gInputsUpdate; current = current->parent())
983 current->m_childNeedsCompositingInputsUpdate = true; 983 current->m_childNeedsCompositingInputsUpdate = true;
984 984
985 compositor()->setNeedsCompositingUpdate(CompositingUpdateAfterCompositingInp utChange); 985 compositor()->setNeedsCompositingUpdate(CompositingUpdateAfterCompositingInp utChange);
986 } 986 }
987 987
988 void PaintLayer::updateAncestorDependentCompositingInputs(const AncestorDependen tCompositingInputs& compositingInputs, const RareAncestorDependentCompositingInp uts& rareCompositingInputs, bool hasAncestorWithClipPath) 988 void PaintLayer::updateAncestorDependentCompositingInputs(const AncestorDependen tCompositingInputs& compositingInputs, const RareAncestorDependentCompositingInp uts& rareCompositingInputs, bool hasAncestorWithClipPath)
989 { 989 {
990 m_ancestorDependentCompositingInputs = compositingInputs; 990 m_ancestorDependentCompositingInputs = compositingInputs;
991 if (rareCompositingInputs.isDefault()) 991 if (rareCompositingInputs.isDefault())
992 m_rareAncestorDependentCompositingInputs.clear(); 992 m_rareAncestorDependentCompositingInputs.reset();
993 else 993 else
994 m_rareAncestorDependentCompositingInputs = adoptPtr(new RareAncestorDepe ndentCompositingInputs(rareCompositingInputs)); 994 m_rareAncestorDependentCompositingInputs = adoptPtr(new RareAncestorDepe ndentCompositingInputs(rareCompositingInputs));
995 m_hasAncestorWithClipPath = hasAncestorWithClipPath; 995 m_hasAncestorWithClipPath = hasAncestorWithClipPath;
996 m_needsAncestorDependentCompositingInputsUpdate = false; 996 m_needsAncestorDependentCompositingInputsUpdate = false;
997 } 997 }
998 998
999 void PaintLayer::updateDescendantDependentCompositingInputs(bool hasDescendantWi thClipPath, bool hasNonIsolatedDescendantWithBlendMode) 999 void PaintLayer::updateDescendantDependentCompositingInputs(bool hasDescendantWi thClipPath, bool hasNonIsolatedDescendantWithBlendMode)
1000 { 1000 {
1001 m_hasDescendantWithClipPath = hasDescendantWithClipPath; 1001 m_hasDescendantWithClipPath = hasDescendantWithClipPath;
1002 m_hasNonIsolatedDescendantWithBlendMode = hasNonIsolatedDescendantWithBlendM ode; 1002 m_hasNonIsolatedDescendantWithBlendMode = hasNonIsolatedDescendantWithBlendM ode;
(...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after
2342 if (!layerBeingDestroyed) { 2342 if (!layerBeingDestroyed) {
2343 // We need to make sure our decendants get a geometry update. In princip le, 2343 // We need to make sure our decendants get a geometry update. In princip le,
2344 // we could call setNeedsGraphicsLayerUpdate on our children, but that w ould 2344 // we could call setNeedsGraphicsLayerUpdate on our children, but that w ould
2345 // require walking the z-order lists to find them. Instead, we over-inva lidate 2345 // require walking the z-order lists to find them. Instead, we over-inva lidate
2346 // by marking our parent as needing a geometry update. 2346 // by marking our parent as needing a geometry update.
2347 if (PaintLayer* compositingParent = enclosingLayerWithCompositedLayerMap ping(ExcludeSelf)) 2347 if (PaintLayer* compositingParent = enclosingLayerWithCompositedLayerMap ping(ExcludeSelf))
2348 compositingParent->compositedLayerMapping()->setNeedsGraphicsLayerUp date(GraphicsLayerUpdateSubtree); 2348 compositingParent->compositedLayerMapping()->setNeedsGraphicsLayerUp date(GraphicsLayerUpdateSubtree);
2349 } 2349 }
2350 2350
2351 if (m_rareData) 2351 if (m_rareData)
2352 m_rareData->compositedLayerMapping.clear(); 2352 m_rareData->compositedLayerMapping.reset();
2353 2353
2354 if (!layerBeingDestroyed) 2354 if (!layerBeingDestroyed)
2355 updateOrRemoveFilterEffectBuilder(); 2355 updateOrRemoveFilterEffectBuilder();
2356 } 2356 }
2357 2357
2358 void PaintLayer::setGroupedMapping(CompositedLayerMapping* groupedMapping, SetGr oupMappingOptions options) 2358 void PaintLayer::setGroupedMapping(CompositedLayerMapping* groupedMapping, SetGr oupMappingOptions options)
2359 { 2359 {
2360 CompositedLayerMapping* oldGroupedMapping = this->groupedMapping(); 2360 CompositedLayerMapping* oldGroupedMapping = this->groupedMapping();
2361 if (groupedMapping == oldGroupedMapping) 2361 if (groupedMapping == oldGroupedMapping)
2362 return; 2362 return;
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
2913 2913
2914 void showLayerTree(const blink::LayoutObject* layoutObject) 2914 void showLayerTree(const blink::LayoutObject* layoutObject)
2915 { 2915 {
2916 if (!layoutObject) { 2916 if (!layoutObject) {
2917 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2917 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2918 return; 2918 return;
2919 } 2919 }
2920 showLayerTree(layoutObject->enclosingLayer()); 2920 showLayerTree(layoutObject->enclosingLayer());
2921 } 2921 }
2922 #endif 2922 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.h ('k') | third_party/WebKit/Source/core/paint/PaintLayerStackingNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698