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

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 2124363002: Remove duplicate condition in CompositedLayerMapping::computeInterestRect(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl try Created 4 years, 5 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 | no next file » | 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) 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 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 2356 matching lines...) Expand 10 before | Expand all | Expand 10 after
2367 IntRect CompositedLayerMapping::computeInterestRect(const GraphicsLayer* graphic sLayer, const IntRect& previousInterestRect) const 2367 IntRect CompositedLayerMapping::computeInterestRect(const GraphicsLayer* graphic sLayer, const IntRect& previousInterestRect) const
2368 { 2368 {
2369 // Use the previous interest rect if it covers the whole layer. 2369 // Use the previous interest rect if it covers the whole layer.
2370 IntRect wholeLayerRect = IntRect(IntPoint(), expandedIntSize(graphicsLayer-> size())); 2370 IntRect wholeLayerRect = IntRect(IntPoint(), expandedIntSize(graphicsLayer-> size()));
2371 if (!needsRepaint(*graphicsLayer) && previousInterestRect == wholeLayerRect) 2371 if (!needsRepaint(*graphicsLayer) && previousInterestRect == wholeLayerRect)
2372 return previousInterestRect; 2372 return previousInterestRect;
2373 2373
2374 // Paint the whole layer if "mainFrameClipsContent" is false, meaning that W ebPreferences::record_whole_document is true. 2374 // Paint the whole layer if "mainFrameClipsContent" is false, meaning that W ebPreferences::record_whole_document is true.
2375 bool shouldPaintWholePage = !m_owningLayer.layoutObject()->document().settin gs()->mainFrameClipsContent(); 2375 bool shouldPaintWholePage = !m_owningLayer.layoutObject()->document().settin gs()->mainFrameClipsContent();
2376 if (shouldPaintWholePage 2376 if (shouldPaintWholePage
2377 || (graphicsLayer != m_graphicsLayer.get() && graphicsLayer != m_squashi ngLayer.get() && graphicsLayer != m_squashingLayer.get() && graphicsLayer != m_s crollingContentsLayer.get())) 2377 || (graphicsLayer != m_graphicsLayer.get() && graphicsLayer != m_squashi ngLayer.get() && graphicsLayer != m_scrollingContentsLayer.get()))
2378 return wholeLayerRect; 2378 return wholeLayerRect;
2379 2379
2380 IntRect newInterestRect = recomputeInterestRect(graphicsLayer); 2380 IntRect newInterestRect = recomputeInterestRect(graphicsLayer);
2381 if (interestRectChangedEnoughToRepaint(previousInterestRect, newInterestRect , expandedIntSize(graphicsLayer->size()))) 2381 if (interestRectChangedEnoughToRepaint(previousInterestRect, newInterestRect , expandedIntSize(graphicsLayer->size())))
2382 return newInterestRect; 2382 return newInterestRect;
2383 return previousInterestRect; 2383 return previousInterestRect;
2384 } 2384 }
2385 2385
2386 LayoutSize CompositedLayerMapping::subpixelAccumulation() const 2386 LayoutSize CompositedLayerMapping::subpixelAccumulation() const
2387 { 2387 {
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
2669 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { 2669 } else if (graphicsLayer == m_scrollingContentsLayer.get()) {
2670 name = "Scrolling Contents Layer"; 2670 name = "Scrolling Contents Layer";
2671 } else { 2671 } else {
2672 ASSERT_NOT_REACHED(); 2672 ASSERT_NOT_REACHED();
2673 } 2673 }
2674 2674
2675 return name; 2675 return name;
2676 } 2676 }
2677 2677
2678 } // namespace blink 2678 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698