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

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

Issue 2692853016: Change PaintLayer::m_layoutObject to a reference. (Closed)
Patch Set: Added TODO Created 3 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/FramePainter.h" 5 #include "core/paint/FramePainter.h"
6 6
7 #include "core/editing/markers/DocumentMarkerController.h" 7 #include "core/editing/markers/DocumentMarkerController.h"
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/inspector/InspectorInstrumentation.h" 9 #include "core/inspector/InspectorInstrumentation.h"
10 #include "core/inspector/InspectorTraceEvents.h" 10 #include "core/inspector/InspectorTraceEvents.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 GlobalPaintFlags localPaintFlags = globalPaintFlags; 157 GlobalPaintFlags localPaintFlags = globalPaintFlags;
158 if (document->printing()) 158 if (document->printing())
159 localPaintFlags |= 159 localPaintFlags |=
160 GlobalPaintFlattenCompositingLayers | GlobalPaintPrinting; 160 GlobalPaintFlattenCompositingLayers | GlobalPaintPrinting;
161 161
162 PaintLayer* rootLayer = layoutView->layer(); 162 PaintLayer* rootLayer = layoutView->layer();
163 163
164 #if DCHECK_IS_ON() 164 #if DCHECK_IS_ON()
165 layoutView->assertSubtreeIsLaidOut(); 165 layoutView->assertSubtreeIsLaidOut();
166 LayoutObject::SetLayoutNeededForbiddenScope forbidSetNeedsLayout( 166 LayoutObject::SetLayoutNeededForbiddenScope forbidSetNeedsLayout(
167 *rootLayer->layoutObject()); 167 rootLayer->layoutObject());
168 #endif 168 #endif
169 169
170 PaintLayerPainter layerPainter(*rootLayer); 170 PaintLayerPainter layerPainter(*rootLayer);
171 171
172 float deviceScaleFactor = 172 float deviceScaleFactor =
173 blink::deviceScaleFactor(rootLayer->layoutObject()->frame()); 173 blink::deviceScaleFactor(rootLayer->layoutObject().frame());
174 context.setDeviceScaleFactor(deviceScaleFactor); 174 context.setDeviceScaleFactor(deviceScaleFactor);
175 175
176 layerPainter.paint(context, LayoutRect(rect), localPaintFlags); 176 layerPainter.paint(context, LayoutRect(rect), localPaintFlags);
177 177
178 if (rootLayer->containsDirtyOverlayScrollbars()) 178 if (rootLayer->containsDirtyOverlayScrollbars())
179 layerPainter.paintOverlayScrollbars(context, LayoutRect(rect), 179 layerPainter.paintOverlayScrollbars(context, LayoutRect(rect),
180 localPaintFlags); 180 localPaintFlags);
181 181
182 // Regions may have changed as a result of the visibility/z-index of element 182 // Regions may have changed as a result of the visibility/z-index of element
183 // changing. 183 // changing.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 246
247 bar.paint(context, CullRect(rect)); 247 bar.paint(context, CullRect(rect));
248 } 248 }
249 249
250 const FrameView& FramePainter::frameView() { 250 const FrameView& FramePainter::frameView() {
251 DCHECK(m_frameView); 251 DCHECK(m_frameView);
252 return *m_frameView; 252 return *m_frameView;
253 } 253 }
254 254
255 } // namespace blink 255 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/FilterPainter.cpp ('k') | third_party/WebKit/Source/core/paint/LayerClipRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698