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

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

Issue 1835843002: WIP: Fix foreignObject cullrect Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 if (!picture) 84 if (!picture)
85 return; 85 return;
86 gfx::Rect bounds = gfx::SkIRectToRect(picture->cullRect().roundOut()); 86 gfx::Rect bounds = gfx::SkIRectToRect(picture->cullRect().roundOut());
87 list->CreateAndAppendItem<cc::DrawingDisplayItem>(bounds, sk_ref_sp(pict ure)); 87 list->CreateAndAppendItem<cc::DrawingDisplayItem>(bounds, sk_ref_sp(pict ure));
88 } 88 }
89 } 89 }
90 90
91 static scoped_refptr<cc::DisplayItemList> recordPaintChunk(const PaintArtifact& artifact, const PaintChunk& chunk, const gfx::Rect& combinedBounds) 91 static scoped_refptr<cc::DisplayItemList> recordPaintChunk(const PaintArtifact& artifact, const PaintChunk& chunk, const gfx::Rect& combinedBounds)
92 { 92 {
93 cc::DisplayItemListSettings settings; 93 cc::DisplayItemListSettings settings;
94 scoped_refptr<cc::DisplayItemList> list = cc::DisplayItemList::Create( 94 scoped_refptr<cc::DisplayItemList> list = cc::DisplayItemList::Create(settin gs);
95 gfx::Rect(combinedBounds.size()), settings);
96 95
97 gfx::Transform translation; 96 gfx::Transform translation;
98 translation.Translate(-combinedBounds.x(), -combinedBounds.y()); 97 translation.Translate(-combinedBounds.x(), -combinedBounds.y());
99 // TODO(jbroman, wkorman): What visual rectangle is wanted here? 98 // TODO(jbroman, wkorman): What visual rectangle is wanted here?
100 list->CreateAndAppendItem<cc::TransformDisplayItem>(gfx::Rect(), translation ); 99 list->CreateAndAppendItem<cc::TransformDisplayItem>(gfx::Rect(), translation );
101 100
102 const DisplayItemList& displayItems = artifact.getDisplayItemList(); 101 const DisplayItemList& displayItems = artifact.getDisplayItemList();
103 for (const auto& displayItem : displayItems.itemsInPaintChunk(chunk)) 102 for (const auto& displayItem : displayItems.itemsInPaintChunk(chunk))
104 appendDisplayItemToCcDisplayItemList(displayItem, list.get()); 103 appendDisplayItemToCcDisplayItemList(displayItem, list.get());
105 104
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 layer->SetIsDrawable(true); 310 layer->SetIsDrawable(true);
312 layer->SetDoubleSided(!paintChunk.properties.backfaceHidden); 311 layer->SetDoubleSided(!paintChunk.properties.backfaceHidden);
313 if (paintChunk.knownToBeOpaque) 312 if (paintChunk.knownToBeOpaque)
314 layer->SetContentsOpaque(true); 313 layer->SetContentsOpaque(true);
315 m_contentLayerClients.append(contentLayerClient.release()); 314 m_contentLayerClients.append(contentLayerClient.release());
316 return layer; 315 return layer;
317 } 316 }
318 317
319 318
320 } // namespace blink 319 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698