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

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

Issue 2523673004: [NOT FOR COMMIT] Fully replace SkCanvas uses.
Patch Set: Support Android build. Created 3 years, 12 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 return json; 200 return json;
201 } 201 }
202 202
203 namespace { 203 namespace {
204 204
205 static gfx::Rect largeRect(-200000, -200000, 400000, 400000); 205 static gfx::Rect largeRect(-200000, -200000, 400000, 400000);
206 206
207 static void appendDisplayItemToCcDisplayItemList(const DisplayItem& displayItem, 207 static void appendDisplayItemToCcDisplayItemList(const DisplayItem& displayItem,
208 cc::DisplayItemList* list) { 208 cc::DisplayItemList* list) {
209 if (DisplayItem::isDrawingType(displayItem.getType())) { 209 if (DisplayItem::isDrawingType(displayItem.getType())) {
210 const SkPicture* picture = 210 const CdlPicture* picture =
211 static_cast<const DrawingDisplayItem&>(displayItem).picture(); 211 static_cast<const DrawingDisplayItem&>(displayItem).picture();
212 if (!picture) 212 if (!picture)
213 return; 213 return;
214 // In theory we would pass the bounds of the picture, previously done as: 214 // In theory we would pass the bounds of the picture, previously done as:
215 // gfx::Rect bounds = gfx::SkIRectToRect(picture->cullRect().roundOut()); 215 // gfx::Rect bounds = gfx::SkIRectToRect(picture->cullRect().roundOut());
216 // or use the visual rect directly. However, clip content layers attempt 216 // or use the visual rect directly. However, clip content layers attempt
217 // to raster in a different space than that of the visual rects. We'll be 217 // to raster in a different space than that of the visual rects. We'll be
218 // reworking visual rects further for SPv2, so for now we just pass a 218 // reworking visual rects further for SPv2, so for now we just pass a
219 // visual rect large enough to make sure items raster. 219 // visual rect large enough to make sure items raster.
220 list->CreateAndAppendDrawingItem<cc::DrawingDisplayItem>( 220 list->CreateAndAppendDrawingItem<cc::DrawingDisplayItem>(
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 m_contentLayerClients.clear(); 820 m_contentLayerClients.clear();
821 m_contentLayerClients.swap(newContentLayerClients); 821 m_contentLayerClients.swap(newContentLayerClients);
822 822
823 // Mark the property trees as having been rebuilt. 823 // Mark the property trees as having been rebuilt.
824 layerTree->property_trees()->sequence_number = kPropertyTreeSequenceNumber; 824 layerTree->property_trees()->sequence_number = kPropertyTreeSequenceNumber;
825 layerTree->property_trees()->needs_rebuild = false; 825 layerTree->property_trees()->needs_rebuild = false;
826 layerTree->property_trees()->ResetCachedData(); 826 layerTree->property_trees()->ResetCachedData();
827 } 827 }
828 828
829 } // namespace blink 829 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698