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

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: Update test expectations. Created 4 years, 5 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 if (!picture) 87 if (!picture)
88 return; 88 return;
89 gfx::Rect bounds = gfx::SkIRectToRect(picture->cullRect().roundOut()); 89 gfx::Rect bounds = gfx::SkIRectToRect(picture->cullRect().roundOut());
90 list->CreateAndAppendItem<cc::DrawingDisplayItem>(bounds, sk_ref_sp(pict ure)); 90 list->CreateAndAppendItem<cc::DrawingDisplayItem>(bounds, sk_ref_sp(pict ure));
91 } 91 }
92 } 92 }
93 93
94 static scoped_refptr<cc::DisplayItemList> recordPaintChunk(const PaintArtifact& artifact, const PaintChunk& chunk, const gfx::Rect& combinedBounds) 94 static scoped_refptr<cc::DisplayItemList> recordPaintChunk(const PaintArtifact& artifact, const PaintChunk& chunk, const gfx::Rect& combinedBounds)
95 { 95 {
96 cc::DisplayItemListSettings settings; 96 cc::DisplayItemListSettings settings;
97 scoped_refptr<cc::DisplayItemList> list = cc::DisplayItemList::Create( 97 scoped_refptr<cc::DisplayItemList> list = cc::DisplayItemList::Create(settin gs);
98 gfx::Rect(combinedBounds.size()), settings);
99 98
100 gfx::Transform translation; 99 gfx::Transform translation;
101 translation.Translate(-combinedBounds.x(), -combinedBounds.y()); 100 translation.Translate(-combinedBounds.x(), -combinedBounds.y());
102 // TODO(jbroman, wkorman): What visual rectangle is wanted here? 101 // TODO(jbroman, wkorman): What visual rectangle is wanted here?
103 list->CreateAndAppendItem<cc::TransformDisplayItem>(gfx::Rect(), translation ); 102 list->CreateAndAppendItem<cc::TransformDisplayItem>(gfx::Rect(), translation );
104 103
105 const DisplayItemList& displayItems = artifact.getDisplayItemList(); 104 const DisplayItemList& displayItems = artifact.getDisplayItemList();
106 for (const auto& displayItem : displayItems.itemsInPaintChunk(chunk)) 105 for (const auto& displayItem : displayItems.itemsInPaintChunk(chunk))
107 appendDisplayItemToCcDisplayItemList(displayItem, list.get()); 106 appendDisplayItemToCcDisplayItemList(displayItem, list.get());
108 107
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 if (m_extraDataForTestingEnabled) 430 if (m_extraDataForTestingEnabled)
432 m_extraDataForTesting->contentLayers.append(layer); 431 m_extraDataForTesting->contentLayers.append(layer);
433 } 432 }
434 433
435 // Mark the property trees as having been rebuilt. 434 // Mark the property trees as having been rebuilt.
436 host->property_trees()->sequence_number = kPropertyTreeSequenceNumber; 435 host->property_trees()->sequence_number = kPropertyTreeSequenceNumber;
437 host->property_trees()->needs_rebuild = false; 436 host->property_trees()->needs_rebuild = false;
438 } 437 }
439 438
440 } // namespace blink 439 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698