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

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

Issue 2299533002: WIP: Construct SPV2's scroll paint property tree (Closed)
Patch Set: Add more paint property builder tests, update comments/documentation" 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 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 30 matching lines...) Expand all
41 return; 41 return;
42 42
43 if (shouldPaintContents) { 43 if (shouldPaintContents) {
44 // TODO(pdr): Creating frame paint properties here will not be needed on ce 44 // TODO(pdr): Creating frame paint properties here will not be needed on ce
45 // settings()->rootLayerScrolls() is enabled. 45 // settings()->rootLayerScrolls() is enabled.
46 // TODO(pdr): Make this conditional on the rootLayerScrolls setting. 46 // TODO(pdr): Make this conditional on the rootLayerScrolls setting.
47 Optional<ScopedPaintChunkProperties> scopedPaintChunkProperties; 47 Optional<ScopedPaintChunkProperties> scopedPaintChunkProperties;
48 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { 48 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
49 TransformPaintPropertyNode* transform = m_frameView->scrollTranslati on() ? m_frameView->scrollTranslation() : m_frameView->preTranslation(); 49 TransformPaintPropertyNode* transform = m_frameView->scrollTranslati on() ? m_frameView->scrollTranslation() : m_frameView->preTranslation();
50 ClipPaintPropertyNode* clip = m_frameView->contentClip(); 50 ClipPaintPropertyNode* clip = m_frameView->contentClip();
51 if (transform || clip) { 51 ScrollPaintPropertyNode* scroll = m_frameView->scroll();
52 if (transform || clip || scroll) {
52 PaintChunkProperties properties(context.getPaintController().cur rentPaintChunkProperties()); 53 PaintChunkProperties properties(context.getPaintController().cur rentPaintChunkProperties());
53 if (transform) 54 if (transform)
54 properties.transform = transform; 55 properties.transform = transform;
56 if (scroll)
57 properties.scroll = scroll;
55 if (clip) 58 if (clip)
56 properties.clip = clip; 59 properties.clip = clip;
57 scopedPaintChunkProperties.emplace(context.getPaintController(), *frameView().layoutView(), properties); 60 scopedPaintChunkProperties.emplace(context.getPaintController(), *frameView().layoutView(), properties);
58 } 61 }
59 } 62 }
60 63
61 TransformRecorder transformRecorder(context, *frameView().layoutView(), 64 TransformRecorder transformRecorder(context, *frameView().layoutView(),
62 AffineTransform::translation(frameView().x() - frameView().scrollX() , frameView().y() - frameView().scrollY())); 65 AffineTransform::translation(frameView().x() - frameView().scrollX() , frameView().y() - frameView().scrollY()));
63 66
64 ClipRecorder recorder(context, *frameView().layoutView(), DisplayItem::k ClipFrameToVisibleContentRect, frameView().visibleContentRect()); 67 ClipRecorder recorder(context, *frameView().layoutView(), DisplayItem::k ClipFrameToVisibleContentRect, frameView().visibleContentRect());
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 bar.paint(context, CullRect(rect)); 200 bar.paint(context, CullRect(rect));
198 } 201 }
199 202
200 const FrameView& FramePainter::frameView() 203 const FrameView& FramePainter::frameView()
201 { 204 {
202 ASSERT(m_frameView); 205 ASSERT(m_frameView);
203 return *m_frameView; 206 return *m_frameView;
204 } 207 }
205 208
206 } // namespace blink 209 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/BlockPainter.cpp ('k') | third_party/WebKit/Source/core/paint/ObjectPaintProperties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698