| OLD | NEW |
| 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 Loading... |
| 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 if (const PropertyTreeState* contentsState = m_frameView->totalPrope
rtyTreeStateForContents()) { | 49 if (const PropertyTreeState* contentsState = m_frameView->totalPrope
rtyTreeStateForContents()) { |
| 50 PaintChunkProperties properties(context.getPaintController().cur
rentPaintChunkProperties()); | 50 PaintChunkProperties properties(context.getPaintController().cur
rentPaintChunkProperties()); |
| 51 properties.transform = contentsState->transform; | 51 properties.transform = contentsState->transform(); |
| 52 properties.clip = contentsState->clip; | 52 properties.clip = contentsState->clip(); |
| 53 properties.effect = contentsState->effect; | 53 properties.effect = contentsState->effect(); |
| 54 properties.scroll = contentsState->scroll; | 54 properties.scroll = contentsState->scroll(); |
| 55 scopedPaintChunkProperties.emplace(context.getPaintController(),
*frameView().layoutView(), properties); | 55 scopedPaintChunkProperties.emplace(context.getPaintController(),
*frameView().layoutView(), properties); |
| 56 } | 56 } |
| 57 } | 57 } |
| 58 | 58 |
| 59 TransformRecorder transformRecorder(context, *frameView().layoutView(), | 59 TransformRecorder transformRecorder(context, *frameView().layoutView(), |
| 60 AffineTransform::translation(frameView().x() - frameView().scrollX()
, frameView().y() - frameView().scrollY())); | 60 AffineTransform::translation(frameView().x() - frameView().scrollX()
, frameView().y() - frameView().scrollY())); |
| 61 | 61 |
| 62 ClipRecorder recorder(context, *frameView().layoutView(), DisplayItem::k
ClipFrameToVisibleContentRect, frameView().visibleContentRect()); | 62 ClipRecorder recorder(context, *frameView().layoutView(), DisplayItem::k
ClipFrameToVisibleContentRect, frameView().visibleContentRect()); |
| 63 | 63 |
| 64 documentDirtyRect.moveBy(-frameView().location() + frameView().scrollPos
ition()); | 64 documentDirtyRect.moveBy(-frameView().location() + frameView().scrollPos
ition()); |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 bar.paint(context, CullRect(rect)); | 195 bar.paint(context, CullRect(rect)); |
| 196 } | 196 } |
| 197 | 197 |
| 198 const FrameView& FramePainter::frameView() | 198 const FrameView& FramePainter::frameView() |
| 199 { | 199 { |
| 200 ASSERT(m_frameView); | 200 ASSERT(m_frameView); |
| 201 return *m_frameView; | 201 return *m_frameView; |
| 202 } | 202 } |
| 203 | 203 |
| 204 } // namespace blink | 204 } // namespace blink |
| OLD | NEW |