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

Side by Side Diff: Source/core/rendering/compositing/CompositingRequirementsUpdater.cpp

Issue 486493002: Merge AcceleratedCompositingForOverflowScroll into PreferCompositingToLCDText. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rm-overflowscroll: imagefailure Created 6 years, 4 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) 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2014 Google Inc. All rights reserved. 3 * Copyright (C) 2014 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 directReasons |= CompositingReasonVideoOverlay; 221 directReasons |= CompositingReasonVideoOverlay;
222 222
223 if (compositor->canBeComposited(layer)) 223 if (compositor->canBeComposited(layer))
224 reasonsToComposite |= directReasons; 224 reasonsToComposite |= directReasons;
225 225
226 // Next, accumulate reasons related to overlap. 226 // Next, accumulate reasons related to overlap.
227 // If overlap testing is used, this reason will be overridden. If overlap te sting is not 227 // If overlap testing is used, this reason will be overridden. If overlap te sting is not
228 // used, we must assume we overlap if there is anything composited behind us in paint-order. 228 // used, we must assume we overlap if there is anything composited behind us in paint-order.
229 CompositingReasons overlapCompositingReason = currentRecursionData.m_subtree IsCompositing ? CompositingReasonAssumedOverlap : CompositingReasonNone; 229 CompositingReasons overlapCompositingReason = currentRecursionData.m_subtree IsCompositing ? CompositingReasonAssumedOverlap : CompositingReasonNone;
230 230
231 if (m_renderView.compositor()->acceleratedCompositingForOverflowScrollEnable d()) { 231 if (m_renderView.compositor()->preferCompositingToLCDTextEnabled()) {
232 Vector<size_t> unclippedDescendantsToRemove; 232 Vector<size_t> unclippedDescendantsToRemove;
233 for (size_t i = 0; i < unclippedDescendants.size(); i++) { 233 for (size_t i = 0; i < unclippedDescendants.size(); i++) {
234 RenderLayer* unclippedDescendant = unclippedDescendants.at(i); 234 RenderLayer* unclippedDescendant = unclippedDescendants.at(i);
235 // If we've reached the containing block of one of the unclipped 235 // If we've reached the containing block of one of the unclipped
236 // descendants, that element is no longer relevant to whether or not we 236 // descendants, that element is no longer relevant to whether or not we
237 // should opt in. Unfortunately we can't easily remove from the list 237 // should opt in. Unfortunately we can't easily remove from the list
238 // while we're iterating, so we have to store it for later removal. 238 // while we're iterating, so we have to store it for later removal.
239 if (unclippedDescendant->renderer()->containingBlock() == layer->ren derer()) { 239 if (unclippedDescendant->renderer()->containingBlock() == layer->ren derer()) {
240 unclippedDescendantsToRemove.append(i); 240 unclippedDescendantsToRemove.append(i);
241 continue; 241 continue;
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 412
413 descendantHas3DTransform |= anyDescendantHas3DTransform || layer->has3DT ransform(); 413 descendantHas3DTransform |= anyDescendantHas3DTransform || layer->has3DT ransform();
414 } 414 }
415 415
416 // At this point we have finished collecting all reasons to composite this l ayer. 416 // At this point we have finished collecting all reasons to composite this l ayer.
417 layer->setCompositingReasons(reasonsToComposite); 417 layer->setCompositingReasons(reasonsToComposite);
418 418
419 } 419 }
420 420
421 } // namespace blink 421 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698