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

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

Issue 2480863002: DCHECK that paint properties are never null (Closed)
Patch Set: dcheckmate Created 4 years, 1 month 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 | third_party/WebKit/Source/platform/graphics/paint/CompositingRecorder.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/fetch/MemoryCache.h" 8 #include "core/fetch/MemoryCache.h"
9 #include "core/frame/FrameView.h" 9 #include "core/frame/FrameView.h"
10 #include "core/inspector/InspectorInstrumentation.h" 10 #include "core/inspector/InspectorInstrumentation.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 DCHECK(!RuntimeEnabledFeatures::rootLayerScrollingEnabled()); 87 DCHECK(!RuntimeEnabledFeatures::rootLayerScrollingEnabled());
88 IntRect scrollViewDirtyRect = rect.m_rect; 88 IntRect scrollViewDirtyRect = rect.m_rect;
89 IntRect visibleAreaWithScrollbars( 89 IntRect visibleAreaWithScrollbars(
90 frameView().location(), 90 frameView().location(),
91 frameView().visibleContentRect(IncludeScrollbars).size()); 91 frameView().visibleContentRect(IncludeScrollbars).size());
92 scrollViewDirtyRect.intersect(visibleAreaWithScrollbars); 92 scrollViewDirtyRect.intersect(visibleAreaWithScrollbars);
93 scrollViewDirtyRect.moveBy(-frameView().location()); 93 scrollViewDirtyRect.moveBy(-frameView().location());
94 94
95 Optional<ScopedPaintChunkProperties> scopedPaintChunkProperties; 95 Optional<ScopedPaintChunkProperties> scopedPaintChunkProperties;
96 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { 96 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
97 if (TransformPaintPropertyNode* transform = 97 if (const PropertyTreeState* contentsState =
98 m_frameView->preTranslation()) { 98 m_frameView->totalPropertyTreeStateForContents()) {
99 // The scrollbar's property nodes are similar to the frame view's
100 // contents state but we want to exclude the content-specific
101 // properties. This prevents the scrollbars from scrolling, for example.
99 PaintChunkProperties properties( 102 PaintChunkProperties properties(
100 context.getPaintController().currentPaintChunkProperties()); 103 context.getPaintController().currentPaintChunkProperties());
101 properties.transform = transform; 104 properties.transform = m_frameView->preTranslation();
105 properties.clip = m_frameView->contentClip()->parent();
106 properties.effect = contentsState->effect();
107 auto* scrollBarScroll = contentsState->scroll();
108 if (m_frameView->scroll())
109 scrollBarScroll = m_frameView->scroll()->parent();
110 properties.scroll = scrollBarScroll;
102 scopedPaintChunkProperties.emplace(context.getPaintController(), 111 scopedPaintChunkProperties.emplace(context.getPaintController(),
103 *frameView().layoutView(), 112 *frameView().layoutView(),
104 properties); 113 properties);
105 } 114 }
106 } 115 }
107 116
108 TransformRecorder transformRecorder( 117 TransformRecorder transformRecorder(
109 context, *frameView().layoutView(), 118 context, *frameView().layoutView(),
110 AffineTransform::translation(frameView().x(), frameView().y())); 119 AffineTransform::translation(frameView().x(), frameView().y()));
111 120
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 251
243 bar.paint(context, CullRect(rect)); 252 bar.paint(context, CullRect(rect));
244 } 253 }
245 254
246 const FrameView& FramePainter::frameView() { 255 const FrameView& FramePainter::frameView() {
247 DCHECK(m_frameView); 256 DCHECK(m_frameView);
248 return *m_frameView; 257 return *m_frameView;
249 } 258 }
250 259
251 } // namespace blink 260 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/paint/CompositingRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698