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

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

Issue 1515503002: Oilpan: fix build after r363998. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "config.h" 5 #include "config.h"
6 #include "core/paint/PaintInvalidationCapableScrollableArea.h" 6 #include "core/paint/PaintInvalidationCapableScrollableArea.h"
7 7
8 #include "core/frame/Settings.h" 8 #include "core/frame/Settings.h"
9 #include "core/html/HTMLFrameOwnerElement.h" 9 #include "core/html/HTMLFrameOwnerElement.h"
10 #include "core/layout/LayoutBox.h" 10 #include "core/layout/LayoutBox.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 shouldInvalidateNewRect = true; 42 shouldInvalidateNewRect = true;
43 } 43 }
44 if (shouldInvalidateNewRect) { 44 if (shouldInvalidateNewRect) {
45 box.invalidatePaintUsingContainer(paintInvalidationContainer, newPaintIn validationRect, PaintInvalidationScroll); 45 box.invalidatePaintUsingContainer(paintInvalidationContainer, newPaintIn validationRect, PaintInvalidationScroll);
46 box.enclosingLayer()->setNeedsRepaint(); 46 box.enclosingLayer()->setNeedsRepaint();
47 return true; 47 return true;
48 } 48 }
49 return false; 49 return false;
50 } 50 }
51 51
52 struct ScrollbarPaintInvalidationData {
53 Scrollbar* scrollbar;
54 GraphicsLayer* graphicsLayer;
55 LayoutRect& previousPaintInvalidatioRect;
56
57 };
58
59 static void invalidatePaintOfScrollbarIfNeeded(Scrollbar* scrollbar, GraphicsLay er* graphicsLayer, bool& previouslyWasOverlay, LayoutRect& previousPaintInvalida tionRect, bool needsPaintInvalidationArg, LayoutBox& box, const PaintInvalidatio nState& paintInvalidationState, const LayoutBoxModelObject& paintInvalidationCon tainer) 52 static void invalidatePaintOfScrollbarIfNeeded(Scrollbar* scrollbar, GraphicsLay er* graphicsLayer, bool& previouslyWasOverlay, LayoutRect& previousPaintInvalida tionRect, bool needsPaintInvalidationArg, LayoutBox& box, const PaintInvalidatio nState& paintInvalidationState, const LayoutBoxModelObject& paintInvalidationCon tainer)
60 { 53 {
61 bool isOverlay = scrollbar && scrollbar->isOverlayScrollbar(); 54 bool isOverlay = scrollbar && scrollbar->isOverlayScrollbar();
62 55
63 // Calculate paint invalidation rect of the scrollbar, except overlay compos ited scrollbars because we invalidate the graphics layer only. 56 // Calculate paint invalidation rect of the scrollbar, except overlay compos ited scrollbars because we invalidate the graphics layer only.
64 LayoutRect newPaintInvalidationRect; 57 LayoutRect newPaintInvalidationRect;
65 if (scrollbar && !(graphicsLayer && isOverlay)) 58 if (scrollbar && !(graphicsLayer && isOverlay))
66 newPaintInvalidationRect = scrollControlPaintInvalidationRect(scrollbar- >frameRect(), box, paintInvalidationState, paintInvalidationContainer); 59 newPaintInvalidationRect = scrollControlPaintInvalidationRect(scrollbar- >frameRect(), box, paintInvalidationState, paintInvalidationContainer);
67 60
68 bool needsPaintInvalidation = needsPaintInvalidationArg; 61 bool needsPaintInvalidation = needsPaintInvalidationArg;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } 116 }
124 117
125 void PaintInvalidationCapableScrollableArea::clearPreviousPaintInvalidationRects () 118 void PaintInvalidationCapableScrollableArea::clearPreviousPaintInvalidationRects ()
126 { 119 {
127 m_horizontalScrollbarPreviousPaintInvalidationRect = LayoutRect(); 120 m_horizontalScrollbarPreviousPaintInvalidationRect = LayoutRect();
128 m_verticalScrollbarPreviousPaintInvalidationRect = LayoutRect(); 121 m_verticalScrollbarPreviousPaintInvalidationRect = LayoutRect();
129 m_scrollCornerPreviousPaintInvalidationRect = LayoutRect(); 122 m_scrollCornerPreviousPaintInvalidationRect = LayoutRect();
130 } 123 }
131 124
132 } // namespace blink 125 } // 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