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 2640983002: Rename paint data structures (Closed)
Patch Set: DrawingDisplayItem Created 3 years, 10 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/compositing_display_item.h" 10 #include "cc/playback/compositing_display_item.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 return json; 214 return json;
215 } 215 }
216 216
217 namespace { 217 namespace {
218 218
219 static gfx::Rect largeRect(-200000, -200000, 400000, 400000); 219 static gfx::Rect largeRect(-200000, -200000, 400000, 400000);
220 220
221 static void appendDisplayItemToCcDisplayItemList(const DisplayItem& displayItem, 221 static void appendDisplayItemToCcDisplayItemList(const DisplayItem& displayItem,
222 cc::DisplayItemList* list) { 222 cc::DisplayItemList* list) {
223 if (DisplayItem::isDrawingType(displayItem.getType())) { 223 if (DisplayItem::isDrawingType(displayItem.getType())) {
224 const SkPicture* picture = 224 const PaintRecord* picture =
225 static_cast<const DrawingDisplayItem&>(displayItem).picture(); 225 static_cast<const DrawingDisplayItem&>(displayItem).picture();
226 if (!picture) 226 if (!picture)
227 return; 227 return;
228 // In theory we would pass the bounds of the picture, previously done as: 228 // In theory we would pass the bounds of the picture, previously done as:
229 // gfx::Rect bounds = gfx::SkIRectToRect(picture->cullRect().roundOut()); 229 // gfx::Rect bounds = gfx::SkIRectToRect(picture->cullRect().roundOut());
230 // or use the visual rect directly. However, clip content layers attempt 230 // or use the visual rect directly. However, clip content layers attempt
231 // to raster in a different space than that of the visual rects. We'll be 231 // to raster in a different space than that of the visual rects. We'll be
232 // reworking visual rects further for SPv2, so for now we just pass a 232 // reworking visual rects further for SPv2, so for now we just pass a
233 // visual rect large enough to make sure items raster. 233 // visual rect large enough to make sure items raster.
234 list->CreateAndAppendDrawingItem<cc::DrawingDisplayItem>( 234 list->CreateAndAppendDrawingItem<cc::DrawingDisplayItem>(
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 #ifndef NDEBUG 746 #ifndef NDEBUG
747 void PaintArtifactCompositor::showDebugData() { 747 void PaintArtifactCompositor::showDebugData() {
748 LOG(ERROR) << layersAsJSON(LayerTreeIncludesDebugInfo) 748 LOG(ERROR) << layersAsJSON(LayerTreeIncludesDebugInfo)
749 ->toPrettyJSONString() 749 ->toPrettyJSONString()
750 .utf8() 750 .utf8()
751 .data(); 751 .data();
752 } 752 }
753 #endif 753 #endif
754 754
755 } // namespace blink 755 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698