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

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

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) 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
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.h ('k') | third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698