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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/compositing/PaintChunksToCcLayer.cpp

Issue 2793233002: Remove begin/end subseq. display items, and store on PaintController instead. (Closed)
Patch Set: none Created 3 years, 8 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 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 "platform/graphics/compositing/PaintChunksToCcLayer.h" 5 #include "platform/graphics/compositing/PaintChunksToCcLayer.h"
6 6
7 #include "cc/paint/compositing_display_item.h" 7 #include "cc/paint/compositing_display_item.h"
8 #include "cc/paint/display_item_list.h" 8 #include "cc/paint/display_item_list.h"
9 #include "cc/paint/drawing_display_item.h" 9 #include "cc/paint/drawing_display_item.h"
10 #include "cc/paint/filter_display_item.h" 10 #include "cc/paint/filter_display_item.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 ccList->CreateAndAppendPairedEndItem<cc::EndFilterDisplayItem>(); 173 ccList->CreateAndAppendPairedEndItem<cc::EndFilterDisplayItem>();
174 ccList->CreateAndAppendPairedEndItem<cc::EndCompositingDisplayItem>(); 174 ccList->CreateAndAppendPairedEndItem<cc::EndCompositingDisplayItem>();
175 break; 175 break;
176 } 176 }
177 } 177 }
178 } 178 }
179 179
180 static gfx::Rect largeRect(-200000, -200000, 400000, 400000); 180 static gfx::Rect largeRect(-200000, -200000, 400000, 400000);
181 static void appendDisplayItemToCcDisplayItemList(const DisplayItem& displayItem, 181 static void appendDisplayItemToCcDisplayItemList(const DisplayItem& displayItem,
182 cc::DisplayItemList* list) { 182 cc::DisplayItemList* list) {
183 DCHECK(DisplayItem::isDrawingType(displayItem.getType()) || 183 DCHECK(DisplayItem::isDrawingType(displayItem.getType()));
184 displayItem.getType() == DisplayItem::kSubsequence ||
185 displayItem.getType() == DisplayItem::kEndSubsequence);
186 if (DisplayItem::isDrawingType(displayItem.getType())) { 184 if (DisplayItem::isDrawingType(displayItem.getType())) {
187 sk_sp<const PaintRecord> record = 185 sk_sp<const PaintRecord> record =
188 static_cast<const DrawingDisplayItem&>(displayItem).GetPaintRecord(); 186 static_cast<const DrawingDisplayItem&>(displayItem).GetPaintRecord();
189 if (!record) 187 if (!record)
190 return; 188 return;
191 // In theory we would pass the bounds of the record, previously done as: 189 // In theory we would pass the bounds of the record, previously done as:
192 // gfx::Rect bounds = gfx::SkIRectToRect(record->cullRect().roundOut()); 190 // gfx::Rect bounds = gfx::SkIRectToRect(record->cullRect().roundOut());
193 // or use the visual rect directly. However, clip content layers attempt 191 // or use the visual rect directly. However, clip content layers attempt
194 // to raster in a different space than that of the visual rects. We'll be 192 // to raster in a different space than that of the visual rects. We'll be
195 // reworking visual rects further for SPv2, so for now we just pass a 193 // reworking visual rects further for SPv2, so for now we just pass a
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 recordPairedEndDisplayItems(endDisplayItems, ccList.get()); 234 recordPairedEndDisplayItems(endDisplayItems, ccList.get());
237 } 235 }
238 236
239 ccList->CreateAndAppendPairedEndItem<cc::EndTransformDisplayItem>(); 237 ccList->CreateAndAppendPairedEndItem<cc::EndTransformDisplayItem>();
240 238
241 ccList->Finalize(); 239 ccList->Finalize();
242 return ccList; 240 return ccList;
243 } 241 }
244 242
245 } // namespace blink 243 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/BUILD.gn ('k') | third_party/WebKit/Source/platform/graphics/paint/DisplayItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698