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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintInvalidator.cpp

Issue 2258523006: Convert Settings::rootLayerScrolls to RuntimeEnabledFeatures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add RAII-style helper to toggle REF. Rebase. Created 4 years, 3 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/PaintInvalidator.h" 5 #include "core/paint/PaintInvalidator.h"
6 6
7 #include "core/editing/FrameSelection.h" 7 #include "core/editing/FrameSelection.h"
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/frame/LocalFrame.h" 9 #include "core/frame/LocalFrame.h"
10 #include "core/frame/Settings.h" 10 #include "core/frame/Settings.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 } 171 }
172 172
173 void PaintInvalidator::invalidatePaintIfNeeded(FrameView& frameView, PaintInvali datorContext& context) 173 void PaintInvalidator::invalidatePaintIfNeeded(FrameView& frameView, PaintInvali datorContext& context)
174 { 174 {
175 LayoutView* layoutView = frameView.layoutView(); 175 LayoutView* layoutView = frameView.layoutView();
176 CHECK(layoutView); 176 CHECK(layoutView);
177 177
178 context.paintInvalidationContainer = context.paintInvalidationContainerForSt ackedContents = &layoutView->containerForPaintInvalidation(); 178 context.paintInvalidationContainer = context.paintInvalidationContainerForSt ackedContents = &layoutView->containerForPaintInvalidation();
179 context.paintingLayer = layoutView->layer(); 179 context.paintingLayer = layoutView->layer();
180 180
181 if (!frameView.frame().settings() || !frameView.frame().settings()->rootLaye rScrolls()) 181 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled())
182 frameView.invalidatePaintOfScrollControlsIfNeeded(context); 182 frameView.invalidatePaintOfScrollControlsIfNeeded(context);
183 183
184 if (frameView.frame().selection().isCaretBoundsDirty()) 184 if (frameView.frame().selection().isCaretBoundsDirty())
185 frameView.frame().selection().invalidateCaretRect(); 185 frameView.frame().selection().invalidateCaretRect();
186 186
187 // Temporary callback for crbug.com/487345,402044 187 // Temporary callback for crbug.com/487345,402044
188 // TODO(ojan): Make this more general to be used by PositionObserver 188 // TODO(ojan): Make this more general to be used by PositionObserver
189 // and rAF throttling. 189 // and rAF throttling.
190 IntRect visibleRect = frameView.rootFrameToContents(frameView.computeVisible Area()); 190 IntRect visibleRect = frameView.rootFrameToContents(frameView.computeVisible Area());
191 layoutView->sendMediaPositionChangeNotifications(visibleRect); 191 layoutView->sendMediaPositionChangeNotifications(visibleRect);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 object.getMutableForPainting().clearPaintInvalidationFlags(); 232 object.getMutableForPainting().clearPaintInvalidationFlags();
233 } 233 }
234 234
235 void PaintInvalidator::processPendingDelayedPaintInvalidations() 235 void PaintInvalidator::processPendingDelayedPaintInvalidations()
236 { 236 {
237 for (auto target : m_pendingDelayedPaintInvalidations) 237 for (auto target : m_pendingDelayedPaintInvalidations)
238 target->getMutableForPainting().setShouldDoFullPaintInvalidation(PaintIn validationDelayedFull); 238 target->getMutableForPainting().setShouldDoFullPaintInvalidation(PaintIn validationDelayedFull);
239 } 239 }
240 240
241 } // namespace blink 241 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698