| Index: cc/layers/picture_layer_impl.cc
|
| diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
|
| index c294a330635797c82f7186c4768a87962738ba23..5550a7c29b5114e5d2a7232d2e9d7240957722a0 100644
|
| --- a/cc/layers/picture_layer_impl.cc
|
| +++ b/cc/layers/picture_layer_impl.cc
|
| @@ -48,7 +48,7 @@ const float kGpuSkewportTargetTimeInFrames = 0.0f;
|
|
|
| namespace cc {
|
|
|
| -PictureLayerImpl::Pair::Pair() : active(NULL), pending(NULL) {
|
| +PictureLayerImpl::Pair::Pair() : active(nullptr), pending(nullptr) {
|
| }
|
|
|
| PictureLayerImpl::Pair::Pair(PictureLayerImpl* active_layer,
|
| @@ -61,7 +61,7 @@ PictureLayerImpl::Pair::~Pair() {
|
|
|
| PictureLayerImpl::PictureLayerImpl(LayerTreeImpl* tree_impl, int id)
|
| : LayerImpl(tree_impl, id),
|
| - twin_layer_(NULL),
|
| + twin_layer_(nullptr),
|
| pile_(PicturePileImpl::Create()),
|
| ideal_page_scale_(0.f),
|
| ideal_device_scale_(0.f),
|
| @@ -111,8 +111,8 @@ void PictureLayerImpl::PushPropertiesTo(LayerImpl* base_layer) {
|
|
|
| // When the pending tree pushes to the active tree, the pending twin
|
| // becomes recycled.
|
| - layer_impl->twin_layer_ = NULL;
|
| - twin_layer_ = NULL;
|
| + layer_impl->twin_layer_ = nullptr;
|
| + twin_layer_ = nullptr;
|
|
|
| layer_impl->pile_ = pile_;
|
|
|
| @@ -623,7 +623,7 @@ const Region* PictureLayerImpl::GetInvalidation() {
|
| const PictureLayerTiling* PictureLayerImpl::GetTwinTiling(
|
| const PictureLayerTiling* tiling) const {
|
| if (!twin_layer_)
|
| - return NULL;
|
| + return nullptr;
|
| return twin_layer_->tilings_->TilingAtScale(tiling->contents_scale());
|
| }
|
|
|
| @@ -631,7 +631,7 @@ PictureLayerTiling* PictureLayerImpl::GetRecycledTwinTiling(
|
| const PictureLayerTiling* tiling) {
|
| PictureLayerImpl* recycled_twin = GetRecycledTwinLayer();
|
| if (!recycled_twin || !recycled_twin->tilings_)
|
| - return NULL;
|
| + return nullptr;
|
| return recycled_twin->tilings_->TilingAtScale(tiling->contents_scale());
|
| }
|
|
|
| @@ -826,8 +826,8 @@ void PictureLayerImpl::MarkVisibleResourcesAsRequired() const {
|
| }
|
| }
|
|
|
| - PictureLayerTiling* high_res = NULL;
|
| - PictureLayerTiling* low_res = NULL;
|
| + PictureLayerTiling* high_res = nullptr;
|
| + PictureLayerTiling* low_res = nullptr;
|
|
|
| // First pass: ready to draw tiles in acceptable but non-ideal tilings are
|
| // marked as required for activation so that their textures are not thrown
|
| @@ -863,8 +863,8 @@ void PictureLayerImpl::MarkVisibleResourcesAsRequired() const {
|
| // simpification just below), then high res tiles will be required to fill any
|
| // holes left by the first pass above. If the pointers are valid, then this
|
| // layer is allowed to skip any tiles that are not ready on its twin.
|
| - const PictureLayerTiling* twin_high_res = NULL;
|
| - const PictureLayerTiling* twin_low_res = NULL;
|
| + const PictureLayerTiling* twin_high_res = nullptr;
|
| + const PictureLayerTiling* twin_low_res = nullptr;
|
|
|
| if (twin_layer_) {
|
| // As a simplification, only allow activating to skip twin tiles that the
|
| @@ -874,8 +874,8 @@ void PictureLayerImpl::MarkVisibleResourcesAsRequired() const {
|
| // tilings during the last draw call on the active layer.
|
| if (tilings_->num_tilings() <= 2 &&
|
| twin_layer_->tilings_->num_tilings() <= tilings_->num_tilings()) {
|
| - twin_low_res = low_res ? GetTwinTiling(low_res) : NULL;
|
| - twin_high_res = high_res ? GetTwinTiling(high_res) : NULL;
|
| + twin_low_res = low_res ? GetTwinTiling(low_res) : nullptr;
|
| + twin_high_res = high_res ? GetTwinTiling(high_res) : nullptr;
|
| }
|
|
|
| // If this layer and its twin have different transforms, then don't compare
|
| @@ -885,8 +885,8 @@ void PictureLayerImpl::MarkVisibleResourcesAsRequired() const {
|
| bounds() != twin_layer_->bounds() ||
|
| draw_properties().screen_space_transform !=
|
| twin_layer_->draw_properties().screen_space_transform) {
|
| - twin_high_res = NULL;
|
| - twin_low_res = NULL;
|
| + twin_high_res = nullptr;
|
| + twin_low_res = nullptr;
|
| }
|
| }
|
|
|
| @@ -1015,10 +1015,10 @@ inline float PositiveRatio(float float1, float float2) {
|
| } // namespace
|
|
|
| void PictureLayerImpl::AddTilingsForRasterScale() {
|
| - PictureLayerTiling* high_res = NULL;
|
| - PictureLayerTiling* low_res = NULL;
|
| + PictureLayerTiling* high_res = nullptr;
|
| + PictureLayerTiling* low_res = nullptr;
|
|
|
| - PictureLayerTiling* previous_low_res = NULL;
|
| + PictureLayerTiling* previous_low_res = nullptr;
|
| for (size_t i = 0; i < tilings_->num_tilings(); ++i) {
|
| PictureLayerTiling* tiling = tilings_->tiling_at(i);
|
| if (tiling->contents_scale() == raster_contents_scale_)
|
| @@ -1516,7 +1516,7 @@ bool PictureLayerImpl::AllTilesRequiredForActivationAreReadyToDraw() const {
|
| }
|
|
|
| PictureLayerImpl::LayerRasterTileIterator::LayerRasterTileIterator()
|
| - : layer_(NULL), current_stage_(arraysize(stages_)) {
|
| + : layer_(nullptr), current_stage_(arraysize(stages_)) {
|
| }
|
|
|
| PictureLayerImpl::LayerRasterTileIterator::LayerRasterTileIterator(
|
| @@ -1637,7 +1637,7 @@ void PictureLayerImpl::LayerRasterTileIterator::AdvanceToNextStage() {
|
| }
|
|
|
| PictureLayerImpl::LayerEvictionTileIterator::LayerEvictionTileIterator()
|
| - : layer_(NULL),
|
| + : layer_(nullptr),
|
| tree_priority_(SAME_PRIORITY_FOR_BOTH_TREES),
|
| current_category_(PictureLayerTiling::EVENTUALLY),
|
| current_tiling_range_type_(PictureLayerTilingSet::HIGHER_THAN_HIGH_RES),
|
|
|