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

Side by Side Diff: Source/core/rendering/RenderLayer.cpp

Issue 207513002: Compute style-determined compositing reasons during recalc style (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: No longer friends Created 6 years, 9 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 | Annotate | Revision Log
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 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1178 { 1178 {
1179 const RenderLayer* curr = (includeSelf == IncludeSelf) ? this : parent(); 1179 const RenderLayer* curr = (includeSelf == IncludeSelf) ? this : parent();
1180 for (; curr; curr = curr->parent()) { 1180 for (; curr; curr = curr->parent()) {
1181 if (curr->requiresFullLayerImageForFilters()) 1181 if (curr->requiresFullLayerImageForFilters())
1182 return const_cast<RenderLayer*>(curr); 1182 return const_cast<RenderLayer*>(curr);
1183 } 1183 }
1184 1184
1185 return 0; 1185 return 0;
1186 } 1186 }
1187 1187
1188 void RenderLayer::setCompositingReasons(CompositingReasons reasons) 1188 void RenderLayer::setCompositingReasons(CompositingReasons reasons, CompositingR easons mask)
1189 { 1189 {
1190 if (m_compositingProperties.compositingReasons == reasons) 1190 ASSERT(reasons == (reasons & mask));
1191 if ((m_compositingProperties.compositingReasons & mask) == (reasons & mask))
1191 return; 1192 return;
1192 m_compositingProperties.compositingReasons = reasons; 1193 m_compositingProperties.compositingReasons = (reasons & mask) | (m_compositi ngProperties.compositingReasons & ~mask);
1193 m_clipper.setCompositingClipRectsDirty(); 1194 m_clipper.setCompositingClipRectsDirty();
1194 } 1195 }
1195 1196
1196 bool RenderLayer::hasAncestorWithFilterOutsets() const 1197 bool RenderLayer::hasAncestorWithFilterOutsets() const
1197 { 1198 {
1198 for (const RenderLayer* curr = this; curr; curr = curr->parent()) { 1199 for (const RenderLayer* curr = this; curr; curr = curr->parent()) {
1199 RenderLayerModelObject* renderer = curr->renderer(); 1200 RenderLayerModelObject* renderer = curr->renderer();
1200 if (renderer->style()->hasFilterOutsets()) 1201 if (renderer->style()->hasFilterOutsets())
1201 return true; 1202 return true;
1202 } 1203 }
(...skipping 2698 matching lines...) Expand 10 before | Expand all | Expand 10 after
3901 bool didPaintWithFilters = false; 3902 bool didPaintWithFilters = false;
3902 3903
3903 { 3904 {
3904 // https://code.google.com/p/chromium/issues/detail?id=343759 3905 // https://code.google.com/p/chromium/issues/detail?id=343759
3905 DisableCompositingQueryAsserts disabler; 3906 DisableCompositingQueryAsserts disabler;
3906 if (paintsWithFilters()) 3907 if (paintsWithFilters())
3907 didPaintWithFilters = true; 3908 didPaintWithFilters = true;
3908 updateFilters(oldStyle, renderer()->style()); 3909 updateFilters(oldStyle, renderer()->style());
3909 } 3910 }
3910 3911
3912 compositor()->updateStyleDeterminedCompositingReasons(this);
3913
3911 // FIXME: Remove incremental compositing updates after fixing the chicken/eg g issues 3914 // FIXME: Remove incremental compositing updates after fixing the chicken/eg g issues
3912 // https://code.google.com/p/chromium/issues/detail?id=343756 3915 // https://code.google.com/p/chromium/issues/detail?id=343756
3913 DisableCompositingQueryAsserts disabler; 3916 DisableCompositingQueryAsserts disabler;
3914 3917
3915 if (RenderLayer* compositingLayer = enclosingCompositingLayer()) 3918 if (RenderLayer* compositingLayer = enclosingCompositingLayer())
3916 compositingLayer->compositedLayerMapping()->setNeedsGeometryUpdate(); 3919 compositingLayer->compositedLayerMapping()->setNeedsGeometryUpdate();
3917 3920
3918 const RenderStyle* newStyle = renderer()->style(); 3921 const RenderStyle* newStyle = renderer()->style();
3919 3922
3920 compositor()->updateLayerCompositingState(this, RenderLayerCompositor::UseCh ickenEggHacks); 3923 compositor()->updateLayerCompositingState(this, RenderLayerCompositor::UseCh ickenEggHacks);
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
4079 } 4082 }
4080 } 4083 }
4081 4084
4082 void showLayerTree(const WebCore::RenderObject* renderer) 4085 void showLayerTree(const WebCore::RenderObject* renderer)
4083 { 4086 {
4084 if (!renderer) 4087 if (!renderer)
4085 return; 4088 return;
4086 showLayerTree(renderer->enclosingLayer()); 4089 showLayerTree(renderer->enclosingLayer());
4087 } 4090 }
4088 #endif 4091 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayer.h ('k') | Source/core/rendering/compositing/CompositingReasonFinder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698