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

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 1547893003: WIP - compositor worker mega patch. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 /* 1 /*
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 211
212 PassOwnPtr<GraphicsLayer> CompositedLayerMapping::createGraphicsLayer(Compositin gReasons reasons) 212 PassOwnPtr<GraphicsLayer> CompositedLayerMapping::createGraphicsLayer(Compositin gReasons reasons)
213 { 213 {
214 GraphicsLayerFactory* graphicsLayerFactory = nullptr; 214 GraphicsLayerFactory* graphicsLayerFactory = nullptr;
215 if (Page* page = layoutObject()->frame()->page()) 215 if (Page* page = layoutObject()->frame()->page())
216 graphicsLayerFactory = page->chromeClient().graphicsLayerFactory(); 216 graphicsLayerFactory = page->chromeClient().graphicsLayerFactory();
217 217
218 OwnPtr<GraphicsLayer> graphicsLayer = GraphicsLayer::create(graphicsLayerFac tory, this); 218 OwnPtr<GraphicsLayer> graphicsLayer = GraphicsLayer::create(graphicsLayerFac tory, this);
219 219
220 graphicsLayer->setCompositingReasons(reasons); 220 graphicsLayer->setCompositingReasons(reasons);
221 if (Node* owningNode = m_owningLayer.layoutObject()->generatingNode())
222 graphicsLayer->setOwnerNodeId(DOMNodeIds::idForNode(owningNode));
223
224 return graphicsLayer.release(); 221 return graphicsLayer.release();
225 } 222 }
226 223
227 void CompositedLayerMapping::createPrimaryGraphicsLayer() 224 void CompositedLayerMapping::createPrimaryGraphicsLayer()
228 { 225 {
229 m_graphicsLayer = createGraphicsLayer(m_owningLayer.compositingReasons()); 226 m_graphicsLayer = createGraphicsLayer(m_owningLayer.compositingReasons());
230 227
231 updateOpacity(layoutObject()->styleRef()); 228 updateOpacity(layoutObject()->styleRef());
232 updateTransform(layoutObject()->styleRef()); 229 updateTransform(layoutObject()->styleRef());
233 updateFilters(layoutObject()->styleRef()); 230 updateFilters(layoutObject()->styleRef());
(...skipping 2364 matching lines...) Expand 10 before | Expand all | Expand 10 after
2598 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { 2595 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) {
2599 name = "Scrolling Block Selection Layer"; 2596 name = "Scrolling Block Selection Layer";
2600 } else { 2597 } else {
2601 ASSERT_NOT_REACHED(); 2598 ASSERT_NOT_REACHED();
2602 } 2599 }
2603 2600
2604 return name; 2601 return name;
2605 } 2602 }
2606 2603
2607 } // namespace blink 2604 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698