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

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

Issue 213773002: Make compositing updates 30.7% faster for calculator (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix ASSERT 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
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/rendering/RenderLayer.h » ('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) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 } 163 }
164 164
165 #if !ASSERT_DISABLED 165 #if !ASSERT_DISABLED
166 if (m_mapping.size() > 0) { 166 if (m_mapping.size() > 0) {
167 const RenderObject* lastRenderer = m_mapping.last().m_renderer; 167 const RenderObject* lastRenderer = m_mapping.last().m_renderer;
168 const RenderLayer* layer = lastRenderer->enclosingLayer(); 168 const RenderLayer* layer = lastRenderer->enclosingLayer();
169 169
170 // Bounds for invisible layers are intentionally not calculated, and are 170 // Bounds for invisible layers are intentionally not calculated, and are
171 // therefore not necessarily expected to be correct here. This is ok, 171 // therefore not necessarily expected to be correct here. This is ok,
172 // because they will be recomputed if the layer becomes visible. 172 // because they will be recomputed if the layer becomes visible.
173 if (!layer || !layer->subtreeIsInvisible()) { 173 if (!layer->subtreeIsInvisible() && lastRenderer->style()->visibility() == VISIBLE) {
174 FloatRect rendererMappedResult = lastRenderer->localToContainerQuad( rect, container, m_mapCoordinatesFlags).boundingBox(); 174 FloatRect rendererMappedResult = lastRenderer->localToContainerQuad( rect, container, m_mapCoordinatesFlags).boundingBox();
175 175
176 // Inspector creates renderers with negative width <https://bugs.web kit.org/show_bug.cgi?id=87194>. 176 // Inspector creates renderers with negative width <https://bugs.web kit.org/show_bug.cgi?id=87194>.
177 // Taking FloatQuad bounds avoids spurious assertions because of tha t. 177 // Taking FloatQuad bounds avoids spurious assertions because of tha t.
178 ASSERT(enclosingIntRect(rendererMappedResult) == enclosingIntRect(Fl oatQuad(result).boundingBox())); 178 ASSERT(enclosingIntRect(rendererMappedResult) == enclosingIntRect(Fl oatQuad(result).boundingBox()));
179 } 179 }
180 } 180 }
181 #endif 181 #endif
182 182
183 return result; 183 return result;
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 // If we're not working with multiple RenderViews, then any view is consider ed 337 // If we're not working with multiple RenderViews, then any view is consider ed
338 // "topmost" (to preserve original behavior). 338 // "topmost" (to preserve original behavior).
339 if (!(m_mapCoordinatesFlags & TraverseDocumentBoundaries)) 339 if (!(m_mapCoordinatesFlags & TraverseDocumentBoundaries))
340 return true; 340 return true;
341 341
342 return renderer->frame()->isMainFrame(); 342 return renderer->frame()->isMainFrame();
343 } 343 }
344 #endif 344 #endif
345 345
346 } // namespace WebCore 346 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/rendering/RenderLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698