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

Side by Side Diff: sky/engine/core/rendering/RenderLayerModelObject.cpp

Issue 851033002: Simplify the paint invalidation bits. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: add one more check Created 5 years, 11 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
« no previous file with comments | « no previous file | sky/engine/core/rendering/RenderObject.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2010, 2012 Google Inc. All rights reserved. 7 * Copyright (C) 2010, 2012 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 void RenderLayerModelObject::willBeDestroyed() 70 void RenderLayerModelObject::willBeDestroyed()
71 { 71 {
72 RenderObject::willBeDestroyed(); 72 RenderObject::willBeDestroyed();
73 destroyLayer(); 73 destroyLayer();
74 } 74 }
75 75
76 void RenderLayerModelObject::styleWillChange(StyleDifference diff, const RenderS tyle& newStyle) 76 void RenderLayerModelObject::styleWillChange(StyleDifference diff, const RenderS tyle& newStyle)
77 { 77 {
78 if (RenderStyle* oldStyle = style()) { 78 if (RenderStyle* oldStyle = style()) {
79 if (parent() && diff.needsPaintInvalidationLayer()) { 79 if (parent()) {
80 if (oldStyle->hasAutoClip() != newStyle.hasAutoClip() 80 if (oldStyle->hasAutoClip() != newStyle.hasAutoClip()
81 || oldStyle->clip() != newStyle.clip()) 81 || oldStyle->clip() != newStyle.clip())
82 layer()->clipper().clearClipRectsIncludingDescendants(); 82 layer()->clipper().clearClipRectsIncludingDescendants();
83 } 83 }
84 } 84 }
85 85
86 RenderObject::styleWillChange(diff, newStyle); 86 RenderObject::styleWillChange(diff, newStyle);
87 } 87 }
88 88
89 void RenderLayerModelObject::styleDidChange(StyleDifference diff, const RenderSt yle* oldStyle) 89 void RenderLayerModelObject::styleDidChange(StyleDifference diff, const RenderSt yle* oldStyle)
(...skipping 22 matching lines...) Expand all
112 if (layer()) { 112 if (layer()) {
113 // FIXME: Ideally we shouldn't need this setter but we can't easily infe r an overflow-only layer 113 // FIXME: Ideally we shouldn't need this setter but we can't easily infe r an overflow-only layer
114 // from the style. 114 // from the style.
115 layer()->setLayerType(type); 115 layer()->setLayerType(type);
116 layer()->styleChanged(diff, oldStyle); 116 layer()->styleChanged(diff, oldStyle);
117 } 117 }
118 } 118 }
119 119
120 } // namespace blink 120 } // namespace blink
121 121
OLDNEW
« no previous file with comments | « no previous file | sky/engine/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698