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

Unified Diff: cc/trees/layer_tree_host_unittest_occlusion.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_unittest_occlusion.cc
diff --git a/cc/trees/layer_tree_host_unittest_occlusion.cc b/cc/trees/layer_tree_host_unittest_occlusion.cc
index 943299dd229be8b6e6a1f57a3f8f9dbbb8825441..9b0078b054d1fe203acf7ef5e1cf02111cef6b03 100644
--- a/cc/trees/layer_tree_host_unittest_occlusion.cc
+++ b/cc/trees/layer_tree_host_unittest_occlusion.cc
@@ -119,9 +119,12 @@ class LayerTreeHostOcclusionTestOcclusionSurfaceClipping
virtual void SetupTree() override {
// The child layer is a surface and the grand_child is opaque, but clipped
// to the child and root
- SetLayerPropertiesForTesting(
- root_.get(), NULL, identity_matrix_,
- gfx::PointF(0.f, 0.f), gfx::Size(200, 200), true);
+ SetLayerPropertiesForTesting(root_.get(),
+ nullptr,
+ identity_matrix_,
+ gfx::PointF(0.f, 0.f),
+ gfx::Size(200, 200),
+ true);
SetLayerPropertiesForTesting(
child_.get(), root_.get(), identity_matrix_,
gfx::PointF(10.f, 10.f), gfx::Size(500, 500), false);
@@ -149,9 +152,12 @@ class LayerTreeHostOcclusionTestOcclusionSurfaceClippingOpaque
virtual void SetupTree() override {
// If the child layer is opaque, then it adds to the occlusion seen by the
// root_.
- SetLayerPropertiesForTesting(
- root_.get(), NULL, identity_matrix_,
- gfx::PointF(0.f, 0.f), gfx::Size(200, 200), true);
+ SetLayerPropertiesForTesting(root_.get(),
+ nullptr,
+ identity_matrix_,
+ gfx::PointF(0.f, 0.f),
+ gfx::Size(200, 200),
+ true);
SetLayerPropertiesForTesting(
child_.get(), root_.get(), identity_matrix_,
gfx::PointF(10.f, 10.f), gfx::Size(500, 500), true);
@@ -178,9 +184,12 @@ class LayerTreeHostOcclusionTestOcclusionTwoChildren
public:
virtual void SetupTree() override {
// Add a second child to the root layer and the regions should merge
- SetLayerPropertiesForTesting(
- root_.get(), NULL, identity_matrix_,
- gfx::PointF(0.f, 0.f), gfx::Size(200, 200), true);
+ SetLayerPropertiesForTesting(root_.get(),
+ nullptr,
+ identity_matrix_,
+ gfx::PointF(0.f, 0.f),
+ gfx::Size(200, 200),
+ true);
SetLayerPropertiesForTesting(
child_.get(), root_.get(), identity_matrix_,
gfx::PointF(10.f, 10.f), gfx::Size(500, 500), false);
@@ -212,9 +221,12 @@ class LayerTreeHostOcclusionTestOcclusionMask
virtual void SetupTree() override {
// If the child layer has a mask on it, then it shouldn't contribute to
// occlusion on stuff below it.
- SetLayerPropertiesForTesting(
- root_.get(), NULL, identity_matrix_,
- gfx::PointF(0.f, 0.f), gfx::Size(200, 200), true);
+ SetLayerPropertiesForTesting(root_.get(),
+ nullptr,
+ identity_matrix_,
+ gfx::PointF(0.f, 0.f),
+ gfx::Size(200, 200),
+ true);
SetLayerPropertiesForTesting(
child2_.get(), root_.get(), identity_matrix_,
gfx::PointF(10.f, 10.f), gfx::Size(500, 500), true);
@@ -246,9 +258,12 @@ class LayerTreeHostOcclusionTestOcclusionMaskBelowOcclusion
// If the child layer with a mask is below child2, then child2 should
// contribute to occlusion on everything, and child shouldn't contribute
// to the root_.
- SetLayerPropertiesForTesting(
- root_.get(), NULL, identity_matrix_,
- gfx::PointF(0.f, 0.f), gfx::Size(200, 200), true);
+ SetLayerPropertiesForTesting(root_.get(),
+ nullptr,
+ identity_matrix_,
+ gfx::PointF(0.f, 0.f),
+ gfx::Size(200, 200),
+ true);
SetLayerPropertiesForTesting(
child_.get(), root_.get(), identity_matrix_,
gfx::PointF(10.f, 10.f), gfx::Size(500, 500), true);
@@ -281,9 +296,12 @@ class LayerTreeHostOcclusionTestOcclusionOpacity
virtual void SetupTree() override {
// If the child layer has a non-opaque opacity, then it shouldn't
// contribute to occlusion on stuff below it
- SetLayerPropertiesForTesting(
- root_.get(), NULL, identity_matrix_,
- gfx::PointF(0.f, 0.f), gfx::Size(200, 200), true);
+ SetLayerPropertiesForTesting(root_.get(),
+ nullptr,
+ identity_matrix_,
+ gfx::PointF(0.f, 0.f),
+ gfx::Size(200, 200),
+ true);
SetLayerPropertiesForTesting(
child2_.get(), root_.get(), identity_matrix_,
gfx::PointF(20.f, 10.f), gfx::Size(10, 500), true);
@@ -315,9 +333,12 @@ class LayerTreeHostOcclusionTestOcclusionOpacityBelowOcclusion
// If the child layer with non-opaque opacity is below child2, then
// child2 should contribute to occlusion on everything, and child shouldn't
// contribute to the root_.
- SetLayerPropertiesForTesting(
- root_.get(), NULL, identity_matrix_,
- gfx::PointF(0.f, 0.f), gfx::Size(200, 200), true);
+ SetLayerPropertiesForTesting(root_.get(),
+ nullptr,
+ identity_matrix_,
+ gfx::PointF(0.f, 0.f),
+ gfx::Size(200, 200),
+ true);
SetLayerPropertiesForTesting(
child_.get(), root_.get(), identity_matrix_,
gfx::PointF(10.f, 10.f), gfx::Size(500, 500), true);
@@ -350,9 +371,12 @@ class LayerTreeHostOcclusionTestOcclusionBlending
virtual void SetupTree() override {
// If the child layer has a blend mode, then it shouldn't
// contribute to occlusion on stuff below it
- SetLayerPropertiesForTesting(
- root_.get(), NULL, identity_matrix_,
- gfx::PointF(0.f, 0.f), gfx::Size(200, 200), true);
+ SetLayerPropertiesForTesting(root_.get(),
+ nullptr,
+ identity_matrix_,
+ gfx::PointF(0.f, 0.f),
+ gfx::Size(200, 200),
+ true);
SetLayerPropertiesForTesting(
child2_.get(), root_.get(), identity_matrix_,
gfx::PointF(20.f, 10.f), gfx::Size(10, 500), true);
@@ -384,9 +408,12 @@ class LayerTreeHostOcclusionTestOcclusionBlendingBelowOcclusion
// If the child layer with a blend mode is below child2, then
// child2 should contribute to occlusion on everything, and child shouldn't
// contribute to the root_.
- SetLayerPropertiesForTesting(
- root_.get(), NULL, identity_matrix_,
- gfx::PointF(0.f, 0.f), gfx::Size(200, 200), true);
+ SetLayerPropertiesForTesting(root_.get(),
+ nullptr,
+ identity_matrix_,
+ gfx::PointF(0.f, 0.f),
+ gfx::Size(200, 200),
+ true);
SetLayerPropertiesForTesting(
child_.get(), root_.get(), identity_matrix_,
gfx::PointF(10.f, 10.f), gfx::Size(500, 500), true);
@@ -422,9 +449,12 @@ class LayerTreeHostOcclusionTestOcclusionOpacityFilter
// If the child layer has a filter that changes alpha values, and is below
// child2, then child2 should contribute to occlusion on everything,
// and child shouldn't contribute to the root
- SetLayerPropertiesForTesting(
- root_.get(), NULL, identity_matrix_,
- gfx::PointF(0.f, 0.f), gfx::Size(200, 200), true);
+ SetLayerPropertiesForTesting(root_.get(),
+ nullptr,
+ identity_matrix_,
+ gfx::PointF(0.f, 0.f),
+ gfx::Size(200, 200),
+ true);
SetLayerPropertiesForTesting(child_.get(),
root_.get(),
identity_matrix_,
@@ -479,9 +509,12 @@ class LayerTreeHostOcclusionTestOcclusionBlurFilter
// If the child layer has a filter that moves pixels/changes alpha, and is
// below child2, then child should not inherit occlusion from outside its
// subtree, and should not contribute to the root
- SetLayerPropertiesForTesting(
- root_.get(), NULL, identity_matrix_,
- gfx::PointF(0.f, 0.f), gfx::Size(200, 200), true);
+ SetLayerPropertiesForTesting(root_.get(),
+ nullptr,
+ identity_matrix_,
+ gfx::PointF(0.f, 0.f),
+ gfx::Size(200, 200),
+ true);
SetLayerPropertiesForTesting(
child_.get(), root_.get(), child_transform,
gfx::PointF(30.f, 30.f), gfx::Size(500, 500), true);
@@ -516,9 +549,12 @@ class LayerTreeHostOcclusionTestOcclusionCopyRequest
// then child should not inherit occlusion from outside its subtree.
// The child layer will still receive occlusion from inside, and
// the root layer will recive occlusion from child.
- SetLayerPropertiesForTesting(
- root_.get(), NULL, identity_matrix_,
- gfx::PointF(), gfx::Size(100, 100), true);
+ SetLayerPropertiesForTesting(root_.get(),
+ nullptr,
+ identity_matrix_,
+ gfx::PointF(),
+ gfx::Size(100, 100),
+ true);
SetLayerPropertiesForTesting(
child_.get(), root_.get(), identity_matrix_,
gfx::PointF(), gfx::Size(75, 75), true);
@@ -551,9 +587,12 @@ class LayerTreeHostOcclusionTestOcclusionReplica
// then child should not inherit occlusion from outside its subtree.
// The child layer will still receive occlusion from inside, and
// the root layer will recive occlusion from child.
- SetLayerPropertiesForTesting(
- root_.get(), NULL, identity_matrix_,
- gfx::PointF(), gfx::Size(100, 100), true);
+ SetLayerPropertiesForTesting(root_.get(),
+ nullptr,
+ identity_matrix_,
+ gfx::PointF(),
+ gfx::Size(100, 100),
+ true);
SetLayerPropertiesForTesting(
child_.get(), root_.get(), identity_matrix_,
gfx::PointF(), gfx::Size(75, 75), true);
@@ -592,10 +631,12 @@ class LayerTreeHostOcclusionTestManySurfaces
for (int i = 0; i < num_surfaces; ++i) {
layers.push_back(TestLayer::Create());
if (i == 0) {
- SetLayerPropertiesForTesting(
- layers.back().get(), NULL, identity_matrix_,
- gfx::PointF(0.f, 0.f),
- gfx::Size(root_width, root_height), true);
+ SetLayerPropertiesForTesting(layers.back().get(),
+ nullptr,
+ identity_matrix_,
+ gfx::PointF(0.f, 0.f),
+ gfx::Size(root_width, root_height),
+ true);
} else {
SetLayerPropertiesForTesting(
layers.back().get(), layers[layers.size() - 2].get(),

Powered by Google App Engine
This is Rietveld 408576698