Index: gpu/ipc/service/ca_layer_tree_unittest_mac.mm |
diff --git a/gpu/ipc/service/ca_layer_tree_unittest_mac.mm b/gpu/ipc/service/ca_layer_tree_unittest_mac.mm |
index 18059833306cb79a1e4ea8ee433e1c4678646253..e9dca6886a98920e9404a1eb8befbd194c897116 100644 |
--- a/gpu/ipc/service/ca_layer_tree_unittest_mac.mm |
+++ b/gpu/ipc/service/ca_layer_tree_unittest_mac.mm |
@@ -2,6 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+#include <memory> |
+ |
#include "base/mac/sdk_forward_declarations.h" |
#include "gpu/GLES2/gl2extchromium.h" |
#include "gpu/ipc/service/ca_layer_tree_mac.h" |
@@ -38,7 +40,7 @@ TEST_F(CALayerTreeTest, PropertyUpdates) { |
float scale_factor = 1.0f; |
bool result = false; |
- scoped_ptr<CALayerTree> ca_layer_tree; |
+ std::unique_ptr<CALayerTree> ca_layer_tree; |
CALayer* root_layer = nil; |
CALayer* clip_and_sorting_layer = nil; |
CALayer* transform_layer = nil; |
@@ -46,7 +48,7 @@ TEST_F(CALayerTreeTest, PropertyUpdates) { |
// Validate the initial values. |
{ |
- scoped_ptr<CALayerTree> new_ca_layer_tree(new CALayerTree); |
+ std::unique_ptr<CALayerTree> new_ca_layer_tree(new CALayerTree); |
result = new_ca_layer_tree->ScheduleCALayer( |
is_clipped, |
clip_rect, |
@@ -104,7 +106,7 @@ TEST_F(CALayerTreeTest, PropertyUpdates) { |
// Update just the clip rect and re-commit. |
{ |
clip_rect = gfx::Rect(4, 8, 16, 32); |
- scoped_ptr<CALayerTree> new_ca_layer_tree(new CALayerTree); |
+ std::unique_ptr<CALayerTree> new_ca_layer_tree(new CALayerTree); |
result = new_ca_layer_tree->ScheduleCALayer( |
is_clipped, |
clip_rect, |
@@ -145,7 +147,7 @@ TEST_F(CALayerTreeTest, PropertyUpdates) { |
// Disable clipping and re-commit. |
{ |
is_clipped = false; |
- scoped_ptr<CALayerTree> new_ca_layer_tree(new CALayerTree); |
+ std::unique_ptr<CALayerTree> new_ca_layer_tree(new CALayerTree); |
result = new_ca_layer_tree->ScheduleCALayer( |
is_clipped, |
clip_rect, |
@@ -183,7 +185,7 @@ TEST_F(CALayerTreeTest, PropertyUpdates) { |
// Change the transform and re-commit. |
{ |
transform.Translate(5, 5); |
- scoped_ptr<CALayerTree> new_ca_layer_tree(new CALayerTree); |
+ std::unique_ptr<CALayerTree> new_ca_layer_tree(new CALayerTree); |
result = new_ca_layer_tree->ScheduleCALayer( |
is_clipped, |
clip_rect, |
@@ -219,7 +221,7 @@ TEST_F(CALayerTreeTest, PropertyUpdates) { |
// Change the edge antialiasing mask and commit. |
{ |
edge_aa_mask = GL_CA_LAYER_EDGE_TOP_CHROMIUM; |
- scoped_ptr<CALayerTree> new_ca_layer_tree(new CALayerTree); |
+ std::unique_ptr<CALayerTree> new_ca_layer_tree(new CALayerTree); |
result = new_ca_layer_tree->ScheduleCALayer( |
is_clipped, |
clip_rect, |
@@ -253,7 +255,7 @@ TEST_F(CALayerTreeTest, PropertyUpdates) { |
// Change the contents and commit. |
{ |
- scoped_ptr<CALayerTree> new_ca_layer_tree(new CALayerTree); |
+ std::unique_ptr<CALayerTree> new_ca_layer_tree(new CALayerTree); |
result = new_ca_layer_tree->ScheduleCALayer( |
is_clipped, |
clip_rect, |
@@ -289,7 +291,7 @@ TEST_F(CALayerTreeTest, PropertyUpdates) { |
// Change the rect size. |
{ |
rect = gfx::Rect(rect.origin(), gfx::Size(32, 16)); |
- scoped_ptr<CALayerTree> new_ca_layer_tree(new CALayerTree); |
+ std::unique_ptr<CALayerTree> new_ca_layer_tree(new CALayerTree); |
result = new_ca_layer_tree->ScheduleCALayer( |
is_clipped, |
clip_rect, |
@@ -325,7 +327,7 @@ TEST_F(CALayerTreeTest, PropertyUpdates) { |
// Change the rect position. |
{ |
rect = gfx::Rect(gfx::Point(16, 4), rect.size()); |
- scoped_ptr<CALayerTree> new_ca_layer_tree(new CALayerTree); |
+ std::unique_ptr<CALayerTree> new_ca_layer_tree(new CALayerTree); |
result = new_ca_layer_tree->ScheduleCALayer( |
is_clipped, |
clip_rect, |
@@ -361,7 +363,7 @@ TEST_F(CALayerTreeTest, PropertyUpdates) { |
// Change the opacity. |
{ |
opacity = 1.0f; |
- scoped_ptr<CALayerTree> new_ca_layer_tree(new CALayerTree); |
+ std::unique_ptr<CALayerTree> new_ca_layer_tree(new CALayerTree); |
result = new_ca_layer_tree->ScheduleCALayer( |
is_clipped, |
clip_rect, |
@@ -396,7 +398,7 @@ TEST_F(CALayerTreeTest, PropertyUpdates) { |
// Add the clipping and IOSurface contents back. |
{ |
is_clipped = true; |
- scoped_ptr<CALayerTree> new_ca_layer_tree(new CALayerTree); |
+ std::unique_ptr<CALayerTree> new_ca_layer_tree(new CALayerTree); |
result = new_ca_layer_tree->ScheduleCALayer( |
is_clipped, |
clip_rect, |
@@ -432,7 +434,7 @@ TEST_F(CALayerTreeTest, PropertyUpdates) { |
// Change the scale factor. This should result in a new tree being created. |
{ |
scale_factor = 2.0f; |
- scoped_ptr<CALayerTree> new_ca_layer_tree(new CALayerTree); |
+ std::unique_ptr<CALayerTree> new_ca_layer_tree(new CALayerTree); |
result = new_ca_layer_tree->ScheduleCALayer( |
is_clipped, |
clip_rect, |
@@ -526,7 +528,7 @@ TEST_F(CALayerTreeTest, SplitSortingContextZero) { |
transforms[4].Translate(10, 10); |
// Schedule and commit the layers. |
- scoped_ptr<CALayerTree> ca_layer_tree(new CALayerTree); |
+ std::unique_ptr<CALayerTree> ca_layer_tree(new CALayerTree); |
for (size_t i = 0; i < 5; ++i) { |
bool result = ca_layer_tree->ScheduleCALayer( |
is_clipped, |
@@ -611,7 +613,7 @@ TEST_F(CALayerTreeTest, SortingContexts) { |
} |
// Schedule and commit the layers. |
- scoped_ptr<CALayerTree> ca_layer_tree(new CALayerTree); |
+ std::unique_ptr<CALayerTree> ca_layer_tree(new CALayerTree); |
for (size_t i = 0; i < 3; ++i) { |
bool result = ca_layer_tree->ScheduleCALayer( |
is_clipped, |
@@ -681,7 +683,7 @@ TEST_F(CALayerTreeTest, SortingContextMustHaveConsistentClip) { |
gfx::Rect(0, 0, 16, 16) |
}; |
- scoped_ptr<CALayerTree> ca_layer_tree(new CALayerTree); |
+ std::unique_ptr<CALayerTree> ca_layer_tree(new CALayerTree); |
// First send the various clip parameters to sorting context zero. This is |
// legitimate. |
for (size_t i = 0; i < 3; ++i) { |
@@ -753,7 +755,7 @@ TEST_F(CALayerTreeTest, AVLayer) { |
float scale_factor = 1.0f; |
bool result = false; |
- scoped_ptr<CALayerTree> ca_layer_tree; |
+ std::unique_ptr<CALayerTree> ca_layer_tree; |
CALayer* root_layer = nil; |
CALayer* clip_and_sorting_layer = nil; |
CALayer* transform_layer = nil; |
@@ -763,7 +765,7 @@ TEST_F(CALayerTreeTest, AVLayer) { |
// Validate the initial values. |
{ |
- scoped_ptr<CALayerTree> new_ca_layer_tree(new CALayerTree); |
+ std::unique_ptr<CALayerTree> new_ca_layer_tree(new CALayerTree); |
result = new_ca_layer_tree->ScheduleCALayer( |
is_clipped, clip_rect, sorting_context_id, transform, io_surface, |
contents_rect, rect, background_color, edge_aa_mask, opacity); |
@@ -792,7 +794,7 @@ TEST_F(CALayerTreeTest, AVLayer) { |
// Pass another frame. |
{ |
- scoped_ptr<CALayerTree> new_ca_layer_tree(new CALayerTree); |
+ std::unique_ptr<CALayerTree> new_ca_layer_tree(new CALayerTree); |
result = new_ca_layer_tree->ScheduleCALayer( |
is_clipped, clip_rect, sorting_context_id, transform, io_surface, |
contents_rect, rect, background_color, edge_aa_mask, opacity); |
@@ -823,7 +825,7 @@ TEST_F(CALayerTreeTest, AVLayer) { |
// Pass a frame that is clipped. |
contents_rect = gfx::RectF(0, 0, 1, 0.9); |
{ |
- scoped_ptr<CALayerTree> new_ca_layer_tree(new CALayerTree); |
+ std::unique_ptr<CALayerTree> new_ca_layer_tree(new CALayerTree); |
result = new_ca_layer_tree->ScheduleCALayer( |
is_clipped, clip_rect, sorting_context_id, transform, io_surface, |
contents_rect, rect, background_color, edge_aa_mask, opacity); |