OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "cc/resources/raster_tile_priority_queue.h" | |
6 | |
7 #include "cc/resources/raster_tile_priority_queue_all.h" | |
8 #include "cc/resources/raster_tile_priority_queue_required.h" | |
9 | |
10 namespace cc { | |
11 | |
12 // static | |
13 scoped_ptr<RasterTilePriorityQueue> RasterTilePriorityQueue::Create( | |
14 const std::vector<PictureLayerImpl::Pair>& paired_layers, | |
15 TreePriority tree_priority, | |
16 Type type) { | |
17 switch (type) { | |
18 case Type::ALL: { | |
19 scoped_ptr<RasterTilePriorityQueueAll> queue( | |
20 new RasterTilePriorityQueueAll); | |
21 queue->Build(paired_layers, tree_priority); | |
22 return queue.Pass(); | |
23 } | |
24 case Type::REQUIRED_FOR_ACTIVATION: | |
25 case Type::REQUIRED_FOR_DRAW: { | |
26 scoped_ptr<RasterTilePriorityQueueRequired> queue( | |
27 new RasterTilePriorityQueueRequired); | |
28 queue->Build(paired_layers, type); | |
29 return queue.Pass(); | |
30 } | |
31 } | |
32 NOTREACHED(); | |
33 return nullptr; | |
34 } | |
35 | |
36 } // namespace cc | |
OLD | NEW |