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

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

Issue 1484163002: Raster display item lists via a visual rect RTree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to head and flip for LayoutInline. Created 4 years, 6 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/PaintArtifactCompositor.h" 5 #include "platform/graphics/compositing/PaintArtifactCompositor.h"
6 6
7 #include "cc/layers/content_layer_client.h" 7 #include "cc/layers/content_layer_client.h"
8 #include "cc/layers/layer.h" 8 #include "cc/layers/layer.h"
9 #include "cc/layers/picture_layer.h" 9 #include "cc/layers/picture_layer.h"
10 #include "cc/playback/display_item_list.h" 10 #include "cc/playback/display_item_list.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 if (!picture) 85 if (!picture)
86 return; 86 return;
87 gfx::Rect bounds = gfx::SkIRectToRect(picture->cullRect().roundOut()); 87 gfx::Rect bounds = gfx::SkIRectToRect(picture->cullRect().roundOut());
88 list->CreateAndAppendItem<cc::DrawingDisplayItem>(bounds, sk_ref_sp(pict ure)); 88 list->CreateAndAppendItem<cc::DrawingDisplayItem>(bounds, sk_ref_sp(pict ure));
89 } 89 }
90 } 90 }
91 91
92 static scoped_refptr<cc::DisplayItemList> recordPaintChunk(const PaintArtifact& artifact, const PaintChunk& chunk, const gfx::Rect& combinedBounds) 92 static scoped_refptr<cc::DisplayItemList> recordPaintChunk(const PaintArtifact& artifact, const PaintChunk& chunk, const gfx::Rect& combinedBounds)
93 { 93 {
94 cc::DisplayItemListSettings settings; 94 cc::DisplayItemListSettings settings;
95 scoped_refptr<cc::DisplayItemList> list = cc::DisplayItemList::Create( 95 scoped_refptr<cc::DisplayItemList> list = cc::DisplayItemList::Create(settin gs);
96 gfx::Rect(combinedBounds.size()), settings);
97 96
98 gfx::Transform translation; 97 gfx::Transform translation;
99 translation.Translate(-combinedBounds.x(), -combinedBounds.y()); 98 translation.Translate(-combinedBounds.x(), -combinedBounds.y());
100 // TODO(jbroman, wkorman): What visual rectangle is wanted here? 99 // TODO(jbroman, wkorman): What visual rectangle is wanted here?
101 list->CreateAndAppendItem<cc::TransformDisplayItem>(gfx::Rect(), translation ); 100 list->CreateAndAppendItem<cc::TransformDisplayItem>(gfx::Rect(), translation );
102 101
103 const DisplayItemList& displayItems = artifact.getDisplayItemList(); 102 const DisplayItemList& displayItems = artifact.getDisplayItemList();
104 for (const auto& displayItem : displayItems.itemsInPaintChunk(chunk)) 103 for (const auto& displayItem : displayItems.itemsInPaintChunk(chunk))
105 appendDisplayItemToCcDisplayItemList(displayItem, list.get()); 104 appendDisplayItemToCcDisplayItemList(displayItem, list.get());
106 105
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 layer->SetEffectTreeIndex(kSecondaryRootNodeId); 421 layer->SetEffectTreeIndex(kSecondaryRootNodeId);
423 layer->SetScrollTreeIndex(kSecondaryRootNodeId); 422 layer->SetScrollTreeIndex(kSecondaryRootNodeId);
424 } 423 }
425 424
426 // Mark the property trees as having been rebuilt. 425 // Mark the property trees as having been rebuilt.
427 host->property_trees()->sequence_number = kPropertyTreeSequenceNumber; 426 host->property_trees()->sequence_number = kPropertyTreeSequenceNumber;
428 host->property_trees()->needs_rebuild = false; 427 host->property_trees()->needs_rebuild = false;
429 } 428 }
430 429
431 } // namespace blink 430 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698