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

Side by Side Diff: cc/tiles/raster_tile_priority_queue_all.cc

Issue 2258833002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/tiles/raster_tile_priority_queue_all.h" 5 #include "cc/tiles/raster_tile_priority_queue_all.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "cc/tiles/tiling_set_raster_queue_all.h" 8 #include "cc/tiles/tiling_set_raster_queue_all.h"
9 9
10 namespace cc { 10 namespace cc {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 std::vector<std::unique_ptr<TilingSetRasterQueueAll>>* queues) { 56 std::vector<std::unique_ptr<TilingSetRasterQueueAll>>* queues) {
57 DCHECK(queues->empty()); 57 DCHECK(queues->empty());
58 58
59 for (auto* layer : layers) { 59 for (auto* layer : layers) {
60 if (!layer->HasValidTilePriorities()) 60 if (!layer->HasValidTilePriorities())
61 continue; 61 continue;
62 62
63 PictureLayerTilingSet* tiling_set = layer->picture_layer_tiling_set(); 63 PictureLayerTilingSet* tiling_set = layer->picture_layer_tiling_set();
64 bool prioritize_low_res = tree_priority == SMOOTHNESS_TAKES_PRIORITY; 64 bool prioritize_low_res = tree_priority == SMOOTHNESS_TAKES_PRIORITY;
65 std::unique_ptr<TilingSetRasterQueueAll> tiling_set_queue = 65 std::unique_ptr<TilingSetRasterQueueAll> tiling_set_queue =
66 base::WrapUnique( 66 base::MakeUnique<TilingSetRasterQueueAll>(tiling_set,
67 new TilingSetRasterQueueAll(tiling_set, prioritize_low_res)); 67 prioritize_low_res);
68 // Queues will only contain non empty tiling sets. 68 // Queues will only contain non empty tiling sets.
69 if (!tiling_set_queue->IsEmpty()) 69 if (!tiling_set_queue->IsEmpty())
70 queues->push_back(std::move(tiling_set_queue)); 70 queues->push_back(std::move(tiling_set_queue));
71 } 71 }
72 std::make_heap(queues->begin(), queues->end(), 72 std::make_heap(queues->begin(), queues->end(),
73 RasterOrderComparator(tree_priority)); 73 RasterOrderComparator(tree_priority));
74 } 74 }
75 75
76 } // namespace 76 } // namespace
77 77
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 return active_queues_; 171 return active_queues_;
172 return pending_queues_; 172 return pending_queues_;
173 } 173 }
174 default: 174 default:
175 NOTREACHED(); 175 NOTREACHED();
176 return active_queues_; 176 return active_queues_;
177 } 177 }
178 } 178 }
179 179
180 } // namespace cc 180 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiles/picture_layer_tiling_set_unittest.cc ('k') | cc/tiles/software_image_decode_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698