OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights |
3 * reserved. | 3 * 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 int bit_fields; | 98 int bit_fields; |
99 void* pointers[11]; | 99 void* pointers[11]; |
100 LayoutUnit layout_units[4]; | 100 LayoutUnit layout_units[4]; |
101 IntSize size; | 101 IntSize size; |
102 Persistent<PaintLayerScrollableArea> scrollable_area; | 102 Persistent<PaintLayerScrollableArea> scrollable_area; |
103 struct { | 103 struct { |
104 IntSize size; | 104 IntSize size; |
105 void* pointer; | 105 void* pointer; |
106 LayoutRect rect; | 106 LayoutRect rect; |
107 } previous_paint_status; | 107 } previous_paint_status; |
| 108 uint64_t unique_id; |
108 }; | 109 }; |
109 | 110 |
110 static_assert(sizeof(PaintLayer) == sizeof(SameSizeAsPaintLayer), | 111 static_assert(sizeof(PaintLayer) == sizeof(SameSizeAsPaintLayer), |
111 "PaintLayer should stay small"); | 112 "PaintLayer should stay small"); |
112 | 113 |
113 bool IsReferenceClipPath(const ClipPathOperation* clip_operation) { | 114 bool IsReferenceClipPath(const ClipPathOperation* clip_operation) { |
114 return clip_operation && | 115 return clip_operation && |
115 clip_operation->GetType() == ClipPathOperation::REFERENCE; | 116 clip_operation->GetType() == ClipPathOperation::REFERENCE; |
116 } | 117 } |
117 | 118 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 self_painting_status_changed_(false), | 161 self_painting_status_changed_(false), |
161 layout_object_(layout_object), | 162 layout_object_(layout_object), |
162 parent_(0), | 163 parent_(0), |
163 previous_(0), | 164 previous_(0), |
164 next_(0), | 165 next_(0), |
165 first_(0), | 166 first_(0), |
166 last_(0), | 167 last_(0), |
167 static_inline_position_(0), | 168 static_inline_position_(0), |
168 static_block_position_(0), | 169 static_block_position_(0), |
169 ancestor_overflow_layer_(nullptr) { | 170 ancestor_overflow_layer_(nullptr) { |
| 171 static PaintLayerId paint_layer_id_counter = 0; |
| 172 unique_id_ = ++paint_layer_id_counter; |
170 UpdateStackingNode(); | 173 UpdateStackingNode(); |
171 | 174 |
172 is_self_painting_layer_ = ShouldBeSelfPaintingLayer(); | 175 is_self_painting_layer_ = ShouldBeSelfPaintingLayer(); |
173 | 176 |
174 UpdateScrollableArea(); | 177 UpdateScrollableArea(); |
175 } | 178 } |
176 | 179 |
177 PaintLayer::~PaintLayer() { | 180 PaintLayer::~PaintLayer() { |
178 if (rare_data_ && rare_data_->resource_info) { | 181 if (rare_data_ && rare_data_->resource_info) { |
179 const ComputedStyle& style = GetLayoutObject().StyleRef(); | 182 const ComputedStyle& style = GetLayoutObject().StyleRef(); |
(...skipping 3161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3341 } | 3344 } |
3342 | 3345 |
3343 void showLayerTree(const blink::LayoutObject* layoutObject) { | 3346 void showLayerTree(const blink::LayoutObject* layoutObject) { |
3344 if (!layoutObject) { | 3347 if (!layoutObject) { |
3345 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; | 3348 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; |
3346 return; | 3349 return; |
3347 } | 3350 } |
3348 showLayerTree(layoutObject->EnclosingLayer()); | 3351 showLayerTree(layoutObject->EnclosingLayer()); |
3349 } | 3352 } |
3350 #endif | 3353 #endif |
OLD | NEW |