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

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

Issue 2573883002: Refactor PaintChunkProperties to use PropertyTreeState (Closed)
Patch Set: none Created 4 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
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/PaintLayerPainter.h" 5 #include "core/paint/PaintLayerPainter.h"
6 6
7 #include "core/frame/LocalFrame.h" 7 #include "core/frame/LocalFrame.h"
8 #include "core/layout/LayoutView.h" 8 #include "core/layout/LayoutView.h"
9 #include "core/paint/ClipPathClipper.h" 9 #include "core/paint/ClipPathClipper.h"
10 #include "core/paint/FilterPainter.h" 10 #include "core/paint/FilterPainter.h"
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 m_paintLayer.layoutObject() && 262 m_paintLayer.layoutObject() &&
263 m_paintLayer.layoutObject()->isLayoutView()) { 263 m_paintLayer.layoutObject()->isLayoutView()) {
264 const auto* objectPaintProperties = 264 const auto* objectPaintProperties =
265 m_paintLayer.layoutObject()->paintProperties(); 265 m_paintLayer.layoutObject()->paintProperties();
266 DCHECK(objectPaintProperties && 266 DCHECK(objectPaintProperties &&
267 objectPaintProperties->localBorderBoxProperties()); 267 objectPaintProperties->localBorderBoxProperties());
268 PaintChunkProperties properties( 268 PaintChunkProperties properties(
269 context.getPaintController().currentPaintChunkProperties()); 269 context.getPaintController().currentPaintChunkProperties());
270 auto& localBorderBoxProperties = 270 auto& localBorderBoxProperties =
271 *objectPaintProperties->localBorderBoxProperties(); 271 *objectPaintProperties->localBorderBoxProperties();
272 properties.transform = 272 properties.propertyTreeState = localBorderBoxProperties.propertyTreeState;
273 localBorderBoxProperties.propertyTreeState.transform();
274 properties.scroll = localBorderBoxProperties.propertyTreeState.scroll();
275 properties.clip = localBorderBoxProperties.propertyTreeState.clip();
276 properties.effect = localBorderBoxProperties.propertyTreeState.effect();
277 properties.backfaceHidden = 273 properties.backfaceHidden =
278 m_paintLayer.layoutObject()->hasHiddenBackface(); 274 m_paintLayer.layoutObject()->hasHiddenBackface();
279 scopedPaintChunkProperties.emplace(context.getPaintController(), 275 scopedPaintChunkProperties.emplace(context.getPaintController(),
280 m_paintLayer, properties); 276 m_paintLayer, properties);
281 } 277 }
282 278
283 DCHECK(m_paintLayer.isSelfPaintingLayer() || 279 DCHECK(m_paintLayer.isSelfPaintingLayer() ||
284 m_paintLayer.hasSelfPaintingLayerDescendant()); 280 m_paintLayer.hasSelfPaintingLayerDescendant());
285 DCHECK(!(paintFlags & PaintLayerAppliedTransform)); 281 DCHECK(!(paintFlags & PaintLayerAppliedTransform));
286 282
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 m_paintLayer.layoutObject() && 500 m_paintLayer.layoutObject() &&
505 m_paintLayer.layoutObject()->isLayoutView())); 501 m_paintLayer.layoutObject()->isLayoutView()));
506 const auto* objectPaintProperties = 502 const auto* objectPaintProperties =
507 m_paintLayer.layoutObject()->paintProperties(); 503 m_paintLayer.layoutObject()->paintProperties();
508 DCHECK(objectPaintProperties && 504 DCHECK(objectPaintProperties &&
509 objectPaintProperties->localBorderBoxProperties()); 505 objectPaintProperties->localBorderBoxProperties());
510 PaintChunkProperties properties( 506 PaintChunkProperties properties(
511 context.getPaintController().currentPaintChunkProperties()); 507 context.getPaintController().currentPaintChunkProperties());
512 auto& localBorderBoxProperties = 508 auto& localBorderBoxProperties =
513 *objectPaintProperties->localBorderBoxProperties(); 509 *objectPaintProperties->localBorderBoxProperties();
514 properties.transform = 510 properties.propertyTreeState = localBorderBoxProperties.propertyTreeState;
515 localBorderBoxProperties.propertyTreeState.transform();
516 properties.scroll = localBorderBoxProperties.propertyTreeState.scroll();
517 properties.clip = localBorderBoxProperties.propertyTreeState.clip();
518 properties.effect = localBorderBoxProperties.propertyTreeState.effect();
519 properties.backfaceHidden = 511 properties.backfaceHidden =
520 m_paintLayer.layoutObject()->hasHiddenBackface(); 512 m_paintLayer.layoutObject()->hasHiddenBackface();
521 contentScopedPaintChunkProperties.emplace(context.getPaintController(), 513 contentScopedPaintChunkProperties.emplace(context.getPaintController(),
522 m_paintLayer, properties); 514 m_paintLayer, properties);
523 } 515 }
524 516
525 bool isPaintingRootLayer = (&m_paintLayer) == paintingInfo.rootLayer; 517 bool isPaintingRootLayer = (&m_paintLayer) == paintingInfo.rootLayer;
526 bool shouldPaintBackground = 518 bool shouldPaintBackground =
527 shouldPaintContent && !selectionOnly && 519 shouldPaintContent && !selectionOnly &&
528 (isPaintingCompositedBackground || 520 (isPaintingCompositedBackground ||
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
1158 1150
1159 PaintLayerPaintingInfo paintingInfo(&m_paintLayer, 1151 PaintLayerPaintingInfo paintingInfo(&m_paintLayer,
1160 LayoutRect(enclosingIntRect(damageRect)), 1152 LayoutRect(enclosingIntRect(damageRect)),
1161 paintFlags, LayoutSize()); 1153 paintFlags, LayoutSize());
1162 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); 1154 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars);
1163 1155
1164 m_paintLayer.setContainsDirtyOverlayScrollbars(false); 1156 m_paintLayer.setContainsDirtyOverlayScrollbars(false);
1165 } 1157 }
1166 1158
1167 } // namespace blink 1159 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698