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

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

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 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 | 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 3897 matching lines...) Expand 10 before | Expand all | Expand 10 after
3908 3908
3909 void RenderLayer::updateOrRemoveFilterEffectRenderer() 3909 void RenderLayer::updateOrRemoveFilterEffectRenderer()
3910 { 3910 {
3911 // FilterEffectRenderer is only used to render the filters in software mode, 3911 // FilterEffectRenderer is only used to render the filters in software mode,
3912 // so we always need to run updateOrRemoveFilterEffectRenderer after the com posited 3912 // so we always need to run updateOrRemoveFilterEffectRenderer after the com posited
3913 // mode might have changed for this layer. 3913 // mode might have changed for this layer.
3914 if (!paintsWithFilters()) { 3914 if (!paintsWithFilters()) {
3915 // Don't delete the whole filter info here, because we might use it 3915 // Don't delete the whole filter info here, because we might use it
3916 // for loading CSS shader files. 3916 // for loading CSS shader files.
3917 if (RenderLayerFilterInfo* filterInfo = this->filterInfo()) 3917 if (RenderLayerFilterInfo* filterInfo = this->filterInfo())
3918 filterInfo->setRenderer(0); 3918 filterInfo->setRenderer(nullptr);
3919 3919
3920 return; 3920 return;
3921 } 3921 }
3922 3922
3923 RenderLayerFilterInfo* filterInfo = ensureFilterInfo(); 3923 RenderLayerFilterInfo* filterInfo = ensureFilterInfo();
3924 if (!filterInfo->renderer()) { 3924 if (!filterInfo->renderer()) {
3925 RefPtr<FilterEffectRenderer> filterRenderer = FilterEffectRenderer::crea te(); 3925 RefPtr<FilterEffectRenderer> filterRenderer = FilterEffectRenderer::crea te();
3926 filterRenderer->setIsAccelerated(renderer()->frame()->settings()->accele ratedFiltersEnabled()); 3926 filterRenderer->setIsAccelerated(renderer()->frame()->settings()->accele ratedFiltersEnabled());
3927 filterInfo->setRenderer(filterRenderer.release()); 3927 filterInfo->setRenderer(filterRenderer.release());
3928 3928
3929 // We can optimize away code paths in other places if we know that there are no software filters. 3929 // We can optimize away code paths in other places if we know that there are no software filters.
3930 renderer()->document().view()->setHasSoftwareFilters(true); 3930 renderer()->document().view()->setHasSoftwareFilters(true);
3931 } 3931 }
3932 3932
3933 // If the filter fails to build, remove it from the layer. It will still att empt to 3933 // If the filter fails to build, remove it from the layer. It will still att empt to
3934 // go through regular processing (e.g. compositing), but never apply anythin g. 3934 // go through regular processing (e.g. compositing), but never apply anythin g.
3935 if (!filterInfo->renderer()->build(renderer(), computeFilterOperations(rende rer()->style()))) 3935 if (!filterInfo->renderer()->build(renderer(), computeFilterOperations(rende rer()->style())))
3936 filterInfo->setRenderer(0); 3936 filterInfo->setRenderer(nullptr);
3937 } 3937 }
3938 3938
3939 void RenderLayer::filterNeedsRepaint() 3939 void RenderLayer::filterNeedsRepaint()
3940 { 3940 {
3941 { 3941 {
3942 DeprecatedScheduleStyleRecalcDuringLayout marker(renderer()->document(). lifecycle()); 3942 DeprecatedScheduleStyleRecalcDuringLayout marker(renderer()->document(). lifecycle());
3943 // It's possible for scheduleLayerUpdate to schedule a style recalc, whi ch 3943 // It's possible for scheduleLayerUpdate to schedule a style recalc, whi ch
3944 // is a problem because this function can be called while performing lay out. 3944 // is a problem because this function can be called while performing lay out.
3945 // Presumably this represents an illegal data flow of layout or composit ing 3945 // Presumably this represents an illegal data flow of layout or composit ing
3946 // information into the style system. 3946 // information into the style system.
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
4010 } 4010 }
4011 } 4011 }
4012 4012
4013 void showLayerTree(const WebCore::RenderObject* renderer) 4013 void showLayerTree(const WebCore::RenderObject* renderer)
4014 { 4014 {
4015 if (!renderer) 4015 if (!renderer)
4016 return; 4016 return;
4017 showLayerTree(renderer->enclosingLayer()); 4017 showLayerTree(renderer->enclosingLayer());
4018 } 4018 }
4019 #endif 4019 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderImageResourceStyleImage.cpp ('k') | Source/core/rendering/RenderLayerScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698