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

Side by Side Diff: Source/core/rendering/RenderLayer.cpp

Issue 678163002: Oilpan: move SVG property hierarchy to the heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased upto r185213 Created 6 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 2705 matching lines...) Expand 10 before | Expand all | Expand 10 after
2716 FilterOperations RenderLayer::computeFilterOperations(const RenderStyle* style) 2716 FilterOperations RenderLayer::computeFilterOperations(const RenderStyle* style)
2717 { 2717 {
2718 const FilterOperations& filters = style->filter(); 2718 const FilterOperations& filters = style->filter();
2719 if (filters.hasReferenceFilter()) { 2719 if (filters.hasReferenceFilter()) {
2720 for (size_t i = 0; i < filters.size(); ++i) { 2720 for (size_t i = 0; i < filters.size(); ++i) {
2721 FilterOperation* filterOperation = filters.operations().at(i).get(); 2721 FilterOperation* filterOperation = filters.operations().at(i).get();
2722 if (filterOperation->type() != FilterOperation::REFERENCE) 2722 if (filterOperation->type() != FilterOperation::REFERENCE)
2723 continue; 2723 continue;
2724 ReferenceFilterOperation* referenceOperation = toReferenceFilterOper ation(filterOperation); 2724 ReferenceFilterOperation* referenceOperation = toReferenceFilterOper ation(filterOperation);
2725 // FIXME: Cache the ReferenceFilter if it didn't change. 2725 // FIXME: Cache the ReferenceFilter if it didn't change.
2726 RefPtr<ReferenceFilter> referenceFilter = ReferenceFilter::create(st yle->effectiveZoom()); 2726 RefPtrWillBeRawPtr<ReferenceFilter> referenceFilter = ReferenceFilte r::create(style->effectiveZoom());
2727 referenceFilter->setLastEffect(ReferenceFilterBuilder::build(referen ceFilter.get(), renderer(), referenceFilter->sourceGraphic(), 2727 referenceFilter->setLastEffect(ReferenceFilterBuilder::build(referen ceFilter.get(), renderer(), referenceFilter->sourceGraphic(),
2728 referenceOperation)); 2728 referenceOperation));
2729 referenceOperation->setFilter(referenceFilter.release()); 2729 referenceOperation->setFilter(referenceFilter.release());
2730 } 2730 }
2731 } 2731 }
2732 2732
2733 return filters; 2733 return filters;
2734 } 2734 }
2735 2735
2736 void RenderLayer::updateOrRemoveFilterClients() 2736 void RenderLayer::updateOrRemoveFilterClients()
(...skipping 18 matching lines...) Expand all
2755 // Don't delete the whole filter info here, because we might use it 2755 // Don't delete the whole filter info here, because we might use it
2756 // for loading CSS shader files. 2756 // for loading CSS shader files.
2757 if (RenderLayerFilterInfo* filterInfo = this->filterInfo()) 2757 if (RenderLayerFilterInfo* filterInfo = this->filterInfo())
2758 filterInfo->setRenderer(nullptr); 2758 filterInfo->setRenderer(nullptr);
2759 2759
2760 return; 2760 return;
2761 } 2761 }
2762 2762
2763 RenderLayerFilterInfo* filterInfo = ensureFilterInfo(); 2763 RenderLayerFilterInfo* filterInfo = ensureFilterInfo();
2764 if (!filterInfo->renderer()) { 2764 if (!filterInfo->renderer()) {
2765 RefPtr<FilterEffectRenderer> filterRenderer = FilterEffectRenderer::crea te(); 2765 RefPtrWillBeRawPtr<FilterEffectRenderer> filterRenderer = FilterEffectRe nderer::create();
2766 filterInfo->setRenderer(filterRenderer.release()); 2766 filterInfo->setRenderer(filterRenderer.release());
2767 } 2767 }
2768 2768
2769 // If the filter fails to build, remove it from the layer. It will still att empt to 2769 // If the filter fails to build, remove it from the layer. It will still att empt to
2770 // go through regular processing (e.g. compositing), but never apply anythin g. 2770 // go through regular processing (e.g. compositing), but never apply anythin g.
2771 if (!filterInfo->renderer()->build(renderer(), computeFilterOperations(rende rer()->style()))) 2771 if (!filterInfo->renderer()->build(renderer(), computeFilterOperations(rende rer()->style())))
2772 filterInfo->setRenderer(nullptr); 2772 filterInfo->setRenderer(nullptr);
2773 } 2773 }
2774 2774
2775 void RenderLayer::filterNeedsPaintInvalidation() 2775 void RenderLayer::filterNeedsPaintInvalidation()
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
2854 } 2854 }
2855 } 2855 }
2856 2856
2857 void showLayerTree(const blink::RenderObject* renderer) 2857 void showLayerTree(const blink::RenderObject* renderer)
2858 { 2858 {
2859 if (!renderer) 2859 if (!renderer)
2860 return; 2860 return;
2861 showLayerTree(renderer->enclosingLayer()); 2861 showLayerTree(renderer->enclosingLayer());
2862 } 2862 }
2863 #endif 2863 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/FilterEffectRenderer.cpp ('k') | Source/core/rendering/RenderLayerFilterInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698