Index: cc/layers/tiled_layer_unittest.cc |
diff --git a/cc/layers/tiled_layer_unittest.cc b/cc/layers/tiled_layer_unittest.cc |
index 3af0e3f53f8d0c0625f765addadf0ab026580bb0..9846874c59d958e91b9a06542b16c9252c23a858 100644 |
--- a/cc/layers/tiled_layer_unittest.cc |
+++ b/cc/layers/tiled_layer_unittest.cc |
@@ -94,12 +94,12 @@ class SynchronousOutputSurfaceLayerTreeHost : public LayerTreeHost { |
class TiledLayerTest : public testing::Test { |
public: |
TiledLayerTest() |
- : proxy_(NULL), |
+ : proxy_(nullptr), |
output_surface_(FakeOutputSurface::Create3d()), |
queue_(make_scoped_ptr(new ResourceUpdateQueue)), |
impl_thread_("ImplThread"), |
fake_layer_tree_host_client_(FakeLayerTreeHostClient::DIRECT_3D), |
- occlusion_(NULL) { |
+ occlusion_(nullptr) { |
settings_.max_partial_texture_updates = std::numeric_limits<size_t>::max(); |
settings_.layer_transforms_should_scale_layer_contents = true; |
} |
@@ -125,7 +125,7 @@ class TiledLayerTest : public testing::Test { |
impl_thread_and_main_thread_blocked(proxy_); |
resource_provider_ = ResourceProvider::Create(output_surface_.get(), |
shared_bitmap_manager_.get(), |
- NULL, |
+ nullptr, |
0, |
false, |
1, |
@@ -161,7 +161,7 @@ class TiledLayerTest : public testing::Test { |
impl_thread_and_main_thread_blocked(proxy_); |
DCHECK(queue_); |
scoped_ptr<ResourceUpdateController> update_controller = |
- ResourceUpdateController::Create(NULL, |
+ ResourceUpdateController::Create(nullptr, |
proxy_->ImplThreadTaskRunner(), |
queue_.Pass(), |
resource_provider_.get()); |
@@ -722,7 +722,7 @@ TEST_F(TiledLayerTest, PaintSmallAnimatedLayersImmediately) { |
layer->SetTexturePriorities(priority_calculator_); |
resource_manager_->PrioritizeTextures(); |
layer->SavePaintProperties(); |
- layer->Update(queue_.get(), NULL); |
+ layer->Update(queue_.get(), nullptr); |
UpdateTextures(); |
LayerPushPropertiesTo(layer.get(), layer_impl.get()); |
@@ -910,7 +910,7 @@ TEST_F(TiledLayerTest, VerifyUpdateRectWhenContentBoundsAreScaled) { |
layer->SetTexturePriorities(priority_calculator_); |
resource_manager_->PrioritizeTextures(); |
layer->SavePaintProperties(); |
- layer->Update(queue_.get(), NULL); |
+ layer->Update(queue_.get(), nullptr); |
// Update rect is 200x300 (tile size of 100x100). Scaled this gives 400x240. |
EXPECT_FLOAT_RECT_EQ(gfx::RectF(0, 0, 400, 240), layer->update_rect()); |
@@ -922,7 +922,7 @@ TEST_F(TiledLayerTest, VerifyUpdateRectWhenContentBoundsAreScaled) { |
resource_manager_->PrioritizeTextures(); |
layer->InvalidateContentRect(content_bounds); |
layer->SavePaintProperties(); |
- layer->Update(queue_.get(), NULL); |
+ layer->Update(queue_.get(), nullptr); |
EXPECT_FLOAT_RECT_EQ(gfx::RectF(layer_bounds), layer->update_rect()); |
UpdateTextures(); |
@@ -933,7 +933,7 @@ TEST_F(TiledLayerTest, VerifyUpdateRectWhenContentBoundsAreScaled) { |
layer->SetTexturePriorities(priority_calculator_); |
resource_manager_->PrioritizeTextures(); |
layer->SavePaintProperties(); |
- layer->Update(queue_.get(), NULL); |
+ layer->Update(queue_.get(), nullptr); |
EXPECT_FLOAT_RECT_EQ(gfx::RectF(60, 80, 20, 8), layer->update_rect()); |
} |
@@ -950,7 +950,7 @@ TEST_F(TiledLayerTest, VerifyInvalidationWhenContentsScaleChanges) { |
layer->SetBounds(gfx::Size(100, 100)); |
CalcDrawProps(&render_surface_layer_list); |
layer->draw_properties().visible_content_rect = gfx::Rect(0, 0, 100, 100); |
- layer->Update(queue_.get(), NULL); |
+ layer->Update(queue_.get(), nullptr); |
UpdateTextures(); |
EXPECT_FLOAT_RECT_EQ(gfx::RectF(0, 0, 100, 100), |
layer->last_needs_display_rect()); |
@@ -959,7 +959,7 @@ TEST_F(TiledLayerTest, VerifyInvalidationWhenContentsScaleChanges) { |
layer->SetTexturePriorities(priority_calculator_); |
resource_manager_->PrioritizeTextures(); |
layer->SavePaintProperties(); |
- layer->Update(queue_.get(), NULL); |
+ layer->Update(queue_.get(), nullptr); |
UpdateTextures(); |
LayerPushPropertiesTo(layer.get(), layer_impl.get()); |
EXPECT_TRUE(layer_impl->HasResourceIdForTileAt(0, 0)); |
@@ -978,7 +978,7 @@ TEST_F(TiledLayerTest, VerifyInvalidationWhenContentsScaleChanges) { |
layer->SetTexturePriorities(priority_calculator_); |
resource_manager_->PrioritizeTextures(); |
layer->SavePaintProperties(); |
- layer->Update(queue_.get(), NULL); |
+ layer->Update(queue_.get(), nullptr); |
UpdateTextures(); |
LayerPushPropertiesTo(layer.get(), layer_impl.get()); |
EXPECT_TRUE(layer_impl->HasResourceIdForTileAt(0, 0)); |
@@ -1048,7 +1048,7 @@ TEST_F(TiledLayerTest, SkipsDrawGetsReset) { |
ResourceManagerClearAllMemory(layer_tree_host_->contents_texture_manager(), |
resource_provider_.get()); |
- layer_tree_host_->SetRootLayer(NULL); |
+ layer_tree_host_->SetRootLayer(nullptr); |
} |
TEST_F(TiledLayerTest, ResizeToSmaller) { |
@@ -1064,7 +1064,7 @@ TEST_F(TiledLayerTest, ResizeToSmaller) { |
layer->SetTexturePriorities(priority_calculator_); |
resource_manager_->PrioritizeTextures(); |
layer->SavePaintProperties(); |
- layer->Update(queue_.get(), NULL); |
+ layer->Update(queue_.get(), nullptr); |
layer->SetBounds(gfx::Size(200, 200)); |
layer->InvalidateContentRect(gfx::Rect(0, 0, 200, 200)); |
@@ -1085,7 +1085,7 @@ TEST_F(TiledLayerTest, HugeLayerUpdateCrash) { |
layer->SetTexturePriorities(priority_calculator_); |
resource_manager_->PrioritizeTextures(); |
layer->SavePaintProperties(); |
- layer->Update(queue_.get(), NULL); |
+ layer->Update(queue_.get(), nullptr); |
} |
class TiledLayerPartialUpdateTest : public TiledLayerTest { |
@@ -1198,7 +1198,7 @@ TEST_F(TiledLayerPartialUpdateTest, PartialUpdates) { |
ResourceManagerClearAllMemory(layer_tree_host_->contents_texture_manager(), |
resource_provider_.get()); |
- layer_tree_host_->SetRootLayer(NULL); |
+ layer_tree_host_->SetRootLayer(nullptr); |
} |
TEST_F(TiledLayerTest, TilesPaintedWithoutOcclusion) { |
@@ -1215,7 +1215,7 @@ TEST_F(TiledLayerTest, TilesPaintedWithoutOcclusion) { |
layer->SetTexturePriorities(priority_calculator_); |
resource_manager_->PrioritizeTextures(); |
layer->SavePaintProperties(); |
- layer->Update(queue_.get(), NULL); |
+ layer->Update(queue_.get(), nullptr); |
EXPECT_EQ(2, layer->fake_layer_updater()->update_count()); |
} |
@@ -1639,7 +1639,7 @@ TEST_F(TiledLayerTest, DontAllocateContentsWhenTargetSurfaceCantBeAllocated) { |
ResourceManagerClearAllMemory(layer_tree_host_->contents_texture_manager(), |
resource_provider_.get()); |
- layer_tree_host_->SetRootLayer(NULL); |
+ layer_tree_host_->SetRootLayer(nullptr); |
} |
class TrackingLayerPainter : public LayerPainter { |
@@ -1705,7 +1705,7 @@ TEST_F(TiledLayerTest, NonIntegerContentsScaleIsNotDistortedDuringPaint) { |
layer->SavePaintProperties(); |
// Update the whole tile. |
- layer->Update(queue_.get(), NULL); |
+ layer->Update(queue_.get(), nullptr); |
layer->tracking_layer_painter()->ResetPaintedRect(); |
EXPECT_RECT_EQ(gfx::Rect(), layer->tracking_layer_painter()->PaintedRect()); |
@@ -1714,7 +1714,7 @@ TEST_F(TiledLayerTest, NonIntegerContentsScaleIsNotDistortedDuringPaint) { |
// Invalidate the entire layer in content space. When painting, the rect given |
// to webkit should match the layer's bounds. |
layer->InvalidateContentRect(content_rect); |
- layer->Update(queue_.get(), NULL); |
+ layer->Update(queue_.get(), nullptr); |
// Rounding leads to an extra pixel. |
gfx::Rect expanded_layer_rect(layer_rect); |
@@ -1744,7 +1744,7 @@ TEST_F(TiledLayerTest, |
layer->SavePaintProperties(); |
// Update the whole tile. |
- layer->Update(queue_.get(), NULL); |
+ layer->Update(queue_.get(), nullptr); |
layer->tracking_layer_painter()->ResetPaintedRect(); |
EXPECT_RECT_EQ(gfx::Rect(), layer->tracking_layer_painter()->PaintedRect()); |
@@ -1753,7 +1753,7 @@ TEST_F(TiledLayerTest, |
// Invalidate the entire layer in layer space. When painting, the rect given |
// to webkit should match the layer's bounds. |
layer->SetNeedsDisplayRect(layer_rect); |
- layer->Update(queue_.get(), NULL); |
+ layer->Update(queue_.get(), nullptr); |
// Rounding leads to an extra pixel. |
gfx::Rect expanded_layer_rect(layer_rect); |