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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayer.h

Issue 2890953002: [SPv1] Always set a CompositorElementId on main graphics layers; use PaintLayer id. (Closed)
Patch Set: none Created 3 years, 7 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 /* 1 /*
2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Intel Corporation. All rights reserved. 3 * Copyright (C) 2013 Intel Corporation. All rights reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@web.de> 10 * Christian Biesinger <cbiesinger@web.de>
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 class CompositedLayerMapping; 67 class CompositedLayerMapping;
68 class CompositorFilterOperations; 68 class CompositorFilterOperations;
69 class ComputedStyle; 69 class ComputedStyle;
70 class FilterEffect; 70 class FilterEffect;
71 class FilterOperations; 71 class FilterOperations;
72 class HitTestResult; 72 class HitTestResult;
73 class HitTestingTransformState; 73 class HitTestingTransformState;
74 class PaintLayerCompositor; 74 class PaintLayerCompositor;
75 class TransformationMatrix; 75 class TransformationMatrix;
76 76
77 using PaintLayerId = uint64_t;
78
77 enum IncludeSelfOrNot { kIncludeSelf, kExcludeSelf }; 79 enum IncludeSelfOrNot { kIncludeSelf, kExcludeSelf };
78 80
79 enum CompositingQueryMode { 81 enum CompositingQueryMode {
80 kCompositingQueriesAreAllowed, 82 kCompositingQueriesAreAllowed,
81 kCompositingQueriesAreOnlyAllowedInCertainDocumentLifecyclePhases 83 kCompositingQueriesAreOnlyAllowedInCertainDocumentLifecyclePhases
82 }; 84 };
83 85
84 // FIXME: remove this once the compositing query DCHECKS are no longer hit. 86 // FIXME: remove this once the compositing query DCHECKS are no longer hit.
85 class CORE_EXPORT DisableCompositingQueryAsserts { 87 class CORE_EXPORT DisableCompositingQueryAsserts {
86 STACK_ALLOCATED(); 88 STACK_ALLOCATED();
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 } 1018 }
1017 void ClearSelfPaintingStatusChanged() { 1019 void ClearSelfPaintingStatusChanged() {
1018 DCHECK(!RuntimeEnabledFeatures::slimmingPaintV2Enabled()); 1020 DCHECK(!RuntimeEnabledFeatures::slimmingPaintV2Enabled());
1019 self_painting_status_changed_ = false; 1021 self_painting_status_changed_ = false;
1020 } 1022 }
1021 1023
1022 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS 1024 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS
1023 void EndShouldKeepAliveAllClientsRecursive(); 1025 void EndShouldKeepAliveAllClientsRecursive();
1024 #endif 1026 #endif
1025 1027
1028 // An id for this PaintLayer that is unique for the lifetime of the WebView.
1029 PaintLayerId UniqueId() const { return unique_id_; }
1030
1026 private: 1031 private:
1027 void SetNeedsCompositingInputsUpdateInternal(); 1032 void SetNeedsCompositingInputsUpdateInternal();
1028 1033
1029 void Update3DTransformedDescendantStatus(); 1034 void Update3DTransformedDescendantStatus();
1030 1035
1031 // Bounding box in the coordinates of this layer. 1036 // Bounding box in the coordinates of this layer.
1032 LayoutRect LogicalBoundingBox() const; 1037 LayoutRect LogicalBoundingBox() const;
1033 1038
1034 bool HasOverflowControls() const; 1039 bool HasOverflowControls() const;
1035 1040
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1263 mutable std::unique_ptr<ClipRectsCache> clip_rects_cache_; 1268 mutable std::unique_ptr<ClipRectsCache> clip_rects_cache_;
1264 1269
1265 std::unique_ptr<PaintLayerStackingNode> stacking_node_; 1270 std::unique_ptr<PaintLayerStackingNode> stacking_node_;
1266 1271
1267 IntSize previous_scroll_offset_accumulation_for_painting_; 1272 IntSize previous_scroll_offset_accumulation_for_painting_;
1268 RefPtr<ClipRects> previous_clip_rects_; 1273 RefPtr<ClipRects> previous_clip_rects_;
1269 LayoutRect previous_paint_dirty_rect_; 1274 LayoutRect previous_paint_dirty_rect_;
1270 1275
1271 std::unique_ptr<PaintLayerRareData> rare_data_; 1276 std::unique_ptr<PaintLayerRareData> rare_data_;
1272 1277
1278 PaintLayerId unique_id_;
1279
1273 FRIEND_TEST_ALL_PREFIXES(PaintLayerTest, 1280 FRIEND_TEST_ALL_PREFIXES(PaintLayerTest,
1274 DescendantDependentFlagsStopsAtThrottledFrames); 1281 DescendantDependentFlagsStopsAtThrottledFrames);
1275 FRIEND_TEST_ALL_PREFIXES(PaintLayerTest, 1282 FRIEND_TEST_ALL_PREFIXES(PaintLayerTest,
1276 PaintLayerTransformUpdatedOnStyleTransformAnimation); 1283 PaintLayerTransformUpdatedOnStyleTransformAnimation);
1277 }; 1284 };
1278 1285
1279 } // namespace blink 1286 } // namespace blink
1280 1287
1281 #ifndef NDEBUG 1288 #ifndef NDEBUG
1282 // Outside the WebCore namespace for ease of invocation from gdb. 1289 // Outside the WebCore namespace for ease of invocation from gdb.
1283 CORE_EXPORT void showLayerTree(const blink::PaintLayer*); 1290 CORE_EXPORT void showLayerTree(const blink::PaintLayer*);
1284 CORE_EXPORT void showLayerTree(const blink::LayoutObject*); 1291 CORE_EXPORT void showLayerTree(const blink::LayoutObject*);
1285 #endif 1292 #endif
1286 1293
1287 #endif // Layer_h 1294 #endif // Layer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698