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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 640203002: [C++11 Allowed Features] Declares a type-safe null pointer converting from NULL to nullptr [part-… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: format fix. Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 3e5c74c8a0468e749abab471af6554cb7a7770e8..e38d5bc60d5948c8c455fb041f54af35e65af7c2 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -169,7 +169,7 @@ LayerTreeHost::~LayerTreeHost() {
overhang_ui_resource_ = nullptr;
if (root_layer_.get())
- root_layer_->SetLayerTreeHost(NULL);
+ root_layer_->SetLayerTreeHost(nullptr);
if (proxy_) {
DCHECK(proxy_->IsMainThread());
@@ -177,13 +177,13 @@ LayerTreeHost::~LayerTreeHost() {
}
// We must clear any pointers into the layer tree prior to destroying it.
- RegisterViewportLayers(NULL, NULL, NULL);
+ RegisterViewportLayers(nullptr, nullptr, nullptr);
if (root_layer_.get()) {
// The layer tree must be destroyed before the layer tree host. We've
// made a contract with our animation controllers that the registrar
// will outlive them, and we must make good.
- root_layer_ = NULL;
+ root_layer_ = nullptr;
}
}
@@ -320,7 +320,7 @@ void LayerTreeHost::FinishCommitOnImplThread(LayerTreeHostImpl* host_impl) {
sync_tree->root_layer(), hud_layer_->id());
sync_tree->set_hud_layer(static_cast<HeadsUpDisplayLayerImpl*>(hud_impl));
} else {
- sync_tree->set_hud_layer(NULL);
+ sync_tree->set_hud_layer(nullptr);
}
sync_tree->set_background_color(background_color_);
@@ -404,7 +404,7 @@ void LayerTreeHost::UpdateHudLayer() {
root_layer_->AddChild(hud_layer_);
} else if (hud_layer_.get()) {
hud_layer_->RemoveFromParent();
- hud_layer_ = NULL;
+ hud_layer_ = nullptr;
}
}
@@ -432,7 +432,7 @@ scoped_ptr<LayerTreeHostImpl> LayerTreeHost::CreateLayerTreeHostImpl(
shared_bitmap_manager_,
id_);
host_impl->SetUseGpuRasterization(UseGpuRasterization());
- shared_bitmap_manager_ = NULL;
+ shared_bitmap_manager_ = nullptr;
if (settings_.calculate_top_controls_position &&
host_impl->top_controls_manager()) {
top_controls_manager_weak_ptr_ =
@@ -571,7 +571,7 @@ void LayerTreeHost::SetRootLayer(scoped_refptr<Layer> root_layer) {
return;
if (root_layer_.get())
- root_layer_->SetLayerTreeHost(NULL);
+ root_layer_->SetLayerTreeHost(nullptr);
root_layer_ = root_layer;
if (root_layer_.get()) {
DCHECK(!root_layer_->parent());
@@ -750,7 +750,7 @@ bool LayerTreeHost::UpdateLayers(ResourceUpdateQueue* queue) {
static Layer* FindFirstScrollableLayer(Layer* layer) {
if (!layer)
- return NULL;
+ return nullptr;
if (layer->scrollable())
return layer;
@@ -761,7 +761,7 @@ static Layer* FindFirstScrollableLayer(Layer* layer) {
return found;
}
- return NULL;
+ return nullptr;
}
void LayerTreeHost::RecordGpuRasterizationHistogram() {
@@ -997,15 +997,16 @@ void LayerTreeHost::PaintMasksForRenderSurface(Layer* render_surface_layer,
Layer* mask_layer = render_surface_layer->mask_layer();
if (mask_layer) {
- *did_paint_content |= mask_layer->Update(queue, NULL);
+ *did_paint_content |= mask_layer->Update(queue, nullptr);
*need_more_updates |= mask_layer->NeedMoreUpdates();
}
Layer* replica_mask_layer =
- render_surface_layer->replica_layer() ?
- render_surface_layer->replica_layer()->mask_layer() : NULL;
+ render_surface_layer->replica_layer()
+ ? render_surface_layer->replica_layer()->mask_layer()
+ : nullptr;
if (replica_mask_layer) {
- *did_paint_content |= replica_mask_layer->Update(queue, NULL);
+ *did_paint_content |= replica_mask_layer->Update(queue, nullptr);
*need_more_updates |= replica_mask_layer->NeedMoreUpdates();
}
}
@@ -1223,7 +1224,7 @@ void LayerTreeHost::AnimateLayers(base::TimeTicks monotonic_time) {
++iter) {
(*iter).second->Animate(monotonic_time);
bool start_ready_animations = true;
- (*iter).second->UpdateState(start_ready_animations, NULL);
+ (*iter).second->UpdateState(start_ready_animations, nullptr);
}
}

Powered by Google App Engine
This is Rietveld 408576698